Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0005202Openbravo ERP02. Master data managementpublic2008-09-23 13:582013-01-08 14:13
rgoris 
AugustoMauch 
normalminoralways
closedfixed 
5
pi 
3.0MP193.0MP19 
dbaz
Core
No
0005202: Implement display logic for tabs [No new BOM creation possible]
Implement display logic for tabs to hide Bill of Material tab when isBOM = N
In Grid Mode show always, but display an error when accessing the tab.
----
In case the user forgot to check BOM for a product, then it is not possible to create a new BOM record. In stead of informing the user that for the selected product it is not possible to create a BOM, the window just remains empty and not further clue is given.
No tags attached.
related to defect 00005712.40 closed alostale Cannot see the region tab 
related to design defect 00195953.0MP19 closed AugustoMauch Enable "Display Logic" clauses to be working in Status Bar fields 
related to defect 0033401 closed collazoandy4 Move display logic from Region tab fields to the tab itself 
related to defect 0033799 closed NaroaIriarte AD_Role_ID system variable not working at tab level 
related to defect 0033998 acknowledged Triage Platform Base It is possible to edit the Display Logic field on Tab having no modules in in development status 
related to defect 0037153 closed caristu Characteristics Configuration tab display logic does not work properly 
related to defect 0046930 closed alostale When in a window there are tabs which have a logic to show, and should not be shown, if I go to dropdown I can add it 
blocks design defect 00227233.0MP19 closed gorkaion Add display logic to reservations related tabs 
gif No-new-BOM-possible.gif (86,645) 2008-09-23 13:58
https://issues.openbravo.com/file_download.php?file_id=271&type=bug
gif
Issue History
2008-09-23 13:58rgorisNew Issue
2008-09-23 13:58rgorisAssigned To => cromero
2008-09-23 13:58rgorissf_bug_id0 => 2124441
2008-09-23 13:58rgorisFile Added: No-new-BOM-possible.gif
2008-09-29 11:12psarobeStatusnew => scheduled
2008-09-29 11:12psarobeNote Added: 0009230
2008-09-29 11:12psarobeAssigned Tocromero => alostale
2008-09-29 11:12psarobefix_in_branch => trunk
2008-12-10 09:56alostaleAssigned Toalostale => iperdomo
2008-12-10 15:20rgorisTarget Version => 2.60
2008-12-10 15:20rgorisfix_in_branchtrunk =>
2009-01-19 13:41psarobeversion => trunk
2009-02-03 17:44iperdomoTypedefect => feature request
2009-02-03 17:44iperdomoSummaryNo new BOM creation possible => Implement display logic for tabs [No new BOM creation possible]
2009-02-03 17:44iperdomoDescription Updated
2009-10-16 15:45andreaferacoIssue Monitored: andreaferaco
2009-11-18 09:10rafarodaRelationship addedrelated to 0000571
2011-05-17 13:21rgorisTarget Version3.0MP0 =>
2011-11-28 18:38RafaelCruzIssue Monitored: RafaelCruz
2012-09-18 09:18iperdomoAssigned Toiperdomo => alostale
2012-11-23 08:04alostaleRelationship addedrelated to 0019595
2012-11-23 08:07alostaleTarget Version => 3.0MP19
2012-11-23 11:53extraIssue Monitored: extra
2012-12-05 10:40AugustoMauchAssigned Toalostale => AugustoMauch
2013-01-02 17:32AugustoMauchIssue Monitored: dbaz
2013-01-02 17:32AugustoMauchReview Assigned To => dbaz
2013-01-02 17:32AugustoMauchTriggers an Emergency Pack => No
2013-01-03 11:02hgbotCheckin
2013-01-03 11:02hgbotNote Added: 0055316
2013-01-03 11:03hgbotStatusscheduled => resolved
2013-01-03 11:03hgbotResolutionopen => fixed
2013-01-03 11:03hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/43409b2738c4f7b5550fe572be44d9fef451d652 [^]
2013-01-03 11:18AugustoMauchNote Added: 0055317
2013-01-03 11:32AugustoMauchNote Added: 0055318
2013-01-03 11:32AugustoMauchStatusresolved => new
2013-01-03 11:32AugustoMauchResolutionfixed => open
2013-01-03 14:00gorkaionRelationship addedblocks 0022723
2013-01-04 09:53hudsonbotCheckin
2013-01-04 09:53hudsonbotNote Added: 0055353
2013-01-04 15:03hgbotCheckin
2013-01-04 15:03hgbotNote Added: 0055362
2013-01-04 15:03hgbotStatusnew => resolved
2013-01-04 15:03hgbotResolutionopen => fixed
2013-01-04 15:03hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/43409b2738c4f7b5550fe572be44d9fef451d652 [^] => http://code.openbravo.com/erp/devel/pi/rev/c8724afca806207458ff56c89842c4a612001a4f [^]
2013-01-04 15:06AugustoMauchNote Added: 0055363
2013-01-07 16:57hgbotCheckin
2013-01-07 16:57hgbotNote Added: 0055365
2013-01-08 06:08hudsonbotCheckin
2013-01-08 06:08hudsonbotNote Added: 0055366
2013-01-08 06:08hudsonbotCheckin
2013-01-08 06:08hudsonbotNote Added: 0055367
2013-01-08 12:50rgorisNote Added: 0055374
2013-01-08 14:13dbazNote Added: 0055380
2013-01-08 14:13dbazStatusresolved => closed
2013-01-08 14:13dbazFixed in Version => 3.0MP19
2016-07-01 08:20caristuRelationship addedrelated to 0033401
2016-09-01 10:21NaroaIriarteRelationship addedrelated to 0033799
2016-09-15 09:55caristuRelationship addedrelated to 0033998
2017-10-27 10:21alostaleRelationship addedrelated to 0037153
2021-06-17 11:37alostaleRelationship addedrelated to 0046930

