details:   https://code.tryton.org/tryton/commit/7e33b59a691f
branch:    default
user:      Cédric Krier <[email protected]>
date:      Fri May 08 12:38:14 2026 +0200
description:
        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
diffstat:

 modules/account_stock_eu/stock.py |  2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diffs (12 lines):

diff -r c905132eab05 -r 7e33b59a691f modules/account_stock_eu/stock.py
--- a/modules/account_stock_eu/stock.py Mon May 18 17:45:32 2026 +0200
+++ b/modules/account_stock_eu/stock.py Fri May 08 12:38:14 2026 +0200
@@ -249,6 +249,8 @@
                     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)

Reply via email to