mirror of https://github.com/OCA/web.git
[10.0][ADD] option to deactivate color picker on many2many_tags (#713)
parent
419ff89222
commit
2fe11f9f93
|
@ -72,6 +72,10 @@ in the field's options dict
|
||||||
|
|
||||||
Makes many2many_tags buttons that open the linked resource
|
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
|
ir.config_parameter options
|
||||||
---------------------------
|
---------------------------
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
"name": 'web_m2x_options',
|
"name": 'web_m2x_options',
|
||||||
"version": "10.0.1.0.0",
|
"version": "10.0.1.1.0",
|
||||||
"depends": [
|
"depends": [
|
||||||
'base',
|
'base',
|
||||||
'web',
|
'web',
|
||||||
|
|
|
@ -405,6 +405,7 @@ odoo.define('web_m2x_options.web_m2x_options', function (require) {
|
||||||
open_badge: function(ev){
|
open_badge: function(ev){
|
||||||
var self = this;
|
var self = this;
|
||||||
var open = (self.options && self.is_option_set(self.options.open));
|
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){
|
if(open){
|
||||||
self.mutex.exec(function(){
|
self.mutex.exec(function(){
|
||||||
var id = parseInt($(ev.currentTarget).data('id'), 10);
|
var id = parseInt($(ev.currentTarget).data('id'), 10);
|
||||||
|
@ -416,6 +417,10 @@ odoo.define('web_m2x_options.web_m2x_options', function (require) {
|
||||||
target: "new"
|
target: "new"
|
||||||
});
|
});
|
||||||
}.bind(this));
|
}.bind(this));
|
||||||
|
}else if(no_color_picker){
|
||||||
|
self.mutex.exec(function(){
|
||||||
|
return
|
||||||
|
}.bind(this));
|
||||||
}else{
|
}else{
|
||||||
self.open_color_picker(ev);
|
self.open_color_picker(ev);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue