Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0032812Openbravo ERPA. Platformpublic2016-04-29 10:182016-06-17 19:37
aferraz 
alostale 
normalmajoralways
closedfixed 
30Professional Appliance
 
3.0PR16Q33.0PR16Q3 
caristu
Core
No
0032812: When filtering in a process definition selector, ad_org_id parameter should be used if exists instead of login organization
When a parameter inside a process definition has a validation referencing ad_org_id parameter of the same process definition, datasource is also filtering by login organization (In the request an _org parameter is sent with the context organization UUID). This affects to the validation as it changes its original condition.
- Login as System Admin.
- Install "Multi-Dimensional Profit And Loss Report" module and dependencies.
- Navigate to "Multi-Dimensional Profit And Loss Process" process definition.
- Select "General Ledger" parameter.
- Navigate to "ElementsAccessibleByOrganization" validation and check the code:
"(ad_isorgincluded('" + OB.getParameters().get('AD_Org_ID') + "',e.organization.id, e.client.id) <> -1 or ad_isorgincluded(e.organization.id,'" + OB.getParameters().get('AD_Org_ID') + "', e.client.id) <> -1)"

- Login as F&B Admin and "F&B España - Región Norte" organization.
- Launch "Multi-Dimensional Profit And Loss" report.
- Select "F&B España - Región Norte" organization and realize both "F&B España, S.A. US/A/Euro" and "F&B International Group US/A/US Dollar" general ledgers appear in the combo. This is correct.
- Select "F&B US East Coast" organization and realize only "F&B International Group US/A/US Dollar" general ledger appears in the combo. This is correct.

- Login as F&B Admin and "F&B US East Coast" organization.
- Launch Multi-Dimensional Profit And Loss report.
- Select "F&B US East Coast" organization and realize only "F&B International Group US/A/US Dollar" general ledger appears in the combo. This is correct.
- Select "F&B España - Región Norte" organization and realize only "F&B International Group US/A/US Dollar" general ledger appears in the combo. This is NOT correct as it should appear both "F&B España, S.A. US/A/Euro" and "F&B International Group US/A/US Dollar" general ledgers.
Problem is that a filter by login organization is being added to general ledger validation code.

In case an ad_org_id parameter exists in the process definition, it should be used instead of login organization.
No tags attached.
related to defect 00325353.0PR16Q3 closed markmm82 Report's currency and report's general ledger should be defaulted to organization's currency and organization's general ledger 
Issue History
2016-04-29 10:18aferrazNew Issue
2016-04-29 10:18aferrazAssigned To => platform
2016-04-29 10:18aferrazModules => Core
2016-04-29 10:18aferrazTriggers an Emergency Pack => No
2016-04-29 10:22aferrazRelationship addedrelated to 0032535
2016-04-29 10:24caristuDescription Updatedbug_revision_view_page.php?rev_id=11904#r11904
2016-04-29 10:24caristuDescription Updatedbug_revision_view_page.php?rev_id=11905#r11905
2016-05-02 12:25maiteResolution time => 1462399200
2016-05-03 09:36alostaleStatusnew => scheduled
2016-05-03 09:36alostaleAssigned Toplatform => alostale
2016-05-03 14:02hgbotCheckin
2016-05-03 14:02hgbotNote Added: 0086155
2016-05-03 14:02hgbotStatusscheduled => resolved
2016-05-03 14:02hgbotResolutionopen => fixed
2016-05-03 14:02hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/675c7958899ad6cf970fa1347ce4123446ec1fda [^]
2016-05-03 14:03alostaleReview Assigned To => caristu
2016-05-05 13:37caristuNote Added: 0086213
2016-05-05 13:37caristuStatusresolved => closed
2016-05-05 13:37caristuFixed in Version => 3.0PR16Q3
2016-06-17 19:37hudsonbotCheckin
2016-06-17 19:37hudsonbotNote Added: 0087511

Notes
(0086155)
hgbot   
2016-05-03 14:02   
Repository: erp/devel/pi
Changeset: 675c7958899ad6cf970fa1347ce4123446ec1fda
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Tue May 03 09:31:56 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/675c7958899ad6cf970fa1347ce4123446ec1fda [^]

fixed bug 32812: selector filter in P&E should use AD_Org_ID param if present

  When filtering data for a selector in a P&E window and this window has an AD_Org_ID
  param, it should be used for filtering instead of current session's organization.

  Logic to do it was already pressent, but it was looking for the parameter name in lower
  case, which is correct for standard windows but might not be for P&E depending on how
  the parameter was defined.

---
M modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-item.js
---
(0086213)
caristu   
2016-05-05 13:37   
Code review + testing OK.
(0087511)
hudsonbot   
2016-06-17 19:37   
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/0dc7be081b1c [^]
Maturity status: Test