From 3f6bd1f61ea5282cb079b862bf7980ae47b2a4f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Antonio=20D=C3=ADaz=20Miralles?= Date: Sat, 13 Dec 2025 12:56:46 +0100 Subject: [PATCH] Ensure that the computed traces of a stock move have a lot For example the production module may include input or output moves without lot. Closes #14396 (grafted from aa1bb0828ed19d9612d40b4fa2a242178edc54ec) --HG-- branch : 7.0 --- modules/stock_lot/stock.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/stock_lot/stock.py b/modules/stock_lot/stock.py index 5b316cd874..96d67b4a4d 100644 --- a/modules/stock_lot/stock.py +++ b/modules/stock_lot/stock.py @@ -256,7 +256,7 @@ class LotTrace(ModelSQL, ModelView): @classmethod def _is_trace_move(cls, move): - return move.state == 'done' + return move.state == 'done' and move.lot @classmethod def _trace_move_order_key(cls, move):