mirror of
https://github.com/OCA/web.git
synced 2025-02-22 13:21:25 +02:00
Fix Qweb templates. (#561)
* [FIX][web_m2x_options] Fix Qweb templates.
They were trying to replace non-existing elements, and this was being logged to console:
Can't find "a.oe_m2o_cm_button" when extending template FieldMany2One
Can't find "span.badge" when extending template FieldMany2ManyTag
* Raise version correctly.
* [FIX] Make many2many_tags tag deletion work again
* Correct replacement of event
Instead of overwriting all events from upstream widget, better just overwrite the one you need and inherit the rest.
This commit is contained in:
@@ -260,13 +260,9 @@ odoo.define('web_m2x_options.web_m2x_options', function (require) {
|
||||
});
|
||||
|
||||
form_relational.FieldMany2ManyTags.include({
|
||||
events: {
|
||||
'click .o_delete': function(e) {
|
||||
this.remove_id($(e.target).parent().data('id'));
|
||||
},
|
||||
'click .badge': 'open_badge',
|
||||
'mousedown .o_colorpicker span': 'update_color',
|
||||
'focusout .o_colorpicker': 'close_color_picker',
|
||||
init: function () {
|
||||
this.events["click .badge"] = "open_badge";
|
||||
return this._super.apply(this, arguments);
|
||||
},
|
||||
show_error_displayer: function () {
|
||||
if ((typeof this.options.m2o_dialog === 'undefined' && this.can_create) ||
|
||||
|
||||
Reference in New Issue
Block a user