Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0031404Openbravo ERPA. Platformpublic2015-11-09 10:382016-01-25 19:03
inigosanchez 
caristu 
lowminorhave not tried
closedno change required 
5
 
 
caristu
Core
No
0031404: setItemValue() function should be update "_textualValue" too
In order to simplify the way in which fields are recalculated using setItemValue() the function should update "_textualValue" value too.
Create a callout in client side (as attached file):
- Copy callout3 file at the end of ob-onchange-functions.js file.
- Login as "Openbravo Admin".
- Go to "Windows, Tabs and Fields" window and select "Price List" window.
- Select "Product Price" tab and go to "Field" subtab.
- Edit in form "Price Limit" field:
- Check "Displayed" and "Show in Grid View" checkbox for testing later.
- Also updated "On Change Function" field with following text: OB.OnChange.calcularpreciodia.
- Save the new configuration of "Price Limit" field.
- Logout and Compile.


- Login with "F&B Internation Admin Group".
- Go to "Price List" window and select "Tarifa de Ventas" record.
- Navigate to "Product price" subtab.
- Edit in grid any record and change "Unit Price" value to 2 and "List Price" value to 4.
- Change "Price Limit" value to 3 and change the focus with the mouse or TAB key. Note than "Unit Price" is changed to 4.
- Save the record and note than value in "Unit Price" is wrong because it is the old value.
If it is added this line at the end of callout3 function (attached file) the callout works properly:

    form.setTextualValue('standardPrice', OB.Utilities.Number.OBPlainToOBMasked(lp.getValue(), lp.typeInstance.maskNumeric, lp.typeInstance.decSeparator, lp.typeInstance.groupSeparator, OB.Format.defaultGroupingSize), lp.typeInstance)

This logic should be added in setItemValue() function.
No tags attached.
related to defect 0031189 closed inigosanchez on change function is not working fine when the event is triggered by "TAB" key 
related to defect 0031901 closed caristu decimal value can't be changed by trigger/observer after manual edition in form view 
txt callout3.txt (159) 2015-11-09 10:38
https://issues.openbravo.com/file_download.php?file_id=8702&type=bug
Issue History
2015-11-09 10:38inigosanchezNew Issue
2015-11-09 10:38inigosanchezAssigned To => platform
2015-11-09 10:38inigosanchezFile Added: callout3.txt
2015-11-09 10:38inigosanchezModules => Core
2015-11-09 10:38inigosanchezTriggers an Emergency Pack => No
2015-11-09 10:39inigosanchezRelationship addedrelated to 0031189
2016-01-19 11:10alostaleRelationship addedrelated to 0031901
2016-01-25 19:02caristuAssigned Toplatform => caristu
2016-01-25 19:02caristuStatusnew => acknowledged
2016-01-25 19:02caristuStatusacknowledged => scheduled
2016-01-25 19:03caristuReview Assigned To => caristu
2016-01-25 19:03caristuNote Added: 0083597
2016-01-25 19:03caristuStatusscheduled => closed
2016-01-25 19:03caristuResolutionopen => no change required
2016-01-25 19:03caristuNote Edited: 0083597bug_revision_view_page.php?bugnote_id=0083597#r10762

Notes
(0083597)
caristu   
2016-01-25 19:03   
With the fix of 0031901 setTextualValue() is no longer needed to set values on client side callouts.