trytond-patches/party_identifier_migration....

18 lines
710 B
Diff

diff -r a2ce49dfb9fd party.py
--- a/trytond/trytond/modules/party/party.py Mon May 06 15:04:56 2019 +0200
+++ b/trytond/trytond/modules/party/party.py Sun Jun 23 15:53:05 2019 +0200
@@ -458,8 +345,11 @@
continue
for type in Party.tax_identifier_types():
module = get_cc_module(*type.split('_', 1))
- if module.is_valid(code):
- break
+ try:
+ if module and module.is_valid(code):
+ break
+ except:
+ pass
else:
type = None
identifiers.append(