fixes bug 37016: Disable print/e-mail buttons on record creation in grid view
authorCarlos Aristu <carlos.aristu@openbravo.com>
Thu, 05 Oct 2017 18:31:11 +0200
changeset 32854 496379681c62
parent 32853 1e4b3cd5380e
child 32855 34c067c8eef2
fixes bug 37016: Disable print/e-mail buttons on record creation in grid view
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/toolbar/ob-toolbar.js
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/toolbar/ob-toolbar.js	Thu Oct 05 16:00:35 2017 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/toolbar/ob-toolbar.js	Thu Oct 05 18:31:11 2017 +0200
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2010-2016 Openbravo SLU
+ * All portions are Copyright (C) 2010-2017 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):   Sreedhar Sirigiri (TDS), Mallikarjun M (TDS)
  ************************************************************************
@@ -519,6 +519,9 @@
         if (view.isShowingForm && form.isNew) {
           disabled = true;
         }
+        if (view.isEditingGrid && grid.getEditForm().isNew) {
+          disabled = true;
+        }
         /*
          * Fixes Issue 0023270. The Business partner print button provides statistics about the
          * business partner transactions in a pop up and so handling multiple records are not allowed.
@@ -546,6 +549,9 @@
         if (view.isShowingForm && form.isNew) {
           disabled = true;
         }
+        if (view.isEditingGrid && grid.getEditForm().isNew) {
+          disabled = true;
+        }
         this.setDisabled(disabled);
       },
       keyboardShortcutId: 'ToolBar_Email'