diff options
| author | Christophe Simonis <chs@odoo.com> | 2017-10-02 16:44:17 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2017-10-02 16:44:17 +0200 |
| commit | 597ee1c58118bdba5238b4d25cd20467f73d02bd (patch) | |
| tree | f9d908ae30ae13010232e18f5eb2ff3e364fd172 /addons/web/static/src/js/views/basic/basic_controller.js | |
| parent | 1512c1b22993ba66a2cfff36bb92b8babca4cc95 (diff) | |
| parent | afaf7cc7ccf305fd06920512e82f17aca092c01d (diff) | |
[MERGE] forward port branch saas-18 up to afaf7cc7ccf
Diffstat (limited to 'addons/web/static/src/js/views/basic/basic_controller.js')
| -rw-r--r-- | addons/web/static/src/js/views/basic/basic_controller.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/addons/web/static/src/js/views/basic/basic_controller.js b/addons/web/static/src/js/views/basic/basic_controller.js index 481fc0cf4dd..c899530de07 100644 --- a/addons/web/static/src/js/views/basic/basic_controller.js +++ b/addons/web/static/src/js/views/basic/basic_controller.js @@ -19,6 +19,7 @@ var BasicController = AbstractController.extend(FieldManagerMixin, { custom_events: _.extend({}, AbstractController.prototype.custom_events, FieldManagerMixin.custom_events, { discard_changes: '_onDiscardChanges', reload: '_onReload', + set_dirty: '_onSetDirty', sidebar_data_asked: '_onSidebarDataAsked', translate: '_onTranslate', }), @@ -554,6 +555,14 @@ var BasicController = AbstractController.extend(FieldManagerMixin, { } }, /** + * @private + * @param {OdooEvent} ev + */ + _onSetDirty: function (ev) { + ev.stopPropagation(); // prevent other controllers from handling this request + this.model.setDirty(ev.data.dataPointID); + }, + /** * Handler used to get all the data necessary when a custom action is * performed through the sidebar. * |
