OCA/pos

[16.0][pos_stock_available_online] Bad quantity on products list if forecasted sales

MTantin opened this issue · 1 comments

Bad quantity on products list if forecasted sales.

Module

pos_stock_available_online

Describe the bug

PoS don't show the right product quantity after an order if the product is out of stock but forecasted sales is activated.
The quantity is doubled down for each sale.

To Reproduce

Affected versions: 16.0

Steps to reproduce the behavior:

  1. Configure PoS with real-time stock and display produt quantity (cf. figure 1)
  2. Open a new PoS session
  3. Order product with no more available product but still have forecasted quantity (cf figure 2)
  4. Pay the order and go back to products list
  5. Visualization of product quantity is not correct (cf figure 3)

image

image

image

Expected behavior
The good quantity. :)