odoo/odoo#195721
Created by Bugfix, Levi Siuzdak
Merged
at c8b3f5367853226916e36002ffe7b28e365fd090
Statuses:
- legal/cla: Contributor License Agreement check
- ci/runbot: Odoo Test Suite
- ci/upgrade_enterprise: Test upgrades for enterprise master
- ci/template: Contact runbot team on discord for help.
- ci/style: Optional style check. Ignore it only if strictly necessary.
- ci/security: Required security check. Can only be ignored by security team.
- label
- odoo-dev:16.0-opw-4263554-no_price_strikethrough_on_prevent_zero_price_sale-sile
- head
- e50772fe651d18494e74e15352fb0b1e1ef4c87c
- merged
- 8 months ago by Bugfix, Levi Siuzdak
odoo/odoo | |
---|---|
16.0 | #195721 |
17.0 | #197336 |
saas-17.4 | #197415 |
18.0 | #197418 |
saas-18.1 | #197423 |
saas-18.2 | #198013 |
saas-18.3 | |
saas-18.4 | |
19.0 | |
master | #198040 |
[FIX] website_sale: don't show discount when not available for sale
Versions
- 16.0+
Steps
- Go to Settings / Website;
- enable the following options:
- Comparison Price;
- Pricelists: Advanced price rules;
- Prevent Sale of Zero Priced Product;
- create a pricelist setting all prices to 0;
- make pricelist selectable;
- set pricelist's Discount Policy to Show public price & discount to customer;
- go to
/shop
; - query the search bar.
Issue
A strikethrough price is added, despite the item not being available for sale.
Cause
The _search_render_results_prices
method still checks for has_discounted_price
and compare_list_price
after it already knows the product isn't available for sale.
Solution
If prevent_zero_price_sale
is given for the product, do an early return, disregarding the has_discounted_price
and compare_list_price
options.