summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views/abstract_controller.js
diff options
context:
space:
mode:
authorMartin Trigaux <mat@odoo.com>2019-07-22 10:05:49 +0000
committerMartin Trigaux <mat@odoo.com>2019-07-22 10:05:49 +0000
commitaadc4a9f0be4a17ab3f25c48ac26feabf9aaab9a (patch)
tree3b9dd52a473cc11d3a211c19ae62e8416ef6ef70 /addons/web/static/src/js/views/abstract_controller.js
parent1ebec12dc0f5b2a431a52b89909a949529e0b6ad (diff)
parentfe4caecb59dd9a4456bbf40563a842ca7e318307 (diff)
[MERGE] Forward port of saas-12.3 to saas-12.4 up to fe4caecb59d
closes odoo/odoo#35059 Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Diffstat (limited to 'addons/web/static/src/js/views/abstract_controller.js')
-rw-r--r--addons/web/static/src/js/views/abstract_controller.js10
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 2a27ad03e92..74e1a239790 100644
--- a/addons/web/static/src/js/views/abstract_controller.js
+++ b/addons/web/static/src/js/views/abstract_controller.js
@@ -122,8 +122,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
@@ -137,9 +140,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();
},
/**