55 lines
2.2 KiB
XML
55 lines
2.2 KiB
XML
<?xml version="1.0" encoding="utf-8" ?>
|
|
<odoo>
|
|
<template id="products_attributes" inherit_id="website_sale.products_attributes">
|
|
<xpath expr="//t[@t-foreach='attributes']/div" position="attributes">
|
|
<attribute
|
|
name="t-if"
|
|
>a.value_ids.filtered(lambda v: v.visible_in_ecommerce) and len(a.value_ids.filtered(lambda v: v.visible_in_ecommerce)) > 1
|
|
</attribute>
|
|
</xpath>
|
|
<xpath
|
|
expr="//t[@t-if="a.display_type == 'select'"]//t"
|
|
position="attributes"
|
|
>
|
|
<attribute
|
|
name="t-foreach"
|
|
>a.value_ids.filtered(lambda v: v.visible_in_ecommerce)</attribute>
|
|
</xpath>
|
|
<xpath
|
|
expr="//t[@t-if="a.display_type == 'radio' or a.display_type == 'pills'"]//t"
|
|
position="attributes"
|
|
>
|
|
<attribute
|
|
name="t-foreach"
|
|
>a.value_ids.filtered(lambda v: v.visible_in_ecommerce)</attribute>
|
|
</xpath>
|
|
<xpath
|
|
expr="//div[@t-if="a.display_type == 'color'"]//t"
|
|
position="attributes"
|
|
>
|
|
<attribute
|
|
name="t-foreach"
|
|
>a.value_ids.filtered(lambda v: v.visible_in_ecommerce)</attribute>
|
|
</xpath>
|
|
</template>
|
|
<template id="o_wsale_offcanvas" inherit_id="website_sale.o_wsale_offcanvas">
|
|
<xpath expr="//t[@t-foreach='attributes']//div" position="attributes">
|
|
<attribute
|
|
name="t-if"
|
|
>a.value_ids.filtered(lambda v: v.visible_in_ecommerce) and len(a.value_ids.filtered(lambda v: v.visible_in_ecommerce)) > 1</attribute>
|
|
</xpath>
|
|
<xpath expr="//div[@t-foreach='a.value_ids']" position="attributes">
|
|
<attribute
|
|
name="t-foreach"
|
|
>a.value_ids.filtered(lambda v: v.visible_in_ecommerce)</attribute>
|
|
</xpath>
|
|
<xpath
|
|
expr="//t[@t-foreach='attributes']//div[hasclass('accordion-body')]//t[@t-foreach='a.value_ids']"
|
|
position="attributes"
|
|
>
|
|
<attribute
|
|
name="t-foreach"
|
|
>a.value_ids.filtered(lambda v: v.visible_in_ecommerce)</attribute>
|
|
</xpath>
|
|
</template>
|
|
</odoo>
|