Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0035124Openbravo ERPA. Platformpublic2017-02-01 11:232017-03-15 20:20
vmromanos 
inigosanchez 
normalmajoralways
closedfixed 
5
 
3.0PR17Q2 
alostale
Core
No
0035124: Selectors in Process Definition invoked from menu show only records of organizations in the context organization's natural tree
The selectors inside a Process Definition show only records of organizations in the context organization's natural tree.
This is wrong and they should show any record.
Create a process definition. UI Pattern = Report
Create a parameter with reference = OBUISEL_Selector Reference, and Reference Search Key = Financial Account Selector
Create a menu entry linked to this process definition.

Login with Openbravo/openbravo, which by default set RegiĆ³n Norte as context organization.
Go to the Process Definition and try to select any record. Only Spanish related Financial accounts are shown (caja and cuenta de banco). This is wrong, it should show all the financial accounts.

Now change the context organization to *.
Go to the Process Definition and try to select any record. Verify all the financial accounts are shown, which is OK.

Now change the context organization to FB US.
Go to the Process Definition and try to select any record. Only US related financial accounts are shown. This is wrong, it should show all the financial accounts.
No tags attached.
related to defect 0035214 closed inigosanchez Dropdowns of multi selector are not opening when included in a process 
related to defect 0035401 acknowledged Triage Platform Base OBSelectorFilterSelectItem should try to retrieve ad_org_id field 
related to defect 0036151 closed caristu organization selector in process definition don't filter by role's org access 
related to defect 00365983.0PR17Q4 closed inigosanchez Process Definition for multirecord sets only one organization in filter parameters 
related to defect 0039441 closed platform Organization Selector is not showing data from Organization 
blocks feature request 0035130 closed rqueralta Integrate module Cashflow Forecast into Openbravo 3 distribution 
Issue History
2017-02-01 11:23vmromanosNew Issue
2017-02-01 11:23vmromanosAssigned To => platform
2017-02-01 11:23vmromanosModules => Core
2017-02-01 11:23vmromanosTriggers an Emergency Pack => No
2017-02-01 11:25vmromanosSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=14423#r14423
2017-02-01 11:38inigosanchezStatusnew => scheduled
2017-02-01 11:38inigosanchezAssigned Toplatform => inigosanchez
2017-02-01 14:29inigosanchezAssigned Toinigosanchez => platform
2017-02-01 14:29inigosanchezStatusscheduled => acknowledged
2017-02-01 14:52vmromanosRelationship addedblocks 0035130
2017-02-01 15:27inigosanchezNote Added: 0093989
2017-02-01 15:27inigosanchezDescription Updatedbug_revision_view_page.php?rev_id=14435#r14435
2017-02-06 14:49inigosanchezAssigned Toplatform => inigosanchez
2017-02-06 14:49inigosanchezStatusacknowledged => scheduled
2017-02-10 09:09alostaleRelationship addedrelated to 0035214
2017-03-01 17:46inigosanchezRelationship addedrelated to 0035401
2017-03-02 10:27inigosanchezReview Assigned To => alostale
2017-03-02 10:31hgbotCheckin
2017-03-02 10:31hgbotNote Added: 0094679
2017-03-02 10:31hgbotStatusscheduled => resolved
2017-03-02 10:31hgbotResolutionopen => fixed
2017-03-02 10:31hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/ff888dbe2c3a51c0a28a6512cd8a57d9af5ba27e [^]
2017-03-03 09:20alostaleSummarySelectors in Process Definition show only records of organizations in the context organization's natural tree => Selectors in Process Definition invoked from menu show only records of organizations in the context organization's natural tree
2017-03-03 09:35alostaleNote Added: 0094716
2017-03-03 09:35alostaleStatusresolved => closed
2017-03-03 09:35alostaleFixed in Version => 3.0PR17Q2
2017-03-15 20:20hudsonbotCheckin
2017-03-15 20:20hudsonbotNote Added: 0095247
2017-05-31 14:33alostaleRelationship addedrelated to 0036151
2017-08-30 12:50inigosanchezRelationship addedrelated to 0036598
2018-10-11 18:15JONHMRelationship addedcauses 0039441
2018-10-16 16:58caristuRelationship deletedcauses 0039441
2018-10-16 16:58caristuRelationship addedrelated to 0039441

Notes
(0093989)
inigosanchez   
2017-02-01 15:27   
This issue is not related with DataSourceEntityAccess project.
(0094679)
hgbot   
2017-03-02 10:31   
Repository: erp/devel/pi
Changeset: ff888dbe2c3a51c0a28a6512cd8a57d9af5ba27e
Author: Inigo Sanchez <inigo.sanchez <at> openbravo.com>
Date: Wed Mar 01 16:25:57 2017 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/ff888dbe2c3a51c0a28a6512cd8a57d9af5ba27e [^]

Fixed issue 35124: Selectors in process def show only records of context org

The problem was that selectors inside a Process Definition show only records of
organizations in the context organization's natural tree. This was wrong because
selector should displayed records filtered by writable organizations and their
natural trees.

In order to fix this problem two changes have been done. On one hand, context
organization is not send anymore from selectors. On the other hand, Advanced
query builder manages properly this situation (selectors that can't send
organization. e.g.Selector in process definition,...).

Now, the problem has been fixed by taking into account writable organizations
instead of context organization.

---
M modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/templates/application-js.ftl
M modules/org.openbravo.service.json/src/org/openbravo/service/json/AdvancedQueryBuilder.java
M modules/org.openbravo.service.json/src/org/openbravo/service/json/DefaultJsonDataService.java
M modules/org.openbravo.service.json/src/org/openbravo/service/json/JsonConstants.java
M modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-item.js
---
(0094716)
alostale   
2017-03-03 09:35   
code reviewed

Tested with role with access to all orgs and with a role with access to only to Spain branch. When invoking from menu (after 0035130 it can be tested with Cashflow Forecast Report) the expected orgs are displayed, all in unlimted role, only spain ones with limited. When process definition works as a button, it still takes the one from the parent record it was called from.
(0095247)
hudsonbot   
2017-03-15 20:20   
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/54e102bef53e [^]
Maturity status: Test