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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0038316
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformmajoralways2018-04-10 18:092018-05-09 19:30
ReporterngarciaView Statuspublic 
Assigned Tocollazoandy4 
PriorityurgentResolutionfixedFixed in Version3.0PR18Q3
StatusclosedFix in branchFixed in SCM revision225d04f42766
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Todmiguelez
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0038316: Warehouse in context (session) is different from the warehouse on the login in some circumstances, could affect tax selection

DescriptionWarehouse in context (session) is different from the warehouse on the login in some circumstances, could affect tax selection
Steps To ReproduceAs group admin role:
   Create a new role
   Set is as not manual and as advanced
   Remove access from all the organizations except the following ones:
      F&B España - Región Norte
      F&B España, S.A.
      F&B US West Coast
   Create a new user
   Add the previously created role and set it as default role
   Deactivate España Región Norte warehouse
   Create a new warehouse and storage bin in F&B España, S.A.

Log in with the previously created user:
   Check the organization shown in the log is F&B España - Región Norte (max ad_org_id in ad_role_orgaccess table for the role)
   Check the warehouse shown is the newly created one

   Check the warehouse in session is US West coast (min m_warehouse_id in m_warehouse table, active and for this client)
   We could check it debugging SL_Invoice_Product callout
   Create a new purchase invoice for F&B España - Región Norte
   Add a product to it
   Check the value in the following line:

String strWarehouse = Utility
        .getContext(this, info.vars, "#M_Warehouse_ID", info.getWindowId());
   
   Open the user profile and apply without making any change

   Check the warehouse in session is the one in the login, the previously created one (you could use SL_Invoice_Product callout)
Proposed SolutionIn LoginUtils.getDefaultWarehouse() function, in case there does not exist any warehouse defined for the specific organization (strOrg), select one warehouse from its natural tree
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0103782)
ngarcia (developer)
2018-04-10 18:19

If the warehouse in session belongs to the natural tree of the invoice's organization, it is used for tax calculation in invoices (that do not have warehouse defined)
(0104209)
collazoandy4 (reporter)
2018-05-02 17:14

Test Plan
  Go to Role window and create a new record:
    Name: IssueRole
    User Level: Client+Organization
    Manual: N
    Advanced: Y
    Remove access from all the organizations except the following ones:
      F&B España - Región Norte
      F&B España, S.A.
      F&B US West Coast
  Create a new user and asign the previous role created.
  Go to Warehouse and Storage Bins window and deactivated the Region Norte warehouse
    Create a new warehouse and storage bin in F&B España, S.A.

  Log in with the previously created user:
   Check the organization shown in the log is F&B España - Región Norte
   Check the warehouse shown is the newly created one

   Check the warehouse in session is newly created one
   We could check it debugging SL_Invoice_Product callout
   Create a new purchase invoice for F&B España - Región Norte
   Add a product to it
   Check the value in the following line:
     String strWarehouse = Utility.getContext(this, info.vars, "#M_Warehouse_ID", info.getWindowId());
   Open the user profile and apply without making any change
   Check the warehouse in session is the one in the login, the previously created one (use SL_Invoice_Product callout)
(0104230)
hgbot (developer)
2018-05-03 13:29

Repository: erp/devel/pi
Changeset: 225d04f427667786a6ba5a1b5bbbde917ec0e1ef
Author: Armaignac <collazoandy4 <at> gmail.com>
Date: Mon Apr 30 08:23:08 2018 -0400
URL: http://code.openbravo.com/erp/devel/pi/rev/225d04f427667786a6ba5a1b5bbbde917ec0e1ef [^]

Fixes issue 38316:Warehouse in context (session) is different from the warehouse
on the login in some circumstances, could affect tax selection

Under some circumstances the warehouse in the session is different from the warehouse
on the login that could affect tax selection

Now in case there does not exist any warehouse defined for the specific organization
one is selected from the organization natural tree

---
M src/org/openbravo/base/secureApp/LoginUtils.java
---
(0104231)
dmiguelez (developer)
2018-05-03 13:30

