summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Lempereur <nle@odoo.com>2018-03-13 10:53:28 +0100
committerNicolas Lempereur <nle@odoo.com>2018-03-13 12:24:58 +0100
commit088e3d2fecb159eebf750b1437cc336b60f2a428 (patch)
treee431ca64498579ed99dc7c49726a2489d41a31e4
parentc921d9423668de77c0e76285a7a4bf9dc4374f47 (diff)
[FIX] website_event_sale: pricelist show no discount
On the website when selling a ticket, a percentage discount may be applied on the ticket price. This percentage is calculated as: {event product price} - {event product price reduced} / {event product price} So with a ticket price 20, a linked product priced 60 reduced to 30, we would get a ticket price 10 on the website. This commit hide the discounted price if the pricelist that is applied was configured as "Discount included in the price". opw-1807889 closes #23611
-rw-r--r--addons/website_event_sale/views/event_templates.xml3
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/website_event_sale/views/event_templates.xml b/addons/website_event_sale/views/event_templates.xml
index 3af11508112..789ea5995b2 100644
--- a/addons/website_event_sale/views/event_templates.xml
+++ b/addons/website_event_sale/views/event_templates.xml
@@ -39,7 +39,8 @@
</t>
<t t-set="price">
<t t-if="ticket.price or editable">
- <t t-if="(ticket.price-website.get_current_pricelist().currency_id.compute(ticket.price_reduce, event.company_id.sudo().currency_id)) &gt; 1">
+ <t t-if="(ticket.price-website.get_current_pricelist().currency_id.compute(ticket.price_reduce, event.company_id.sudo().currency_id)) &gt; 1
+ and website.get_current_pricelist().discount_policy == 'without_discount'">
<del class="text-danger mr4" t-field="ticket.price" t-options='{
"widget": "monetary",
"from_currency": event.company_id.sudo().currency_id,