[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
This commit is contained in:
Nicolas Lempereur
2018-03-13 12:24:58 +01:00
parent c921d94236
commit 088e3d2fec
@@ -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,