[IMP] website_sale{_wishlist,}: add tax indication option

Adds a new option to display whether VAT is included/excluded next to
the price on product pages.

TaskId-2906053

closes odoo/odoo#99628

Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
This commit is contained in:
Alexandre de Pape (alpa)
2022-09-19 12:23:05 +02:00
committed by William Braeckman
parent f5edde3624
commit 1ec789d4df
3 changed files with 25 additions and 4 deletions
@@ -230,15 +230,22 @@
data-customize-website-views="website_sale.product_quantity"
data-no-preview="true"
data-reload="/"/>
<we-checkbox string="Tax Indication"
data-customize-website-views="website_sale.tax_indication"
data-no-preview="true"
data-reload="/"/>
<we-select data-name="variants_opt" groups="product.group_product_variant" string="Variants" data-no-preview="true" data-reload="/">
<we-button data-name="variants_options_opt" data-customize-website-views="">Options</we-button>
<we-button data-name="variants_products_list_opt" data-customize-website-views="website_sale.product_variants">Products List</we-button>
</we-select>
<we-row string="Cart" class="o_we_full_row" data-name="o_wsale_buy_now_opt">
<we-button title="Buy Now" class="fa fa-fw fa-bolt o_we_buy_now_btn"
<we-button title="Buy Now" class="o_we_buy_now_btn"
data-customize-website-views="website_sale.product_buy_now"
data-no-preview="true"
data-reload="/"/>
data-reload="/">
<i class="fa fa-fw fa-bolt"/>
Buy Now
</we-button>
</we-row>
<!-- Image config -->
<we-button-group string="Images Width" data-no-preview="true" data-reload="/">
+11
View File
@@ -1101,6 +1101,15 @@
</xpath>
</template>
<template id="website_sale.tax_indication" active="False">
<span groups="account.group_show_line_subtotals_tax_excluded" class="h6 text-muted">
VAT Excluded
</span>
<span groups="account.group_show_line_subtotals_tax_included" class="h6 text-muted">
VAT Included
</span>
</template>
<template id="product_price">
<div itemprop="offers" itemscope="itemscope" itemtype="http://schema.org/Offer" t-attf-class="product_price mt-2 mb-3 {{'d-none' if combination_info['prevent_zero_price_sale'] else 'd-inline-block'}}">
<h3 class="css_editable_mode_hidden">
@@ -1111,6 +1120,7 @@
t-esc="combination_info['list_price']" t-options="{'widget': 'monetary', 'display_currency': website.currency_id}"
itemprop="listPrice"
/>
<t t-if="is_view_active('website_sale.tax_indication')" t-call="website_sale.tax_indication"/>
<del t-if="product.compare_list_price">
<span t-field="product.compare_list_price"
groups="website_sale.group_product_price_comparison"
@@ -1126,6 +1136,7 @@
"widget": "monetary",
"display_currency": product.currency_id,
}'/>
<t t-if="is_view_active('website_sale.tax_indication')" t-call="website_sale.tax_indication"/>
<del t-if="product.compare_list_price">
<span t-field="product.compare_list_price"
groups="website_sale.group_product_price_comparison"
@@ -19,10 +19,13 @@
data-reload="/"/>
</xpath>
<xpath expr="//we-button[hasclass('o_we_buy_now_btn')]" position="after">
<we-button title="Wishlist" class="fa fa-fw fa-heart"
<we-button title="Wishlist"
data-customize-website-views="website_sale_wishlist.product_add_to_wishlist"
data-no-preview="true"
data-reload="/"/>
data-reload="/">
<i class="fa fa-fw fa-heart"/>
Wishlist
</we-button>
</xpath>
</template>