From a4196923447c0ae50da8643799f1813f9e9330ce Mon Sep 17 00:00:00 2001 From: Vladislav Shepilov Date: Sat, 25 Nov 2017 16:53:17 +0300 Subject: [PATCH] [IMP]: 10.0 added `open_target` option for `open_badge` --- web_m2x_options/static/src/js/form.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web_m2x_options/static/src/js/form.js b/web_m2x_options/static/src/js/form.js index 2ec92a96..c0663215 100644 --- a/web_m2x_options/static/src/js/form.js +++ b/web_m2x_options/static/src/js/form.js @@ -413,6 +413,7 @@ odoo.define('web_m2x_options.web_m2x_options', function (require) { open_badge: function(ev){ var self = this; var open = (self.options && self.is_option_set(self.options.open)); + var open_target = (self.options && self.options.open_target !== undefined && self.options.open_target || "new"); var no_color_picker = (self.options && self.is_option_set(self.options.no_color_picker)); if(open){ self.mutex.exec(function(){ @@ -422,7 +423,7 @@ odoo.define('web_m2x_options.web_m2x_options', function (require) { res_model: self.field.relation, views: [[false, 'form']], res_id: id, - target: "new" + target: open_target }); }.bind(this)); }else if(no_color_picker){