diff options
| author | Christophe Simonis <chs@odoo.com> | 2019-09-04 19:32:26 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2019-09-04 19:32:26 +0200 |
| commit | 7a548569c665ae162510e7dc2ea48b16a041262a (patch) | |
| tree | 68782d726176c44c283e36006891090295758ef0 /addons/web/static/src/js/views/form | |
| parent | ae50f2cbbba0a57b47039fcc8a8485dc857fa851 (diff) | |
| parent | 638eac9baea60ee9126043ee0088232a5dee3668 (diff) | |
[MERGE] forward port branch 12.0 up to 638eac9baea
Diffstat (limited to 'addons/web/static/src/js/views/form')
| -rw-r--r-- | addons/web/static/src/js/views/form/form_controller.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/addons/web/static/src/js/views/form/form_controller.js b/addons/web/static/src/js/views/form/form_controller.js index 23adb8568de..cce5b693016 100644 --- a/addons/web/static/src/js/views/form/form_controller.js +++ b/addons/web/static/src/js/views/form/form_controller.js @@ -585,7 +585,9 @@ var FormController = BasicController.extend({ * @private */ _onEdit: function () { - this._setMode('edit'); + // wait for potential pending changes to be saved (done with widgets + // allowing to edit in readonly) + this.mutex.getUnlockedDef().then(this._setMode.bind(this, 'edit')); }, /** * This method is called when someone tries to freeze the order, most likely |
