Fixed issue 34950: A null check condition added
authorNaroa Iriarte <naroa.iriarte@openbravo.com>
Mon, 16 Jan 2017 09:46:35 +0100
changeset 31485 9a02f5f50ace
parent 31484 2c1823b1139d
child 31486 d8929499d9ff
child 31970 56f761f893a5
Fixed issue 34950: A null check condition added


There was the following condition in ob-parameter-window-view.js "if(this.button.multiProcess)...". The problem here is that there is no a null check for the "this.button" and in the cases of opening other pick and execute window inside another one was failing because the view could not be refreshed.
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/process/ob-parameter-window-view.js
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/process/ob-parameter-window-view.js	Tue Jan 10 07:24:48 2017 -0500
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/process/ob-parameter-window-view.js	Mon Jan 16 09:46:35 2017 +0100
@@ -290,7 +290,7 @@
         }
       };
       if (refreshParent) {
-        if (this.button.multiRecord) {
+        if (this.button && this.button.multiRecord) {
           this.buttonOwnerView.refresh(afterRefreshCallback);
         } else {
           if (this.callerField && this.callerField.view && typeof this.callerField.view.onRefreshFunction === 'function') {