Add missing match_none argument to carrier match for subdivision

Closes #12835
(grafted from a0a01264db21e988026837d21bad5ea0b76e91dd)

--HG--
branch : 6.0
This commit is contained in:
Cédric Krier
2023-12-14 19:26:23 +01:00
parent a428bf1057
commit 5282a40e6c
+2 -2
View File
@@ -43,7 +43,7 @@ class Selection(metaclass=PoolMeta):
"the carrier delivers to.\n"
"Leave empty to allow delivery to any postal code.")
def match(self, pattern):
def match(self, pattern, match_none=False):
pool = Pool()
Subdivision = pool.get('country.subdivision')
@@ -80,4 +80,4 @@ class Selection(metaclass=PoolMeta):
if (self.to_postal_code is not None
and not re.search(self.to_postal_code, to_postal_code)):
return False
return super().match(pattern)
return super().match(pattern, match_none=match_none)