diff options
| author | qsm-odoo <qsm@odoo.com> | 2017-05-04 16:56:57 +0200 |
|---|---|---|
| committer | qsm-odoo <qsm@odoo.com> | 2017-05-08 14:02:40 +0200 |
| commit | 0764bc41aa0d28e2a6dcbf6d169d3f8ea092a627 (patch) | |
| tree | 4d2343bc2f7c856f8badf9d0dc16ff1cdbd04ae8 /addons/web/static/src/js/fields/special_fields.js | |
| parent | c8d77f93e5a857acd22025f4a8d4d42d674479d1 (diff) | |
[FIX] web: list rendering was not properly updated after discard
Before this commit, when hitting the "Discard" button in an editable
list view, the line switched to readonly mode but with the undiscarded
data (even though the data was properly discarded and not saved).
Fortunately, the fix is in fact making the save/discard/update system
more consistent. Here are some reasons why:
- the `_confirmSave` method is now used after a save or a discard
(while it was before only called on readonly views where a change
was made by a special field widget).
- Abandonning a record (discarding a new unsaved one), is now the
responsability of `discardChanges` (and not `_setMode`).
- The renderer `updateState` method is used when its state is updated.
- ...
Note that setting the renderer mode is now taking care of deferreds
properly (the widgets deferred are now considered when switching
a row to readonly/edit mode).
Diffstat (limited to 'addons/web/static/src/js/fields/special_fields.js')
0 files changed, 0 insertions, 0 deletions
