odoo icon indicating copy to clipboard operation
odoo copied to clipboard

[FW][FIX] website_sale: display zero-priced products with price extras

Open fw-bot opened this issue 1 year ago • 2 comments

Versions

  • 16.0+

Steps

  1. Create a zero-priced product template;
  2. add some attribute values;
  3. configure price extras for the attributes;
  4. configure eCommerce to prevent sale of zero-priced products;
  5. 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

fw-bot avatar Oct 21 '24 21:10 fw-bot

Pull request status dashboard

robodoo avatar Oct 21 '24 21:10 robodoo

@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

fw-bot avatar Oct 21 '24 21:10 fw-bot

robodoo r+

lvsz avatar Oct 22 '24 07:10 lvsz