details: https://code.openbravo.com/erp/devel/pi/rev/818b602af1d9
changeset: 17765:818b602af1d9
user: Augusto Mauch <augusto.mauch <at> openbravo.com>
date: Sun Aug 26 23:51:29 2012 +0200
summary: Fixes issue 21375: Line Net Amount saved properly
When saving in the grid a record just after modifying a dynamic column, the
hidden columns were not being properly saved. Now when the results of the
callbacks are applied, the hidden fields are also considered.
diffstat:
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js
| 5 +++
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js
| 14 ++++++++++
2 files changed, 19 insertions(+), 0 deletions(-)
diffs (39 lines):
diff -r 651aee1979d0 -r 818b602af1d9
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
Fri Aug 24 18:33:48 2012 +0200
+++
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js
Sun Aug 26 23:51:29 2012 +0200
@@ -1085,6 +1085,11 @@
gridEditInformation.grid.setEditValue(gridEditInformation.editRow, prop,
null, true, true);
}
+ if (!field) {
+ // Look in the complete fields, the column might be hidden
+ field = this.grid.getFieldFromColumnName(columnName);
+ }
+
// store the textualvalue so that it is correctly send back to the server
if (field) {
// Adjust to formatting if exists value and classicValue.
diff -r 651aee1979d0 -r 818b602af1d9
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js
---
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js
Fri Aug 24 18:33:48 2012 +0200
+++
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js
Sun Aug 26 23:51:29 2012 +0200
@@ -2719,6 +2719,20 @@
this.getEditForm().doChangeFICCall(null, true);
}
this.Super('fieldStateChanged', arguments);
+ },
+
+ getFieldFromColumnName: function (columnName) {
+ var i, field, length, fields = this.completeFields;
+
+ length = fields.length;
+
+ for (i = 0; i < fields.length; i++) {
+ if (fields[i].columnName === columnName) {
+ field = fields[i];
+ break;
+ }
+ }
+ return field;
}
});
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits