[10.0][ADD] option to deactivate color picker on many2many_tags (#713)

This commit is contained in:
Akim Juillerat
2017-09-05 09:47:23 +02:00
committed by Pedro M. Baeza
parent 544a25c1ac
commit ecc615eb9e
3 changed files with 10 additions and 1 deletions

View File

@@ -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);
}