diff --git a/base_vat_optional_vies/README.rst b/base_vat_optional_vies/README.rst index 9a1d3eea1..2ece8acab 100644 --- a/base_vat_optional_vies/README.rst +++ b/base_vat_optional_vies/README.rst @@ -21,7 +21,8 @@ Configuration ============= In order to activate VIES validation, you must set this option in your company: -Settings > Companies > Companies > Your Company > Configuration > Accounting > VIES VAT Check +Settings > Companies > Companies > Your Company > Configuration > Accounting +> VIES VAT Check Usage @@ -46,10 +47,10 @@ bypass country validation you can use "EU" code Bug Tracker =========== -Bugs are tracked on `GitHub Issues `_. -In case of trouble, please check there if your issue has already been reported. -If you spotted it first, help us smashing it by providing a detailed and welcomed feedback -`here `_. +Bugs are tracked on `GitHub Issues +`_. In case of trouble, please +check there if your issue has already been reported. If you spotted it first, +help us smashing it by providing a detailed and welcomed feedback. Credits @@ -60,6 +61,7 @@ Contributors * Rafael Blasco * Antonio Espinosa +* Sergio Teruel Maintainer diff --git a/base_vat_optional_vies/__init__.py b/base_vat_optional_vies/__init__.py index ab13a6219..cde864bae 100644 --- a/base_vat_optional_vies/__init__.py +++ b/base_vat_optional_vies/__init__.py @@ -1,5 +1,3 @@ # -*- coding: utf-8 -*- -# License AGPL-3: Antiun Ingenieria S.L. - Antonio Espinosa -# See README.rst file on addon root folder for more details from . import models diff --git a/base_vat_optional_vies/__openerp__.py b/base_vat_optional_vies/__openerp__.py index 08f8dfe36..d2f05aa79 100644 --- a/base_vat_optional_vies/__openerp__.py +++ b/base_vat_optional_vies/__openerp__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# License AGPL-3: Antiun Ingenieria S.L. - Antonio Espinosa +# License AGPL-3: Tecnativa S.L. - Antonio Espinosa # See README.rst file on addon root folder for more details { @@ -16,8 +16,9 @@ 'views/res_partner_view.xml', ], 'author': 'Antiun IngenierĂ­a S.L., ' + 'Tecnativa,' 'Odoo Community Association (OCA)', - 'website': 'http://www.antiun.com', + 'website': 'http://www.tecnativa.com', 'license': 'AGPL-3', 'images': [], 'installable': True, diff --git a/base_vat_optional_vies/models/__init__.py b/base_vat_optional_vies/models/__init__.py index 31fca90e8..6097f3ebf 100644 --- a/base_vat_optional_vies/models/__init__.py +++ b/base_vat_optional_vies/models/__init__.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- -# License AGPL-3: Antiun Ingenieria S.L. - Antonio Espinosa # See README.rst file on addon root folder for more details from . import res_partner diff --git a/base_vat_optional_vies/models/res_partner.py b/base_vat_optional_vies/models/res_partner.py index 20c7668e0..4f1141251 100644 --- a/base_vat_optional_vies/models/res_partner.py +++ b/base_vat_optional_vies/models/res_partner.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# License AGPL-3: Antiun Ingenieria S.L. - Antonio Espinosa +# License AGPL-3: Tecnativa S.L. - Antonio Espinosa # See README.rst file on addon root folder for more details import logging @@ -52,7 +52,7 @@ class ResPartner(models.Model): vat_country = 'XX' vat_number = vat if vat and re.match(r'[A-Za-z]{2}', vat): - vat_country = vat[:2].upper() + vat_country = vat[:2].lower() vat_number = vat[2:].replace(' ', '') elif country: vat_country = country @@ -89,7 +89,7 @@ class ResPartner(models.Model): # Can not be sure that this VAT is signed up in VIES data['vies_passed'] = False if res: - vat = country_code + vat_number + vat = country_code.upper() + vat_number if self.vat != vat: data['vat'] = vat if data: @@ -123,7 +123,7 @@ class ResPartner(models.Model): if self.vies_passed: data['vies_passed'] = False if res: - vat = country_code + vat_number + vat = country_code.upper() + vat_number if self.vat != vat: data['vat'] = vat if data: diff --git a/base_vat_optional_vies/tests/__init__.py b/base_vat_optional_vies/tests/__init__.py index 64a6a530b..db0b977db 100644 --- a/base_vat_optional_vies/tests/__init__.py +++ b/base_vat_optional_vies/tests/__init__.py @@ -1,5 +1,3 @@ # -*- coding: utf-8 -*- -# License AGPL-3: Antiun Ingenieria S.L. - Antonio Espinosa -# See README.rst file on addon root folder for more details from . import test_res_partner diff --git a/base_vat_optional_vies/tests/test_res_partner.py b/base_vat_optional_vies/tests/test_res_partner.py index 50dbd2e42..8aae1fd7d 100644 --- a/base_vat_optional_vies/tests/test_res_partner.py +++ b/base_vat_optional_vies/tests/test_res_partner.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# License AGPL-3: Antiun Ingenieria S.L. - Antonio Espinosa +# License AGPL-3: Tecnativa S.L. - Antonio Espinosa # See README.rst file on addon root folder for more details from openerp.tests.common import TransactionCase