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:
@@ -1,13 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Copyright 2017 Jairo Llopis <jairo.llopis@tecnativa.com>
|
||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
|
||||
|
||||
<templates xml:space="preserve">
|
||||
<t t-extend="FieldMany2One">
|
||||
<t t-jquery="a.oe_m2o_cm_button">
|
||||
jQuery(this).attr('t-if', '!(widget.options.no_open || widget.options.no_open_edit)');
|
||||
<t t-extend="FieldMany2One">
|
||||
<t t-jquery=".oe_m2o_cm_button" t-operation="attributes">
|
||||
<attribute name="t-if">!(widget.options.no_open || widget.options.no_open_edit)</attribute>
|
||||
</t>
|
||||
</t>
|
||||
</t>
|
||||
<t t-extend="FieldMany2ManyTag">
|
||||
<t t-jquery="span.badge">
|
||||
jQuery(this).attr('t-att-data-id', 'el[0]');
|
||||
</t>
|
||||
</t>
|
||||
</templates>
|
||||
|
||||
Reference in New Issue
Block a user