related to issue 27240: added missing check for date parameters
authorCarlos Aristu <carlos.aristu@openbravo.com>
Wed, 02 Dec 2015 11:13:07 +0100
changeset 28089 d17c2694db1c
parent 28088 9b3efdffbb5f
child 28090 ae274ef69cf6
child 28091 b178a4410127
child 28281 58d983958370
related to issue 27240: added missing check for date parameters

The date parameters has their own method to set their value properly. This is now being taken into account in the setValueProgrammatically method.
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/process/ob-parameter-window-form.js
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/process/ob-parameter-window-form.js	Wed Dec 02 10:33:15 2015 +0100
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/process/ob-parameter-window-form.js	Wed Dec 02 11:13:07 2015 +0100
@@ -38,8 +38,12 @@
 
   setItems: function (itemList) {
     itemList.forEach(function (item) {
-      item.setValueProgrammatically = function () {
-        this.Super('setValue', arguments);
+      item.setValueProgrammatically = function (value) {
+        if (this.setDateParameterValue) {
+          this.setDateParameterValue(value);
+        } else if (this.setValue) {
+          this.setValue(value);
+        }
         if (this.onChangeFunction && this.view && this.view.theForm) {
           this.view.theForm.handleItemChange(item);
         }