From 9eadf2085f86a1d76b9fdf21659ddf64c5deaa5d Mon Sep 17 00:00:00 2001 From: Zakaria Makrelouf Date: Thu, 2 Feb 2017 13:30:29 +0100 Subject: [PATCH] [FIX]web_m2x_options: s/ev.handleObj.selector/currentTarget * many2many with `options={'open': True}` it always open the first element with this fix it will open the right one --- web_m2x_options/static/src/js/form.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web_m2x_options/static/src/js/form.js b/web_m2x_options/static/src/js/form.js index f2a28172..4b8d0ad1 100644 --- a/web_m2x_options/static/src/js/form.js +++ b/web_m2x_options/static/src/js/form.js @@ -412,7 +412,7 @@ odoo.define('web_m2x_options.web_m2x_options', function (require) { var open = (self.options && self.is_option_set(self.options.open)); if(open){ self.mutex.exec(function(){ - var id = parseInt($(ev.handleObj.selector).attr('data-id')); + var id = parseInt($(ev.currentTarget).data('id')); self.do_action({ type: 'ir.actions.act_window', res_model: self.field.relation,