Skip to content
Snippets Groups Projects
Commit bf4b5962 authored by Thomas Lefebvre (thle)'s avatar Thomas Lefebvre (thle)
Browse files

[FIX] website_sale, website_sale_stock: prevent out of stock


Steps to reproduce:
- create a product;
- disable the continue selling option for the out-of-stock;
- do not have a stock quantity for this product.
- go to ecommerce;
- without click on the product, add it in the cart with the cart icon (on the picture).

Issue:
It is possible to add the product to the cart.
If we repeat this several times, we will create quotations.

Solution:
Hide the button if the product is a storable product
and we don't want to sell it if we have no stock.
We also check the quantity available.

opw-3148069

closes odoo/odoo#119982

X-original-commit: 37c7c02b83c2257278e78d218e7a4098a5630c33
Signed-off-by: default avatarLefebvre Thomas (thle) <thle@odoo.com>
Signed-off-by: default avatarAntoine Vandevenne (anv) <anv@odoo.com>
parent 6dd2bc61
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment