details: https://code.openbravo.com/erp/devel/pi/rev/03ae6a2f5ea3 changeset: 18967:03ae6a2f5ea3 user: Augusto Mauch <augusto.mauch <at> openbravo.com> date: Tue Dec 04 17:05:12 2012 +0100 summary: Fixes issue 22438: Display logic works fine for new records
The problem was caused a by change done in [1], where some call to this.setValue were changed to this.setItemValue. The setItemValue function was not updating the value if the original value of the field was undefined and the new value was null. [1] https://code.openbravo.com/erp/devel/pi/rev/f786d405627ea5465bb6a330af5aed800790ca6d diffstat: modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diffs (21 lines): diff -r ebca3ab5ca86 -r 03ae6a2f5ea3 modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js --- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js Tue Dec 04 16:18:21 2012 +0100 +++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js Tue Dec 04 17:05:12 2012 +0100 @@ -1121,7 +1121,7 @@ // calls setValue and the onchange handling setItemValue: function (item, value) { - var currentValue, view, isGridItem, completeFieldsLength, i; + var currentValue, view, isGridItem, completeFieldsLength, i, undef; if (isc.isA.String(item)) { @@ -1151,7 +1151,7 @@ currentValue = item.getValue(); // no change go away - if (item.compareValues(value, currentValue)) { + if (currentValue !== undef && item.compareValues(value, currentValue)) { // Force setElemntValue even there is no change to show new possible values // in field.valueMap (issue #18957) item.setElementValue(item.mapValueToDisplay(value)); ------------------------------------------------------------------------------ LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d _______________________________________________ Openbravo-commits mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openbravo-commits
