Add depedencies.

Upgrade translations.
Improves error handling.
#036198
This commit is contained in:
Carlos G?lvez 2018-12-13 12:14:02 +01:00
parent c795ce8c6f
commit b65b118e33
4 changed files with 18 additions and 5 deletions

View File

@ -22,7 +22,10 @@ class Invoice(metaclass=PoolMeta):
cls._error_messages.update({ cls._error_messages.update({
'missing_facturae_party_info': ( 'missing_facturae_party_info': (
'Missing Factura-e info in party "%(party)s", ' '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 @classmethod
@ -66,7 +69,7 @@ class Invoice(metaclass=PoolMeta):
}) })
if not self.invoice_address.electronet_sale_point: 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, 'party': party.rec_name,
'field': 'Electronet Sale Point' 'field': 'Electronet Sale Point'
}) })

View File

@ -6,8 +6,17 @@ msgctxt "error:account.invoice:"
msgid "" msgid ""
"Missing Factura-e info in party \"%(party)s\", review the tab Factura-e of " "Missing Factura-e info in party \"%(party)s\", review the tab Factura-e of "
"this party: \"%(field)s\"" "this party: \"%(field)s\""
msgstr "Información Factura-e faltante en el tercero \"%(party)s\", revisa en la pestaña" msgstr ""
"Factura-e del tercero el campo: \"%(field)s\"." "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:" msgctxt "field:party.address,electronet_sale_point:"
msgid "Electronet Sale Point" msgid "Electronet Sale Point"

View File

@ -227,7 +227,7 @@
<DeliveryNotesReferences> <DeliveryNotesReferences>
{% for shipment in line.shipments %} {% for shipment in line.shipments %}
<DeliveryNote> <DeliveryNote>
<DeliveryNoteNumber>{{ shipment.reference or '' }}</DeliveryNoteNumber> <DeliveryNoteNumber>{{ shipment.origin_reference or '' }}</DeliveryNoteNumber>
</DeliveryNote> </DeliveryNote>
{% endfor %} {% endfor %}
</DeliveryNotesReferences> </DeliveryNotesReferences>

View File

@ -4,5 +4,6 @@ depends:
ir ir
account_invoice_facturae account_invoice_facturae
account_invoice_sale_relation account_invoice_sale_relation
stock_origin_sale
xml: xml:
party.xml party.xml