From f65538a7167e077e90c251f53d87efb2e413ff48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sat, 2 Mar 2019 22:56:01 +0100 Subject: [PATCH] Include all identifiers from python-stdnum issue7906 review72371002 --- invoice.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/invoice.py b/invoice.py index 97c0cc0fa9..5a1a19bcc8 100644 --- a/invoice.py +++ b/invoice.py @@ -227,7 +227,7 @@ class Invoice(Workflow, ModelSQL, ModelView, TaxableMixin): ] cls.tax_identifier.domain = [ ('party', '=', Eval('company_party', -1)), - ('type', 'in', cls._tax_identifier_types()), + ('type', 'in', cls.tax_identifier_types()), ] cls.tax_identifier.depends += ['company_party'] cls._transitions |= set(( @@ -1005,12 +1005,12 @@ class Invoice(Workflow, ModelSQL, ModelView, TaxableMixin): return Sequence.get_id(sequence.id) @classmethod - def _tax_identifier_types(cls): - return ['eu_vat'] + def tax_identifier_types(cls): + return Pool().get('party.party').tax_identifier_types() def get_tax_identifier(self): "Return the default computed tax identifier" - types = self._tax_identifier_types() + types = self.tax_identifier_types() for identifier in self.company.party.identifiers: if identifier.type in types: return identifier.id