changeset 13097f51a615 in modules/stock_quantity_early_planning:default
details:
https://hg.tryton.org/modules/stock_quantity_early_planning?cmd=changeset&node=13097f51a615
description:
Do not plan earlier move with negative available quantity
issue11060
review367951002
diffstat:
stock.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diffs (12 lines):
diff -r 3a86f1b29090 -r 13097f51a615 stock.py
--- a/stock.py Sat Dec 18 16:34:36 2021 +0100
+++ b/stock.py Wed Dec 29 12:20:42 2021 +0100
@@ -368,7 +368,7 @@
min_future_product_quantity = min(
p.quantity for p in future_product_quantities)
earlier_date = move.planned_date
- if product_quantities:
+ if product_quantities and product_quantities[0].quantity >= 0:
assert product_quantities[0].date == move.planned_date
# The new date must left the same available
# quantity for other moves at the current date