Fixed bug 37587: Opening tab with display logic using aux input appears empty.
authorJavier Armendáriz <javier.armendariz@openbravo.com>
Fri, 02 Feb 2018 10:13:13 +0100
changeset 33394 18388657f3c0
parent 33393 e4712f47df43
child 33395 53ef76edf845
Fixed bug 37587: Opening tab with display logic using aux input appears empty.

ShowTabIf logic applied only if the view does not come from a direct link call. This fixed the issue with no wait until the contextInfo is fully loaded.
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js	Mon Feb 05 10:16:55 2018 +0100
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js	Fri Feb 02 10:13:13 2018 +0100
@@ -1750,7 +1750,7 @@
         // session attributes of the form
         contextInfo = this.getContextInfo(false, true, true);
         this.addPreferenceValues(contextInfo, tabViewPane);
-        if (tabViewPane.showTabIf && !(tabViewPane.showTabIf(contextInfo))) {
+        if (!this.isOpenedByDirectLink() && tabViewPane.showTabIf && !(tabViewPane.showTabIf(contextInfo))) {
           this.childTabSet.tabBar.members[i].hide();
           tabViewPane.hidden = true;
         } else {
@@ -1792,6 +1792,10 @@
     }
   },
 
+  isOpenedByDirectLink: function () {
+    return this.standardWindow.targetRecordId;
+  },
+
   //This function returns true if it is a new record and it is being edited
   isEditingNewRecord: function () {
     var form = this.isShowingForm ? this.viewForm : this.viewGrid.getEditForm();