(0057311)
|
hgbot
|
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
---
|
|
|
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. |
|