summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src/js/editor/transcoder.js
diff options
context:
space:
mode:
authorAlexandre Kühn <aku@odoo.com>2018-06-13 15:21:13 +0200
committerAlexandre Kühn <aku@odoo.com>2018-06-15 17:36:27 +0200
commitc53b0ac18880bbb5687d2da203aa160f31946092 (patch)
tree961aa7870b5a20bd67139fca66fc8c00596e5190 /addons/web_editor/static/src/js/editor/transcoder.js
parentb09b3d54d445794ed4cb7299ce4986178fe710ec (diff)
[FIX] web: do no drop invalid record in list on discard
Revision on b09f0c99 The intent of the previous commit was to no drop records in a list on discard in the following cases: - when they have been created from a `default_get` - when they have been created from an `onchange` that result from a `default_get` Before the commit above, the kind of records that were abandoned in those cases are stated as invalid, which happens when a record has a required field that is empty. The case of an `onchange` that is not involved in a `default_get` was not considered in the fixes above. In fact, this is the intent behaviour in most cases. However, if the items in the list are created from such an `onchange`, we should not drop them. This commit fixes the bug where records in a list that are created from an `onchange` are wrongly abandoned. Here is the new logic to abandon a record on discard in a list: - the record that is marked as "do not abandon" should not be abandoned; - a record that is registered as a "not new addition" in the list should not be dropped; - a record that is registered as a "new addition" in the list, and has been updated afterwards, should not be dropped; - a record that is not new should not be dropped; opw-806650
Diffstat (limited to 'addons/web_editor/static/src/js/editor/transcoder.js')
0 files changed, 0 insertions, 0 deletions