[FW][FIX] website_sale: display zero-priced products with price extras
Versions
- 16.0+
Steps
- Create a zero-priced product template;
- add some attribute values;
- configure price extras for the attributes;
- configure eCommerce to prevent sale of zero-priced products;
- go to eCommerce products page.
Issue
Product is displayed as "Not Available For Sale," even though you can click on it, select a price-extra attribute, add it to cart, and purchase it.
Cause
The template doesn't consider potential price_extra attributes when displaying the not available message.
Solution
Add a t-elif element to the template, checking if the product has any non-zero price-extra attribute values, if so, don't display the not available message, but also don't display the zero price.
opw-4225183
Forward-Port-Of: odoo/odoo#184576 Forward-Port-Of: odoo/odoo#184052
@lvsz @Feyensv this PR targets master and is the last of the forward-port chain containing:
- odoo/odoo#184627
To merge the full chain, use
@robodoo r+
More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port
robodoo r+
