From 7462aae52dffe6215ffbaf8d56927963e3856cbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 8 May 2026 12:38:14 +0200 Subject: [PATCH] Calcule stock move weight on done when required for intrastat The weight may not have been calculated at the creation of the move if the product did not have a weight set at that time. Closes #14824 (grafted from 7e33b59a691fab63634fb6857c537b64d0ec191c) --HG-- branch : 7.0 --- modules/account_stock_eu/stock.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/account_stock_eu/stock.py b/modules/account_stock_eu/stock.py index 0adce5955b..56e59d9563 100644 --- a/modules/account_stock_eu/stock.py +++ b/modules/account_stock_eu/stock.py @@ -248,6 +248,8 @@ class Move(metaclass=PoolMeta): and (not move.intrastat_from_country or not move.intrastat_to_country)): unknown_country.append(move) + if move.intrastat_type and move.internal_weight is None: + move.internal_weight = move.on_change_with_internal_weight() if unknown_country: warning_name = Warning.format( 'intrastat_country', unknown_country)