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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0023334
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformmajoralways2013-03-18 20:002013-03-20 10:46
ReporterdmiguelezView Statuspublic 
Assigned ToAugustoMauch 
PriorityurgentResolutionfixedFixed in Version3.0MP22
StatusclosedFix in branchFixed in SCM revision1e02aa6032df
ProjectionnoneETAnoneTarget Version3.0MP22
OSLinux 32 bitDatabasePostgreSQLJava version1.6.0_18
OS VersionCommunity ApplianceDatabase version8.3.9Ant version1.7.1
Product VersionSCM revision 
Review Assigned Toshankarb
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0023334: In Product Selector, when using the @ad_org_id@ in the HQL Where Clause is not working as expected.

DescriptionIn Product Selector, when using the @ad_org_id@ in the HQL Where Clause it uses the Organization of the session, not the Organization of the Document selected, even if it is stored in session.
Steps To ReproduceIn the Issue

https://issues.openbravo.com/view.php?id=23096 [^]

Use the proposed solution to fix it and realize that is not working as expected.
Is filtering the data using the Organization of the Session instead of the Organization of the Document.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
blocks defect 00230963.0MP22 closeddmiguelez Product selector Is not filtering by role org access 

-  Notes
(0057311)
hgbot (developer)
2013-03-19 14:08

Repository: erp/devel/pi
Changeset: 1e02aa6032df035fc5bc481f4c2b989f485f8936
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Tue Mar 19 14:06:21 2013 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/1e02aa6032df035fc5bc481f4c2b989f485f8936 [^]

Fixes issue 23334: Product selector fetched the proper value of @ad_org_id@

The problem was that the product selector did not send the windowId to the datasource. If there is no windowId, the datasource does not try to fetch the session variable from the window, as it should. In this particular case the selector should try to fetch the ad_org_id associated to the window, but instead is fetching the ad_org_id of the organization the user is logged with.

Selectors are not only used in generated windows but also in parameter windows. In that case it will not be possible to send to the datasource any windowId, but the process should not fail either.

---
M modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-item.js
---
(0057313)
AugustoMauch (manager)
2013-03-19 16:37

Test plan:

As System Administrator:
- Enter this in the HQL Where Clause of the Defined Selector tab of the Product selector: e.active='Y' and (AD_ISORGINCLUDED(e.warehouse.organization.id, @AD_Org_Id@, @AD_Client_Id@)<>-1 or (AD_ISORGINCLUDED( @AD_Org_Id@, e.warehouse.organization.id, @AD_Client_Id@)<>-1)).

As F&B Administrator
- Open the Sales Order window
- Create a new header, organization F&B EspaƱa, S.A.
- Create a new line in form view. Open the product selector window.
- Clear the filter. Only warehouses from Spain should be shown.

- Create a new header, organization F&B US, Inc.
- Create a new line in form view. Open the product selector window.
- Clear the filter. Only warehouses from US should be shown.

Before the fix, the warehouses shown in the product selector did not depend on the organization of the document, but on the organization the user is logged in.
(0057322)
shankarb (reporter)
2013-03-20 10:46

Code reviewed and tested in pi changeset 6cfd12f52b4f

- Issue History
Date Modified Username Field Change
2013-03-18 20:00 dmiguelez New Issue
2013-03-18 20:00 dmiguelez Assigned To => AugustoMauch
2013-03-18 20:00 dmiguelez Modules => Core
2013-03-18 20:00 dmiguelez Triggers an Emergency Pack => No
2013-03-18 20:01 dmiguelez Target Version => 3.0MP22
2013-03-18 20:01 dmiguelez Relationship added blocks 0023096
2013-03-19 13:55 AugustoMauch Issue Monitored: shankarb
2013-03-19 13:56 AugustoMauch Review Assigned To => shankarb
2013-03-19 14:08 hgbot Checkin
2013-03-19 14:08 hgbot Note Added: 0057311
2013-03-19 14:08 hgbot Status new => resolved
2013-03-19 14:08 hgbot Resolution open => fixed
2013-03-19 14:08 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/1e02aa6032df035fc5bc481f4c2b989f485f8936 [^]
2013-03-19 16:37 AugustoMauch Note Added: 0057313
2013-03-20 10:46 shankarb Note Added: 0057322
2013-03-20 10:46 shankarb Status resolved => closed
2013-03-20 10:46 shankarb Fixed in Version => 3.0MP22


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker