Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0033799Openbravo ERPA. Platformpublic2016-08-25 09:272016-09-15 16:48
JONHM 
NaroaIriarte 
normalminoralways
closedfixed 
5
 
3.0PR16Q4 
caristu
Core
No
0033799: AD_Role_ID system variable not working at tab level
If we want to disable some tab with the system variable @#AD_Role_ID@ applied into a "Display Logic" of a TAB, it does not work. The tab is always shown.
****** TAB LEVEL ******
1) Apply this sentence into "Display logic" of some TAB inside a window (make sure the role we want to apply has permission to open that window):
@#AD_Role_ID@!'SOMEROLEID'
2) Open that window using that role. The tab is displayed.

------------------------------------
****** FIELD LEVEL ******
1) Apply this sentence into "Display logic" of some FIELD inside a window (make sure the role we want to apply has permission to open that window):
@#AD_Role_ID@!'SOMEROLEID'
2) Open that window using that role. The field is displayed in grid view and the field is read only. It is not shown in from view. This behavior is correct.
No tags attached.
related to feature request 00052023.0MP19 closed AugustoMauch Implement display logic for tabs [No new BOM creation possible] 
related to defect 00261983.0PR14Q3 closed guillermogil Display logics based on preferences are not working properly under some circumstances 
Issue History
2016-08-25 09:27JONHMNew Issue
2016-08-25 09:27JONHMAssigned To => platform
2016-08-25 09:27JONHMModules => Core
2016-08-25 09:27JONHMTriggers an Emergency Pack => No
2016-08-25 15:18NaroaIriarteAssigned Toplatform => NaroaIriarte
2016-08-29 14:44NaroaIriarteStatusnew => acknowledged
2016-08-29 15:27NaroaIriarteStatusacknowledged => scheduled
2016-08-31 13:15NaroaIriarteNote Added: 0089618
2016-08-31 13:17NaroaIriarteNote Edited: 0089618bug_revision_view_page.php?bugnote_id=0089618#r12999
2016-09-01 09:59NaroaIriarteDescription Updatedbug_revision_view_page.php?rev_id=13003#r13003
2016-09-01 09:59NaroaIriarteSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=13005#r13005
2016-09-01 10:21NaroaIriarteRelationship addedrelated to 0005202
2016-09-14 09:47NaroaIriarteReview Assigned To => alostale
2016-09-14 09:47hgbotCheckin
2016-09-14 09:47hgbotNote Added: 0089937
2016-09-14 09:47hgbotStatusscheduled => resolved
2016-09-14 09:47hgbotResolutionopen => fixed
2016-09-14 09:47hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/6413719aeee51e03cb1089624e00293c7e1416ec [^]
2016-09-14 12:31caristuRelationship addedrelated to 0026198
2016-09-14 12:31NaroaIriarteReview Assigned Toalostale => caristu
2016-09-14 14:41hudsonbotCheckin
2016-09-14 14:41hudsonbotNote Added: 0089954
2016-09-14 15:49caristuNote Added: 0089955
2016-09-14 16:38hgbotCheckin
2016-09-14 16:38hgbotNote Added: 0089957
2016-09-14 17:03hgbotCheckin
2016-09-14 17:03hgbotNote Added: 0089959
2016-09-15 09:34caristuNote Added: 0089964
2016-09-15 09:34caristuStatusresolved => closed
2016-09-15 09:34caristuFixed in Version => 3.0PR16Q4
2016-09-15 16:48hudsonbotCheckin
2016-09-15 16:48hudsonbotNote Added: 0089994
2016-09-15 16:48hudsonbotCheckin
2016-09-15 16:48hudsonbotNote Added: 0089995

Notes
(0089618)
NaroaIriarte   
2016-08-31 13:15   
(edited on: 2016-08-31 13:17)
The behavior for the Field level is correct. For example, set the display logic of the field "Business Partner Category" of "Business Partner" window as @#AD_Role_ID@!'42D0EEB1C66F497A90DD526DC597E6F0' as it is reported. The expected behavior is the following:

- In grid view, the "Business Partner Category" field will be visible but it will be set as READ ONLY.
- In form view, the field will not be visible.

Here you have some documentation of the specifications about project which implemented the functionality:

http://wiki.openbravo.com/wiki/Projects:Grid_Display_Logic_as_Read_Only/Specs [^]

(0089937)
hgbot   
2016-09-14 09:47   
Repository: erp/devel/pi
Changeset: 6413719aeee51e03cb1089624e00293c7e1416ec
Author: Naroa Iriarte <naroa.iriarte <at> openbravo.com>
Date: Mon Sep 12 12:15:22 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/6413719aeee51e03cb1089624e00293c7e1416ec [^]

Fixed issue 33799: AD_ROLE_ID was not working fine in the tabs display logic

The display logics using the AD_ROLE_ID session variable were not working fine. The problem was in the ob-standard-view.js class. The session attributes were overwritten with the values saved in the OB.Properties. And in this case it was null.
To fix this, a condition has been added, now if the OB.Properties(propertyName) is null, the value of the session attribute is not overwritten.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js
---
(0089954)
hudsonbot   
2016-09-14 14:41   
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/4bab0d04f3bd [^]
Maturity status: Test
(0089955)
caristu   
2016-09-14 15:49   
Some minor improvements to be applied: https://docs.google.com/spreadsheets/d/18l2biKWeG6iGDIPqO6VuYQ_TtP_6YxyQU4KSrPvQlJ8/edit#gid=0 [^]
(0089957)
hgbot   
2016-09-14 16:38   
Repository: erp/devel/pi
Changeset: 11ee89985b04757dcc88f98a64fadb6f1d3afba1
Author: Naroa Iriarte <naroa.iriarte <at> openbravo.com>
Date: Wed Sep 14 16:23:43 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/11ee89985b04757dcc88f98a64fadb6f1d3afba1 [^]

Related with issue 33799: The OB.PropertyStore.get method is now invoked once

Before, there were two invocations to the OB.PropertyStore.get method, now, a new variable has been created which contains the value obtained from the OB.PropertyStore.get method and now that variable is used instead of invoking twice the method.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js
---
(0089959)
hgbot   
2016-09-14 17:03   
Repository: erp/devel/pi
Changeset: 9bc7137ec26a502bb128808ac09c79a7b7dc6bb4
Author: Naroa Iriarte <naroa.iriarte <at> openbravo.com>
Date: Wed Sep 14 17:03:14 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/9bc7137ec26a502bb128808ac09c79a7b7dc6bb4 [^]

Related with issue 33799: The preferenceValue variable set correctly

The preferenceValue variable was being set outside the for loop and this had no sense. Now it is correctly placed.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js
---
(0089964)
caristu   
2016-09-15 09:34   
Code review + testing OK: now session attribute values are not overridden in context info by non-existing preferences.

Tested with:

- Display logic on field based on @#AD_Role_ID@
- Display logic on tab based on @#AD_Role_ID@
- Display logic on tab based on a preference value
(0089994)
hudsonbot   
2016-09-15 16:48   
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/9504e92f9553 [^]
Maturity status: Test
(0089995)
hudsonbot   
2016-09-15 16:48   
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/9504e92f9553 [^]
Maturity status: Test