summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views/basic/basic_controller.js
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2017-08-02 12:31:05 +0200
committerChristophe Simonis <chs@odoo.com>2017-08-02 12:31:05 +0200
commitfcfb4782b6d93348bd2028fef9da335f6a953c05 (patch)
tree2705dbbf0deabf19c80faae27ed15eb47883b04d /addons/web/static/src/js/views/basic/basic_controller.js
parentc1d22b6c3c605d894130251c4417b684d7cf1b54 (diff)
parenta445548f07fbf8d883f4b02e18a35f4b324c6961 (diff)
[MERGE] forward port branch saas-17 up to a445548f07f
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.js25
1 files changed, 1 insertions, 24 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 cc72816a85d..3a47f65ab03 100644
--- a/addons/web/static/src/js/views/basic/basic_controller.js
+++ b/addons/web/static/src/js/views/basic/basic_controller.js
@@ -8,7 +8,6 @@ odoo.define('web.BasicController', function (require) {
*/
var AbstractController = require('web.AbstractController');
-var concurrency = require('web.concurrency');
var core = require('web.core');
var Dialog = require('web.Dialog');
var FieldManagerMixin = require('web.FieldManagerMixin');
@@ -19,7 +18,6 @@ var _t = core._t;
var BasicController = AbstractController.extend(FieldManagerMixin, {
custom_events: _.extend({}, AbstractController.prototype.custom_events, FieldManagerMixin.custom_events, {
discard_changes: '_onDiscardChanges',
- mutexify: '_onMutexify',
reload: '_onReload',
sidebar_data_asked: '_onSidebarDataAsked',
translate: '_onTranslate',
@@ -39,7 +37,6 @@ var BasicController = AbstractController.extend(FieldManagerMixin, {
FieldManagerMixin.init.call(this, this.model);
this.handle = params.initialState.id;
this.mode = params.mode || 'readonly';
- this.mutex = new concurrency.Mutex();
},
/**
* @override
@@ -238,7 +235,7 @@ var BasicController = AbstractController.extend(FieldManagerMixin, {
var recordID = record.data.id;
this.trigger_up('execute_action', {
action_data: _.extend({}, attrs, {
- context: record.getContext({additionalContext: attrs.context}),
+ context: record.getContext({additionalContext: attrs.context || {}}),
}),
model: record.model,
res_ids: [recordID],
@@ -362,17 +359,6 @@ var BasicController = AbstractController.extend(FieldManagerMixin, {
};
},
/**
- * Used by list and kanban views to determine whether or not to display
- * the no content helper (if there is no data in the state to display)
- *
- * @private
- * @param {Object} state
- * @returns {boolean}
- */
- _hasContent: function (state) {
- return state.count !== 0;
- },
- /**
* Helper function to display a warning that some fields have an invalid
* value. This is used when a save operation cannot be completed.
*
@@ -538,15 +524,6 @@ var BasicController = AbstractController.extend(FieldManagerMixin, {
FieldManagerMixin._onFieldChanged.apply(this, arguments);
},
/**
- * @private
- * @param {OdooEvent} ev
- * @param {function} ev.data.action the function to execute in the mutex
- */
- _onMutexify: function (ev) {
- ev.stopPropagation(); // prevent other controllers from handling this request
- this.mutex.exec(ev.data.action);
- },
- /**
* When a reload event triggers up, we need to reload the full view.
* For example, after a form view dialog saved some data.
*