From b65b118e33f37e915b113127ceceb6a8ffb1ff5c Mon Sep 17 00:00:00 2001 From: Carlos G?lvez Date: Thu, 13 Dec 2018 12:14:02 +0100 Subject: [PATCH] Add depedencies. Upgrade translations. Improves error handling. #036198 --- invoice.py | 7 +++++-- locale/es.po | 13 +++++++++++-- template_facturae_3.2.xml | 2 +- tryton.cfg | 1 + 4 files changed, 18 insertions(+), 5 deletions(-) diff --git a/invoice.py b/invoice.py index bd8cd40..b6c2a27 100644 --- a/invoice.py +++ b/invoice.py @@ -22,7 +22,10 @@ class Invoice(metaclass=PoolMeta): cls._error_messages.update({ 'missing_facturae_party_info': ( 'Missing Factura-e info in party "%(party)s", ' - 'review the tab Factura-e of this party: "%(field)s"') + 'review the tab Factura-e of this party: "%(field)s"'), + 'missing_facturae_party_address_info': ( + 'Missing Factura-e info in party "%(party)s", ' + 'review the tab General of this party: "%(field)s"') }) @classmethod @@ -66,7 +69,7 @@ class Invoice(metaclass=PoolMeta): }) if not self.invoice_address.electronet_sale_point: - self.raise_user_error('missing_facturae_party_info', { + self.raise_user_error('missing_facturae_party_address_info', { 'party': party.rec_name, 'field': 'Electronet Sale Point' }) diff --git a/locale/es.po b/locale/es.po index bb34179..857479b 100644 --- a/locale/es.po +++ b/locale/es.po @@ -6,8 +6,17 @@ msgctxt "error:account.invoice:" msgid "" "Missing Factura-e info in party \"%(party)s\", review the tab Factura-e of " "this party: \"%(field)s\"" -msgstr "Información Factura-e faltante en el tercero \"%(party)s\", revisa en la pestaña" -"Factura-e del tercero el campo: \"%(field)s\"." +msgstr "" +"Información Factura-e faltante en el tercero \"%(party)s\", revisa en la " +"pestaña Factura-e del tercero el campo: \"%(field)s\"." + +msgctxt "error:account.invoice:" +msgid "" +"Missing Factura-e info in party \"%(party)s\", review the tab General of " +"this party: \"%(field)s\"" +msgstr "" +"Información Factura-e faltante en el tercero \"%(party)s\", revisa en la " +"pestaña General del tercero el campo: \"%(field)s\"." msgctxt "field:party.address,electronet_sale_point:" msgid "Electronet Sale Point" diff --git a/template_facturae_3.2.xml b/template_facturae_3.2.xml index a917d46..337a9c3 100644 --- a/template_facturae_3.2.xml +++ b/template_facturae_3.2.xml @@ -227,7 +227,7 @@ {% for shipment in line.shipments %} - {{ shipment.reference or '' }} + {{ shipment.origin_reference or '' }} {% endfor %} diff --git a/tryton.cfg b/tryton.cfg index 7a7a8ad..36b76f7 100644 --- a/tryton.cfg +++ b/tryton.cfg @@ -4,5 +4,6 @@ depends: ir account_invoice_facturae account_invoice_sale_relation + stock_origin_sale xml: party.xml