From bdd7912e284e076ba2fa730f541d23f6dbbf3f10 Mon Sep 17 00:00:00 2001 From: Albert Cervera i Areny Date: Thu, 1 Apr 2021 16:37:27 +0200 Subject: [PATCH] Rename zip into postal code (issue9853) --- invoice.py | 4 ++-- locale/ca.po | 4 ++-- locale/es.po | 4 ++-- message.xml | 4 ++-- template_facturae_macros.xml | 4 ++-- tests/test_account_invoice_facturae.py | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/invoice.py b/invoice.py index 3fdfa64..2eb3f92 100644 --- a/invoice.py +++ b/invoice.py @@ -281,7 +281,7 @@ class Invoice(metaclass=PoolMeta): if (not self.company.party.addresses or not self.company.party.addresses[0].street - or not self.company.party.addresses[0].zip + or not self.company.party.addresses[0].postal_code or not self.company.party.addresses[0].city or not self.company.party.addresses[0].subdivision or not self.company.party.addresses[0].country): @@ -303,7 +303,7 @@ class Invoice(metaclass=PoolMeta): party=self.party.rec_name, invoice=self.rec_name)) if (not self.invoice_address.street - or not self.invoice_address.zip + or not self.invoice_address.postal_code or not self.invoice_address.city or not self.invoice_address.subdivision or not self.invoice_address.country): diff --git a/locale/ca.po b/locale/ca.po index 4214455..43af3b0 100644 --- a/locale/ca.po +++ b/locale/ca.po @@ -84,7 +84,7 @@ msgstr "Genera Factura-e" msgctxt "model:ir.message,text:company_address_fields" msgid "" -"Missing Street, Zip, City, Subdivision or Country in default address of " +"Missing Street, Postal Code, City, Subdivision or Country in default address of " "company\\'s Party \"%(party)s\"." msgstr "" "Falta el carrer, codi postal, ciutat, província o país de la direcció per " @@ -124,7 +124,7 @@ msgstr "" msgctxt "model:ir.message,text:invoice_address_fields" msgid "" -"Missing Street, Zip, City, Subdivision or Country in Invoice Address of " +"Missing Street, Postal Code, City, Subdivision or Country in Invoice Address of " "invoice \"%(invoice)s\"." msgstr "" "Falta el carrer, codi postal, ciutat, subdivisió o país a l'adreça de la " diff --git a/locale/es.po b/locale/es.po index 985aef6..3a42afd 100644 --- a/locale/es.po +++ b/locale/es.po @@ -85,7 +85,7 @@ msgstr "Generar Factura-e" msgctxt "model:ir.message,text:company_address_fields" msgid "" -"Missing Street, Zip, City, Subdivision or Country in default address of " +"Missing Street, Postal Code, City, Subdivision or Country in default address of " "company\\'s Party \"%(party)s\"." msgstr "" "Falta la calle, código postal, ciudad, provincia o país de la dirección por " @@ -125,7 +125,7 @@ msgstr "" msgctxt "model:ir.message,text:invoice_address_fields" msgid "" -"Missing Street, Zip, City, Subdivision or Country in Invoice Address of " +"Missing Street, Postal Code, City, Subdivision or Country in Invoice Address of " "invoice \"%(invoice)s\"." msgstr "" "Falta la calle, código postal, ciudad, província o país de la dirección de " diff --git a/message.xml b/message.xml index 6de3669..a708622 100644 --- a/message.xml +++ b/message.xml @@ -10,7 +10,7 @@ this repository contains the full copyright notices and license terms. --> Missing VAT Identifier in company\'s Party "%(party)s", or its length is not between 3 and 30. - Missing Street, Zip, City, Subdivision or Country in default address of company\'s Party "%(party)s". + Missing Street, Postal Code, City, Subdivision or Country in default address of company\'s Party "%(party)s". Missing some Factura-e fields in party "%(party)s" of invoice "%(invoice)s": "%(field)s" @@ -23,7 +23,7 @@ this repository contains the full copyright notices and license terms. --> They must to be separated by one space: Name Surname. - Missing Street, Zip, City, Subdivision or Country in Invoice Address of invoice "%(invoice)s". + Missing Street, Postal Code, City, Subdivision or Country in Invoice Address of invoice "%(invoice)s". No rate found for currency "%(currency)s" on "%(date)s" diff --git a/template_facturae_macros.xml b/template_facturae_macros.xml index 1e14853..5493bbc 100644 --- a/template_facturae_macros.xml +++ b/template_facturae_macros.xml @@ -21,7 +21,7 @@ {% if address.country and address.country.code == 'ES' %}
{{ address.street[:80] }}
- {{ address.zip[:5] }} + {{ address.postal_code[:5] }} {{ address.city[:50] }} {{ address.subdivision.name[:20] }} {{ address.country.code3 }} @@ -29,7 +29,7 @@ {% else %}
{{ address.street[:80] }}
- {{ (', '.join([address.zip, address.city]))[:50] }} + {{ (', '.join([address.postal_code, address.city]))[:50] }} {{ address.subdivision.name[:20] }} {{ address.country.code3 }}
diff --git a/tests/test_account_invoice_facturae.py b/tests/test_account_invoice_facturae.py index 604ab69..682881a 100644 --- a/tests/test_account_invoice_facturae.py +++ b/tests/test_account_invoice_facturae.py @@ -122,7 +122,7 @@ class TestAccountInvoiceFacturaeCase(ModuleTestCase): company_address, = company.party.addresses company_address.street = 'street' - company_address.zip = '08201' + company_address.postal_code = '08201' company_address.city = 'City' company_address.subdivision = subdivision company_address.country = country @@ -140,7 +140,7 @@ class TestAccountInvoiceFacturaeCase(ModuleTestCase): 'party': party.id, 'street': 'St sample, 15', 'city': 'City', - 'zip': '08201', + 'postal_code': '08201', 'subdivision': subdivision.id, 'country': country.id, }