diff options
| author | Martin Trigaux <mat@odoo.com> | 2019-07-22 14:47:52 +0200 |
|---|---|---|
| committer | Martin Trigaux <mat@odoo.com> | 2019-07-22 14:47:52 +0200 |
| commit | 5a6a414e2c5a281df886a2779caf618e5f633ee9 (patch) | |
| tree | 722412d4d6e684d6fcc3ac4c04bc9bb9c21cc8dc /addons/web/static/src/js/views/abstract_controller.js | |
| parent | e532d4df0d3767c7a6dfb0d0e336f332bbdca8b7 (diff) | |
| parent | aadc4a9f0be4a17ab3f25c48ac26feabf9aaab9a (diff) | |
[MERGE] Forward port of saas-12.4 to master up to aadc4a9f0be4
Diffstat (limited to 'addons/web/static/src/js/views/abstract_controller.js')
| -rw-r--r-- | addons/web/static/src/js/views/abstract_controller.js | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/addons/web/static/src/js/views/abstract_controller.js b/addons/web/static/src/js/views/abstract_controller.js index 53bcc0d5bad..07a0109e9a7 100644 --- a/addons/web/static/src/js/views/abstract_controller.js +++ b/addons/web/static/src/js/views/abstract_controller.js @@ -136,8 +136,11 @@ var AbstractController = mvc.Controller.extend(ActionMixin, { * @override */ canBeRemoved: function () { - // AAB: get rid of this option when on_hashchange mechanism is improved - return this.discardChanges(undefined, {readonlyIfRealDiscard: true}); + // AAB: get rid of 'readonlyIfRealDiscard' option when on_hashchange mechanism is improved + return this.discardChanges(undefined, { + noAbandon: true, + readonlyIfRealDiscard: true, + }); }, /** * Discards the changes made on the record associated to the given ID, or @@ -151,9 +154,10 @@ var AbstractController = mvc.Controller.extend(ActionMixin, { * * @param {string} [recordID] * if not given, we consider all the changes made by the controller + * @param {Object} [options] * @returns {Promise} resolved if properly discarded, rejected otherwise */ - discardChanges: function (recordID) { + discardChanges: function (recordID, options) { return Promise.resolve(); }, /** |
