Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0027240Openbravo ERPA. Platformpublic2014-07-30 18:252015-12-11 08:46
umartirena 
caristu 
highmajoralways
closedfixed 
5
 
3.0PR16Q1 
alostale
Core
No
0027240: On Change Function does not take effect in not editable fields in Process Definition windows
If a function is defined in On Change Function field on a parameter of a Process Definition window and this parameter is not editable, while the value of the parameter is changed the On Change Function is not executed. This happens because the function is only triggered on onblur.
Go to Process Definition Window and define an On Change Function for difference parameter in Add Payment process.
Go to Payment In window and create a Header with amount 0.
Click on Add Payment. Check that "There is a difference" parameter is 0.00.
Put Actual Payment 30.
Deselect all lines in Order/Invoices grid if some where selected.
Check that "There is a difference" parameter is 30.00.
Realize that is has changed but the On Change Function it hasn't been executed.
No tags attached.
related to defect 0029544 closed caristu onChange event does not work fine using Date parameters in Process Definition 
Issue History
2014-07-30 18:25umartirenaNew Issue
2014-07-30 18:25umartirenaAssigned To => AugustoMauch
2014-07-30 18:25umartirenaModules => Core
2014-07-30 18:25umartirenaTriggers an Emergency Pack => No
2015-03-11 11:24alostalePriorityurgent => high
2015-03-11 11:24alostaleStatusnew => acknowledged
2015-03-17 14:37alostaleAssigned ToAugustoMauch => platform
2015-11-27 15:32caristuAssigned Toplatform => caristu
2015-11-27 15:32caristuStatusacknowledged => scheduled
2015-12-02 09:29caristuReview Assigned To => alostale
2015-12-02 09:29caristuIssue Monitored: alostale
2015-12-02 09:29hgbotCheckin
2015-12-02 09:29hgbotNote Added: 0082515
2015-12-02 09:29hgbotStatusscheduled => resolved
2015-12-02 09:29hgbotResolutionopen => fixed
2015-12-02 09:29hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/0a811f99d7f816312ef1cbfbf7831ad584d5ca8d [^]
2015-12-02 09:46caristuNote Added: 0082516
2015-12-02 10:01hgbotCheckin
2015-12-02 10:01hgbotNote Added: 0082517
2015-12-02 10:42caristuRelationship addedrelated to 0029544
2015-12-02 11:05caristuNote Deleted: 0082516
2015-12-02 11:13hgbotCheckin
2015-12-02 11:13hgbotNote Added: 0082523
2015-12-02 11:31caristuNote Added: 0082529
2015-12-02 20:07hudsonbotCheckin
2015-12-02 20:07hudsonbotNote Added: 0082552
2015-12-02 20:07hudsonbotCheckin
2015-12-02 20:07hudsonbotNote Added: 0082553
2015-12-02 20:07hudsonbotCheckin
2015-12-02 20:07hudsonbotNote Added: 0082555
2015-12-11 08:46alostaleNote Added: 0082670
2015-12-11 08:46alostaleStatusresolved => closed
2015-12-11 08:46alostaleFixed in Version => 3.0PR16Q1

Notes
(0082515)
hgbot   
2015-12-02 09:29   
Repository: erp/devel/pi
Changeset: 0a811f99d7f816312ef1cbfbf7831ad584d5ca8d
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Wed Dec 02 09:27:26 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/0a811f99d7f816312ef1cbfbf7831ad584d5ca8d [^]

fixes issue 27240: On Change Function in Process Definition non editable fields

The handleItemChange method is the method in charge of execute the on change function on onblur. This event is not fired when setting the value of a field programmatically. To solve this, a new method has been introduced in the API: setValueAndHandleItemChange() which invokes handleItemChange() after setting the value of a the field.

This method will be available automatically just for those Process Definition fields with an on change function assigned to them through the application dictionary.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/process/ob-parameter-window-form.js
---
(0082517)
hgbot   
2015-12-02 10:01   
Repository: erp/devel/pi
Changeset: 2ad48c10e4ea991b4b933a84934da25918120dc6
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Wed Dec 02 10:00:19 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/2ad48c10e4ea991b4b933a84934da25918120dc6 [^]

related to issue 27240: improvements in new method

make the method available for all parameters, this way it can be used in general. The handleItemChange() will only be executed if the parameter has an On Change Function

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/process/ob-parameter-window-form.js
---
(0082523)
hgbot   
2015-12-02 11:13   
Repository: erp/devel/pi
Changeset: d17c2694db1c398ffcce5fddd4ebda9d6ce3e6a8
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Wed Dec 02 11:13:07 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/d17c2694db1c398ffcce5fddd4ebda9d6ce3e6a8 [^]

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.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/process/ob-parameter-window-form.js
---
(0082529)
caristu   
2015-12-02 11:31   
Updated the wiki page: http://wiki.openbravo.com/wiki/How_to_create_a_Standard_Process_Definition#How_to_set_the_value_of_non-grid_parameters_programmatically [^]
(0082552)
hudsonbot   
2015-12-02 20:07   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/ae274ef69cf6 [^]
Maturity status: Test
(0082553)
hudsonbot   
2015-12-02 20:07   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/ae274ef69cf6 [^]
Maturity status: Test
(0082555)
hudsonbot   
2015-12-02 20:07   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/ae274ef69cf6 [^]
Maturity status: Test
(0082670)
alostale   
2015-12-11 08:46   
code reviewed + tested