From 4da84d5b3fb11dabcd2a1ebe25838df44125879e Mon Sep 17 00:00:00 2001 From: Sergi Almacellas Abellana Date: Sun, 11 May 2025 01:26:47 +0200 Subject: [PATCH] Fill unknown country only for move with an intrastat type and one empty country Closes #14008 --- modules/account_stock_eu/stock.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/account_stock_eu/stock.py b/modules/account_stock_eu/stock.py index 869263243d..e551ba1dc0 100644 --- a/modules/account_stock_eu/stock.py +++ b/modules/account_stock_eu/stock.py @@ -245,7 +245,7 @@ class Move(metaclass=PoolMeta): unknown_country = [] for move in moves: move._set_intrastat() - if (not move.intrastat_type + if (move.intrastat_type and (not move.intrastat_from_country or not move.intrastat_to_country)): unknown_country.append(move)