summaryrefslogtreecommitdiff
path: root/addons/web/static/src
diff options
context:
space:
mode:
authorNicolas Lempereur <nle@odoo.com>2018-09-12 17:34:56 +0200
committerNicolas Lempereur <nle@odoo.com>2018-09-12 17:43:39 +0200
commitdb0e84f3e364919baf7bb32ba0d44f10a0f76187 (patch)
tree5f56fe36e60db9892366f6d95df893b71867549e /addons/web/static/src
parent8e15dc87a4b89182e36f5ed6e0f78121a0a8f43f (diff)
[FIX] web: revert ignore default_* on group creation
This reverts commit 4cb585ab4f880147fbe35eb988c3c1da9728f624. When creating from the kanban view: - crm.stage - hr.recruitment.stage - project.task.type - helpdesk.type - mrp.eco.stage We go from a dashboard of eg. "GroupRecord" named "group_id" in the record. And when a stage is created, "default_group_id" is used. With the change the stage was not linked to the current "grouping". We could probably use "search_default_group_id" instead but the behavior may be present in existing customization. opw-1884217 closes #26943
Diffstat (limited to 'addons/web/static/src')
-rw-r--r--addons/web/static/src/js/views/kanban/kanban_model.js6
1 files changed, 1 insertions, 5 deletions
diff --git a/addons/web/static/src/js/views/kanban/kanban_model.js b/addons/web/static/src/js/views/kanban/kanban_model.js
index 40c78ef9efc..7d47a081b0a 100644
--- a/addons/web/static/src/js/views/kanban/kanban_model.js
+++ b/addons/web/static/src/js/views/kanban/kanban_model.js
@@ -60,15 +60,11 @@ var KanbanModel = BasicModel.extend({
if (!groupByField || groupByField.type !== 'many2one') {
return $.Deferred().reject(); // only supported when grouped on m2o
}
- // ignore action default which may be for another model
- var context = _.pick(parent.context, function (value, key) {
- return key.slice(0,8) !== 'default_';
- });
return this._rpc({
model: groupByField.relation,
method: 'name_create',
args: [name],
- context: context, // todo: combine with view context
+ context: parent.context, // todo: combine with view context
})
.then(function (result) {
var newGroup = self._makeDataPoint({