changeset 0c79fe867adc in modules/stock_quantity_early_planning:6.2
details:
https://hg.tryton.org/modules/stock_quantity_early_planning?cmd=changeset&node=0c79fe867adc
description:
Do not plan earlier move with negative available quantity
issue11060
review367951002
(grafted from 13097f51a615d7eaf995f93ad3fe950fd817fe74)
diffstat:
stock.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diffs (12 lines):
diff -r 03026c27735a -r 0c79fe867adc stock.py
--- a/stock.py Sat Jan 01 17:49:13 2022 +0100
+++ b/stock.py Wed Dec 29 12:20:42 2021 +0100
@@ -318,7 +318,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