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
This commit is contained in:
Cédric Krier
2026-05-08 12:38:14 +02:00
parent 081e7e124f
commit 20b2eceed3
+2
View File
@@ -249,6 +249,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)