Code Review + Testing Ok
(0104300)
shuehner (administrator)
2018-05-05 13:57

That change is creating unused code which instead should be deleted.

Specifically the removal of OrgTreeData.select call when checked was the only user of that non-public xsql file (OrgTree_data.xsql)
After removal that call that while xsql file is not used at all. As it is not part of public api it can just be removed easily. -> hg remove the whole xsql file please.
(0104335)
hgbot (developer)
2018-05-08 18:18

Repository: erp/devel/pi
Changeset: 3952682173bf571a7fb290e905975bb4cc6333dd
Author: Armaignac <collazoandy4 <at> gmail.com>
Date: Mon May 07 11:27:06 2018 -0400
URL: http://code.openbravo.com/erp/devel/pi/rev/3952682173bf571a7fb290e905975bb4cc6333dd [^]

Related to issue 38316: Removed unused xsql file.

The OrgTree_data xsql file is not used at all after the OrgTreeData.select removal

---
R src/org/openbravo/base/secureApp/OrgTree_data.xsql
---
(0104427)
hudsonbot (developer)
2018-05-09 19:29

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/2be7d3efe606 [^]
Maturity status: Test
(0104435)
hudsonbot (developer)
2018-05-09 19:30

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/2be7d3efe606 [^]
Maturity status: Test

- Issue History
Date Modified Username Field Change
2018-04-10 18:09 ngarcia New Issue
2018-04-10 18:09 ngarcia Assigned To => platform
2018-04-10 18:09 ngarcia Modules => Core
2018-04-10 18:09 ngarcia Resolution time => 1525212000
2018-04-10 18:09 ngarcia Triggers an Emergency Pack => No
2018-04-10 18:13 ngarcia Issue Monitored: networkb
2018-04-10 18:19 ngarcia Note Added: 0103782
2018-04-13 13:10 ngarcia Assigned To platform => Triage Finance
2018-04-13 13:14 ngarcia Proposed Solution updated
2018-04-13 13:23 ngarcia Summary Warehouse in context (session) is different from the warehouse on the login in some circumstances, could affect tax calculation => Warehouse in context (session) is different from the warehouse on the login in some circumstances, could affect tax selection
2018-04-13 13:23 ngarcia Description Updated View Revisions
2018-04-13 13:25 aferraz Assigned To Triage Finance => collazoandy4
2018-04-30 15:13 collazoandy4 Status new => scheduled
2018-05-02 17:14 collazoandy4 Note Added: 0104209
2018-05-03 13:29 hgbot Checkin
2018-05-03 13:29 hgbot Note Added: 0104230
2018-05-03 13:29 hgbot Status scheduled => resolved
2018-05-03 13:29 hgbot Resolution open => fixed
2018-05-03 13:29 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/225d04f427667786a6ba5a1b5bbbde917ec0e1ef [^]
2018-05-03 13:30 dmiguelez Review Assigned To => dmiguelez
2018-05-03 13:30 dmiguelez Note Added: 0104231
2018-05-03 13:30 dmiguelez Status resolved => closed
2018-05-03 13:30 dmiguelez Fixed in Version => 3.0PR18Q3
2018-05-05 13:57 shuehner Note Added: 0104300
2018-05-05 13:57 shuehner Status closed => new
2018-05-05 13:57 shuehner Resolution fixed => open
2018-05-05 13:57 shuehner Fixed in Version 3.0PR18Q3 =>
2018-05-08 18:18 hgbot Checkin
2018-05-08 18:18 hgbot Note Added: 0104335
2018-05-08 18:19 aferraz Status new => scheduled
2018-05-08 18:19 aferraz Status scheduled => resolved
2018-05-08 18:19 aferraz Fixed in Version => 3.0PR18Q3
2018-05-08 18:19 aferraz Resolution open => fixed
2018-05-08 18:20 aferraz Status resolved => closed
2018-05-09 19:29 hudsonbot Checkin
2018-05-09 19:29 hudsonbot Note Added: 0104427
2018-05-09 19:30 hudsonbot Checkin
2018-05-09 19:30 hudsonbot Note Added: 0104435


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker