Skip to content
Snippets Groups Projects
Commit c400789d authored by rde's avatar rde Committed by Jeremy Kersten
Browse files

[FIX] website_sale_stock(_option): prevent negative stock & traceback

Before this commit, multiple tabs/session adding items to cart  could lead to
negative stock displayed in the quantity field.
In some case, it could throw a traceback because the wanted product had
became unavailable in the meantime, causing the cart to be updated and the
line to be deleted from the cart. But then, this line was being accessed again.

Now, negative values are prevented at the screen. And there is a check on the
line record to be sure it exists before accessing it.
parent 945f05a3
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