diff options
| author | Aaron Bohy <aab@odoo.com> | 2017-09-30 10:50:41 +0200 |
|---|---|---|
| committer | Aaron Bohy <aab@odoo.com> | 2017-09-30 15:59:24 +0200 |
| commit | 776bac6a069fc1ef2d6bea0e85a0737e3cefecef (patch) | |
| tree | c54fcc05989722a9acd1ab4ada8e3ad013dbc93d /addons/web/static/src/js/fields | |
| parent | 16eb262c60a3b46f89cb706504a8c2d3dc755e08 (diff) | |
[FIX] web: don't discard x2many rows coming from default_get
Problem occured in the MRP Production wizard (with a consumed
product tracked by serial number). The opened record is a new
record, and its one2many has 2 default rows that are prefilled.
If the user edited one of the quantities in those rows, and set
an invalid value instead (e.g. a letter), the row was removed
without notice when it was focused out. This was because the
model wasn't aware that a change has been done on the record,
and as the record was flagged as new, it was simply abandonned.
Diffstat (limited to 'addons/web/static/src/js/fields')
| -rw-r--r-- | addons/web/static/src/js/fields/abstract_field.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/addons/web/static/src/js/fields/abstract_field.js b/addons/web/static/src/js/fields/abstract_field.js index e25c02f781e..cef45c2a976 100644 --- a/addons/web/static/src/js/fields/abstract_field.js +++ b/addons/web/static/src/js/fields/abstract_field.js @@ -407,6 +407,7 @@ var AbstractField = Widget.extend({ this._isValid = true; } catch (e) { this._isValid = false; + this.trigger_up('set_dirty', {dataPointID: this.dataPointID}); return $.Deferred().reject(); } if (!(options && options.forceChange) && this._isSameValue(value)) { |