Notes
(0009230)
psarobe   
2008-09-29 11:12   
It happens the same in window country and regions. In all these kind of windows a message should show up saying that a field in the parent window must be marked or some thing like that
(0055316)
hgbot   
2013-01-03 11:02   
Repository: erp/devel/pi
Changeset: 43409b2738c4f7b5550fe572be44d9fef451d652
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Thu Jan 03 11:00:14 2013 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/43409b2738c4f7b5550fe572be44d9fef451d652 [^]

Fixes issue 5202: Implemented display logic for tabs

Now the tabs can define display logic, based on the values of its ancestor tabs fields.

Summary of the changes:
-DynamicExpressionParser.java: Adds a new attribute called inpColumnNames, that is only used in the tabs display logic and that will be used to convert the tok
ens to its inp column format. This needs to be done because the display logic is going to feed from the view context, and there the ancestor tab fields are sto
red using its inp column name.

-ob-view-tab.js.ftl: Adds to the view description of the tab the showTabIf property, but only if the tab has a display logic defined.

-OBViewTab.java: Adds the getShowIf method, that is used in ob-view-tab.js.ftl to retrieve the display logic of the tabs

-ob-view-form.js: Calls the updateSubTabVisibility (defined in ob-standard-view.js) whenever a fields changes and loses focus.

-ob-standard-view.js: In the first chunk it wraps the tab display logic in a try block to prevent errors if the display logic is not defined properly (this same thing is done for the fields display logic). The second chunk defines and uses the updateSubTabVisibility function, that based on a view will be used to determine the visibility of all its subtabs. The function is called whenever a new record is selected.
If a subtab that was active in its tabBar is hidden, the first visible tab of that tabBar will be selected, if any. If there are not any remaining visible subt
abs, the whole tabBar will be made invisible.

-ob-standard-window.js: Changes have been made in the functions to move among tabs to take into account that it should not be possible to move to a hidden tab.

---
M modules/org.openbravo.client.application/src/org/openbravo/client/application/DynamicExpressionParser.java
M modules/org.openbravo.client.application/src/org/openbravo/client/application/templates/ob-view-tab.js.ftl
M modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewTab.java
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-window.js
M src-db/database/model/tables/AD_TAB.xml
M src-db/database/sourcedata/AD_COLUMN.xml
M src-db/database/sourcedata/AD_FIELD.xml
---
(0055317)
AugustoMauch   
2013-01-03 11:18   
Test Plan:
- As System Admin, Open Window, Tab and Fields.
- Open in form view the URL tab of the Widget window and enter this in the display logic field: @Widget_Superclass_ID@='C26A68FD8CF347EC9D1FB7E274622450'
- Open in form view the Query tab of the Widget window and enter this in the display logic field: @Widget_Superclass_ID@='2A32CF26F3F64FE39C7F94E9D82497D1'
- Rebuild, restart tomcat, and open as System Admin the Widgets window.
- Select an URL widget, the URL tab should be shown, but not the Query tab.
- Select a Query widget, the QWuery tab should be shown, but not the URL tab.
- Select a HTML widget. Not the Query nor the URL tabs should be shown.
- Create a new widget. By default it is not an URL not a Query widget, so neither of those tabs should be visible. Change its Widget Superclass to URL, the URL tab should be visible.

