From 49bd15c94e884454af91a1ce26946b56870c9ee2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 8 Apr 2024 12:13:33 +0200 Subject: [PATCH] Fill tax rule pattern with default empty countries A rule line for a country is not expected to be used when the country is unknown. Closes #13169 --- modules/account_tax_rule_country/account.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/account_tax_rule_country/account.py b/modules/account_tax_rule_country/account.py index 7b38cefb71..39e9be9827 100644 --- a/modules/account_tax_rule_country/account.py +++ b/modules/account_tax_rule_country/account.py @@ -19,6 +19,8 @@ class TaxRule(metaclass=PoolMeta): subdivision = subdivision.parent pattern = pattern.copy() + pattern.setdefault('from_country') + pattern.setdefault('to_country') for name in ['from_subdivision', 'to_subdivision']: subdivision = pattern.pop(name, None) if not subdivision: