Fixed bug 28999:It's failing access to defined parent buttons in 2th-3th level
authorInigo Sanchez <inigo.sanchez@openbravo.com>
Fri, 13 Mar 2015 11:57:34 +0100
changeset 26177 a102d4101225
parent 26176 d237126a011d
child 26178 3019166d6076
child 26179 1ab24bb1a8cb
Fixed bug 28999:It's failing access to defined parent buttons in 2th-3th level

The problem was related to the previous changes. It had added a wrong condition
that prevented a good behaviour in all cases. The wrong condition is:
"if (!view.parentView && button.view.actionToolbarButtons.containsProperty('property', button.property)) {"

Now, it have been resolved all problems by removing the part of the condition
that checks if a view is parent or not. There was no sense.
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-window.js
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-window.js	Fri Mar 13 02:17:21 2015 +0000
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-window.js	Fri Mar 13 11:57:34 2015 +0100
@@ -439,7 +439,7 @@
             button.readOnlyIf = alwaysReadOnly;
             // set readOnlyIf in actionToolbarButtons because it is required for
             // a good creation of buttonParents of no-active child tabs.
-            if (!view.parentView && button.view.actionToolbarButtons.containsProperty('property', button.property)) {
+            if (button.view.actionToolbarButtons.containsProperty('property', button.property)) {
               for (j = 0; j < view.actionToolbarButtons.length; j++) {
                 buttonParent = view.actionToolbarButtons[j];
                 if (buttonParent.property === button.property) {