[FIX] website_sale_stock_wishlist: add to cart
Current behaviour: When activating "Prevent Sale of Zero Priced Product", zero priced products could still be added to cart, using the wishlist. Expected behaviour: Zero priced products should not be added to cart Steps to reproduce: 1. Activate the setting "Prevent Sale of Zero Priced Product" 2. Create a product with a sales price of zero 3. Go on the product selling page, cannot be added to cart 4. Add the product to your wishlist 5. Go in the wishlist 6. The product can be added to the cart Cause of the issue: add_to_cart_button was overriden Fix: Added condition on override opw-3283057 closes odoo/odoo#122618 X-original-commit: 37ae328e34a964e6daa31193e856322ccd59f597 Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
This commit is contained in:
@@ -46,7 +46,7 @@
|
||||
<xpath expr="//button[@id='add_to_cart_button']" position="replace">
|
||||
<t t-set="is_sold_out"
|
||||
t-value="not wish.product_id.allow_out_of_stock_order and wish.product_id._is_sold_out()"/>
|
||||
<button id="add_to_cart_button"
|
||||
<button t-if="not combination_info['prevent_zero_price_sale']" id="add_to_cart_button"
|
||||
class="btn btn-secondary btn-block o_wish_add mb4"
|
||||
t-att-disabled="is_sold_out">
|
||||
Add
|
||||
|
||||
Reference in New Issue
Block a user