Related with issue 35658: Codereview take into account all the cases
authorInigo Sanchez <inigo.sanchez@openbravo.com>
Mon, 24 Apr 2017 12:06:00 +0200
changeset 31977 9b4f2a32e438
parent 31976 b4e2c3368a10
child 31978 a49574c6de23
Related with issue 35658: Codereview take into account all the cases

Now it is take into account when a parameter window with grid is opened from the menu.
Rest of the cases sucha as grid, form and parameter window from a button is working as
expected too.
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-number.js
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-number.js	Mon Apr 24 10:25:52 2017 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-number.js	Mon Apr 24 12:06:00 2017 +0200
@@ -42,7 +42,8 @@
   },
 
   changed: function (form, item, value) {
-    var isParamWindow = form.grid && form.grid.view && form.grid.view.paramWindow;
+    var view = form.grid ? form.grid.view : form.view,
+        isParamWindow = view.theForm && view.theForm.paramWindow;
     if (!isParamWindow && item && item.setValue) {
       item.setValue(this.getEnteredValue());
     }