-
-
Notifications
You must be signed in to change notification settings - Fork 489
/
website_sale_template.xml
30 lines (30 loc) · 1.28 KB
/
website_sale_template.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="product_price" inherit_id="website_sale.product_price">
<xpath expr="//div[@itemprop='offers']" position="attributes">
<attribute name="t-if">
website.website_show_price
</attribute>
</xpath>
</template>
<template id="products_item" inherit_id="website_sale.products_item">
<xpath expr="//div[@itemprop='offers']" position="attributes">
<attribute name="t-if">
product.product_variant_ids and website.website_show_price
</attribute>
</xpath>
</template>
<!-- Hide Add To Cart Button and quantity selector if not website_show_price -->
<template id="product" inherit_id="website_sale.product">
<xpath expr="//a[@id='add_to_cart']" position="attributes">
<attribute name="t-if">
website.website_show_price
</attribute>
</xpath>
<xpath expr="//div[hasclass('css_quantity')]" position="attributes">
<attribute name="t-if">
website.website_show_price
</attribute>
</xpath>
</template>
</odoo>