Check that the shortcuts to move between tabs still work:
- Select a Query widget. The URL subtab will be hidden. This now hidden tab is placed between the Widget Menu Items and the Query tab. Using the shortcut, move between those tabs, and check that the focus is not going to the hidden tab.

Check that if an active tab is hidden, another tab is selected.
- Select a Query widget. The Query tab should be visible. Select that tab, and put the focus back on the header tab.
- Select a non Query widget. The Query tab which was visible at that moment will be hidden, and the first visible tab (Parameter) will be selected.

Check that if no subtabs are visible the whole child tabbar dissapears.
- Change the display logic of level 1 of the Widget window to false, except the one of the Query tab which should be left as it was (@Widget_Superclass_ID@='2A32CF26F3F64FE39C7F94E9D82497D1').
- Rebuild, restart tomcat.
- As system administrator open the Widget window.
- Select a Query widget. Only the Query subtab should be visible.
- Select a non query widget. The only visible tab will be hidden, so the whold child tab bar will dissapear.
- Select again a query widget. The child tab bar will be visible again, and only the Query tab will be shown.
(0055318)
AugustoMauch   
2013-01-03 11:32   
Currently in the display logic only the values of the fields of the ancestor tabs can be used, but also the values of the preferences should be available.
(0055353)
hudsonbot   
2013-01-04 09:53   
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/eea37a82abc2 [^]

Maturity status: Test
(0055362)
hgbot   
2013-01-04 15:03   
Repository: erp/devel/pi
Changeset: c8724afca806207458ff56c89842c4a612001a4f
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Fri Jan 04 15:01:25 2013 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/c8724afca806207458ff56c89842c4a612001a4f [^]

Fixes issue 5202: Preference can be used in the display logic of the tabs

Now the display logic of the tabs can use preference values (i.e. @#ShowAcct@='Y'), and the visibility of the tabs is going to be determined before the tabs are shown to the user (before this change the tabs visibility was only updated after a record was selected).

Summary of the changes:
-DynamicExpresssionParser: The name of the preferences will not be converted to the inp column format

-ob-view-tab.js.ftl: Adds to the definition of the tab the session attributes. These attributes will be the preference attributes used in the tab display logic

-FormInitializationComponent: Includes in the sessionAttributes of the form the attributes used in the tabs display logic

-OBViewTab.java: Returns a JSON object containing the values of the preferences used in the display logic of the tab

-ob-standard-view.js: If the tab comes with session attributes, they are copied to the session attributes of its form. Modifies the places where updateSubtabVisibility is called to ensure that it is called before the tabs are shown to the client, and after the session attributes of the form have been set after selecting a new record. Also changed the attributes of the call to getContextInfo to ensure that it contains the values of the form session attributes.

---
M modules/org.openbravo.client.application/src/org/openbravo/client/application/DynamicExpressionParser.java
M modules/org.openbravo.client.application/src/org/openbravo/client/application/templates/ob-view-tab.js.ftl
M modules/org.openbravo.client.application/src/org/openbravo/client/application/window/FormInitializationComponent.java
M modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewTab.java
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js
---
(0055363)
AugustoMauch   
2013-01-04 15:06   
Addition to the test plan:
- Test that the tab display logic can use preferences.
- i.e. set the display logic of the Lines tab of the Sales Order window to @#ShowAcct@='n'.

- As F&B admin, open the sales order window. If the value of the ShowAcct property is 'Y', the tab will not be visible at any moment.
(0055365)
hgbot   
2013-01-07 16:57   
Repository: erp/devel/pi
Changeset: 8b729f8ed59a83e72bd91238c30f52665cca8025
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Mon Jan 07 16:57:28 2013 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/8b729f8ed59a83e72bd91238c30f52665cca8025 [^]

Related to issue 5202: Fixed javascript code formatting

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-window.js
---
(0055366)
hudsonbot   
2013-01-08 06:08   
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/a78537bcadbf [^]

Maturity status: Test
(0055367)
hudsonbot   
2013-01-08 06:08   
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/a78537bcadbf [^]

Maturity status: Test
(0055374)
rgoris   
2013-01-08 12:50   
Guys, I just checked for Country and Region. The behavior is still odd. See image. CanĀ“t we just hide the Region tab when the region checkbox is unchecked in the header?
(0055380)
dbaz   
2013-01-08 14:13   
Reviewed @ changeset: 19168 - ea6ae5a9d6e2