diff --git a/web_m2x_options/README.rst b/web_m2x_options/README.rst index f0e78aa4..0013a2ba 100644 --- a/web_m2x_options/README.rst +++ b/web_m2x_options/README.rst @@ -72,6 +72,10 @@ in the field's options dict Makes many2many_tags buttons that open the linked resource +``no_color_picker`` *boolean* (Default: ``False``) + + Deactivates the color picker on many2many_tags buttons to do nothing (ignored if open is set) + ir.config_parameter options --------------------------- diff --git a/web_m2x_options/__manifest__.py b/web_m2x_options/__manifest__.py index ac436e6a..fd51b416 100644 --- a/web_m2x_options/__manifest__.py +++ b/web_m2x_options/__manifest__.py @@ -2,7 +2,7 @@ { "name": 'web_m2x_options', - "version": "10.0.1.0.0", + "version": "10.0.1.1.0", "depends": [ 'base', 'web', diff --git a/web_m2x_options/static/src/js/form.js b/web_m2x_options/static/src/js/form.js index e3cc0b5e..fb8ce8d0 100644 --- a/web_m2x_options/static/src/js/form.js +++ b/web_m2x_options/static/src/js/form.js @@ -405,6 +405,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 no_color_picker = (self.options && self.is_option_set(self.options.no_color_picker)); if(open){ self.mutex.exec(function(){ var id = parseInt($(ev.currentTarget).data('id'), 10); @@ -416,6 +417,10 @@ odoo.define('web_m2x_options.web_m2x_options', function (require) { target: "new" }); }.bind(this)); + }else if(no_color_picker){ + self.mutex.exec(function(){ + return + }.bind(this)); }else{ self.open_color_picker(ev); }