Skip to content

Commit 37f366d

Browse files
committed
[FIX] website_event_sale: enforce show tax inc/exc
**Current behavior:** When enabling the option which specifies that products should be displayed with their prices including tax, the dialog which appears when a user is buying tickets for an event has a label at the top of the window which lists the range of prices for the available tickets. This price range does not include tax irrespective of the status of the aforementioned option. **Expected behavior:** Displayed prices should adhere to the configuration which has been selected in the db settings. **Steps to reproduce:** 1. In the Settings app, give the `Display Product Prices` configuration setting the `Tax Included` selection 2. In the Event app, select an event and give at least one ticket type a nonzero cost 3. Go to the website, select the event which has the modified ticket prices, and click the Register button 4. The label atop the dialog window displays pretax prices **Cause of the issue:** The database setting does not affect anything in the XML which is responsible for displaying this price range label. **Fix:** Set the all_prices value to be calculated respective to the website setting that indicates whether to include or exclude taxes when displaying prices. opw-3734299 closes odoo#157277 X-original-commit: 4e0afec Signed-off-by: Renaud Thiry (reth) <[email protected]>
1 parent 96b2014 commit 37f366d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

addons/website_event_sale/views/website_event_templates.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@
3737
<span t-else="" class="badge text-bg-secondary text-uppercase fs-6">Free</span>
3838
</xpath>
3939
<xpath expr="//div[hasclass('o_wevent_price_range')]" position="inside">
40-
<t t-set="all_prices" t-value="event.event_ticket_ids.mapped('price_reduce')"/>
40+
<t t-if="website.show_line_subtotals_tax_selection == 'tax_excluded'" t-set="all_prices" t-value="event.event_ticket_ids.mapped('price_reduce')"/>
41+
<t t-else="" t-set="all_prices" t-value="event.event_ticket_ids.mapped('price_reduce_taxinc')"/>
4142
<t t-set="lowest_price" t-value="min(all_prices)"/>
4243
<t t-set="highest_price" t-value="max(all_prices)"/>
4344
<t t-if="highest_price > 0">

0 commit comments

Comments
 (0)