From 8d2f37ec8bd42d6e593cdbcaec3028cce1730274 Mon Sep 17 00:00:00 2001 From: niv-openerp Date: Mon, 7 Oct 2013 13:56:38 +0200 Subject: [PATCH] wip bzr revid: nicolas.vanhoren@openerp.com-20131007115638-9b82rw1azwjtp5fr --- addons/web/static/src/js/view_form.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index 859c78d..06c700e 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -5721,19 +5721,16 @@ instance.web.form.X2ManyCounter = instance.web.form.AbstractField.extend(instanc var context = {}; if (this.field.type === "one2many") { context["default_" + this.field.relation_field] = this.view.datarecord.id; - } else if (this.field.type === "many2many") { - context["default_" + this.field.relation_field] = [6, 0, [this.view.datarecord.id]]; } - context["search_default_"+ this.field.relation_field] = [this.view.datarecord.id]; + var domain = [["id", "in", val]]; return this.do_action({ type: 'ir.actions.act_window', name: this.string, res_model: this.field.relation, - res_id: val.length >= 1 ? val[0] : false, - res_ids: val, views: this.options.views, target: 'current', context: context, + domain: domain, }); }, this)); }, -- 1.7.10.4