Skip to content

Commit 832b041

Browse files
committed
[FIX] website_sale: Remove original price if prevent sale
If prevent zero sale is active, prices should be hidden from the page opw-4650460 closes #204595 X-original-commit: 991de47 Related: odoo/enterprise#82800 Signed-off-by: Lina Eweis (liew) <liew@odoo.com>
1 parent 94d74bf commit 832b041

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

addons/website_sale/models/product_template.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -563,6 +563,11 @@ def _get_additionnal_combination_info(self, product_or_template, quantity, date,
563563
),
564564
})
565565

566+
if combination_info['prevent_zero_price_sale']:
567+
# If price is zero and prevent_zero_price_sale is enabled we don't want to send any
568+
# price information regarding the product
569+
combination_info['compare_list_price'] = 0
570+
566571
return combination_info
567572

568573
@api.model

addons/website_sale/views/templates.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1782,6 +1782,7 @@
17821782
</del>
17831783
</div>
17841784
<div
1785+
t-if="editable"
17851786
name="product_list_price_container"
17861787
class="css_non_editable_mode_hidden decimal_precision h3"
17871788
t-att-data-precision="str(website.currency_id.decimal_places)"

0 commit comments

Comments
 (0)