Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0026171
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 07. Sales managementminorhave not tried2014-04-03 18:462014-06-10 22:24
ReporterjonalegriaesarteView Statuspublic 
Assigned ToAtulOpenbravo 
PrioritynormalResolutionfixedFixed in Version
StatusclosedFix in branchpiFixed in SCM revision54207c92f56c
ProjectionnoneETAnoneTarget Version3.0PR14Q3
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Torafaroda
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0026171: Warehouse field (sales order window) does not take user´s default warehouse

DescriptionWhen I create a new record in Sales order window and fill in all fields, warehouse field does not take the defined user´s default warehouse. It takes the first on hand warehouse defined for user´s organization by priority order.
Steps To Reproduce- Log in with user´s defined Username and password.
- Create a new record in Sales order window.
- Fill in all fields and realize that warehouse field is not default user´s defined warehouse.
Proposed SolutionIf user´s default warehouse is an OnHand warehouse, the field warehouse in sales order window should be filled in with this one, and if it is not, then the application should take organization´s first on hand warehouse ordered by priority.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 00244623.0MP29 closedjecharri Warehouse field (goods shipment window) does not take user´s default warehouse 

-  Notes
(0066179)
eintelau (developer)
2014-04-04 00:28

Also note in our tests, the warehouse field is not taking the on hand warehouse by priority order either. It is taking the first on hand warehouse based on database row order.

From support case :
+++++++
Digging into this a little further, the default value for the warehouse is defined as follows in AD:
@SQL=select m_warehouse_id from ad_org_warehouse where ad_org_id = @ad_org_id@ group by m_warehouse_id, priority having min(priority) = priority

I think that is attempting to get the warehouse which has the minimum priority, but it doesn't work.
The query groups by warehouse_id and priority, so in case where there are 10 warehouses, it returns 10 groups. The having clause then selects the minimum priority from the group and compares it to the priority value of the group. This will always be true as the query is grouping by priority, so any group will have the same value for priority. In effect the grouping and having clauses do nothing and you get the same result as just doing a straight select (select m_warehouse_id from ad_org_warehouse where ad_org_id = @ad_org_id@)

A query that I thing would work (and is simpler) would be

@SQL=select m_warehouse_id from ad_org_warehouse where ad_org_id = @ad_org_id@ order by priority limit 1;

That orders the org warehouses by priority and returns the first row...which would be the lowest priority value warehouse
(0067782)
AtulOpenbravo (developer)
2014-06-05 13:45

Test Plan
>> Login with F&B International Group Admin and Keep Organization as F&B US Inc.
>> Go to Warehouse Management >> Setup >> Warehouse & Bin Setup, create a new record in F&B US Inc Organization. For eg:- Main Warehouse
>> Go to Organization >> F&B US Inc. In Warehouse Tab add record with Main Warehouse and set priority as zero.
>> Check Log in details of user. For eg:- Warehouse is US West Coast Inc.
>> Go to Sales Order Window. Create new Record.
Check the warehouse selected in Warehouse Field is US West Coast.

Alternate testing.

>> Check Login profile of log in user and Change Warehouse to Main Warehouse.
>> Go to Sales Order. Create a new Record and Check that warehouse selected in warehouse Field is Main Warehouse.

Alternate testing.

>> Go to Organization and delete record from Warehouse setup where warehouse is US East Coast.
>> Go to Login profile of log in user and Change Warehouse to US East Coast.
>> Go to Sales Order, Create new record, Check that warehouse selected in warehouse field is Main Warehouse as priority of it is Zero.
US East Coast warehouse is no more in the drop down for Sales Order as it is not Onhand Warehouse for this Organization.

** Issue 26171 is related to only SE_Order_BPartner.java
** In SE_Order_Organization.java, Validation on Warehouse is applied for OnHand Warehouses, but this should be only applicable in case of Sales Transaction and not for Purchase Transaction, so it is rectified in the same fix.
(0067797)
hgbot (developer)
2014-06-06 07:10

Repository: erp/devel/pi
Changeset: 54207c92f56cf50f3cd4a01ddb0855b4c6cb285c
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Thu Jun 05 16:10:17 2014 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/54207c92f56cf50f3cd4a01ddb0855b4c6cb285c [^]

Fixes Issue 26171:Sets default warehouse in SalesOrder if its in on hand WH

---
M src/org/openbravo/erpCommon/ad_callouts/SE_Order_BPartner.java
M src/org/openbravo/erpCommon/ad_callouts/SE_Order_Organization.java
---
(0067800)
rafaroda (developer)
2014-06-06 09:03

Successfully completed the 3 test cases https://issues.openbravo.com/view.php?id=26171#c67782 [^]
(0067887)
hudsonbot (developer)
2014-06-10 22:24

A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/763f16c2ad2e [^]
Maturity status: Test

- Issue History
Date Modified Username Field Change
2014-04-03 18:46 jonalegriaesarte New Issue
2014-04-03 18:46 jonalegriaesarte Assigned To => pramakrishnan
2014-04-03 18:46 jonalegriaesarte Modules => Core
2014-04-03 18:46 jonalegriaesarte Triggers an Emergency Pack => No
2014-04-03 18:46 jonalegriaesarte Relationship added related to 0024462
2014-04-04 00:28 eintelau Note Added: 0066179
2014-04-04 00:29 eintelau Issue Monitored: eintelau
2014-04-07 16:11 jonalegriaesarte Resolution time => 1401746400
2014-04-07 16:12 jonalegriaesarte Target Version => PR14Q3
2014-06-05 08:44 AtulOpenbravo Assigned To pramakrishnan => AtulOpenbravo
2014-06-05 13:43 AtulOpenbravo Status new => scheduled
2014-06-05 13:43 AtulOpenbravo fix_in_branch => pi
2014-06-05 13:45 AtulOpenbravo Note Added: 0067782
2014-06-06 07:10 hgbot Checkin
2014-06-06 07:10 hgbot Note Added: 0067797
2014-06-06 07:10 hgbot Status scheduled => resolved
2014-06-06 07:10 hgbot Resolution open => fixed
2014-06-06 07:10 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/54207c92f56cf50f3cd4a01ddb0855b4c6cb285c [^]
2014-06-06 09:03 rafaroda Review Assigned To => rafaroda
2014-06-06 09:03 rafaroda Note Added: 0067800
2014-06-06 09:03 rafaroda Status resolved => closed
2014-06-10 22:24 hudsonbot Checkin
2014-06-10 22:24 hudsonbot Note Added: 0067887


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker