Rename contact to invoice_contact

issue8992
This commit is contained in:
Raimon Esteve 2022-03-10 09:37:39 +01:00
parent e628c76ec8
commit d1f1212e82
5 changed files with 12 additions and 11 deletions

View File

@ -42,9 +42,9 @@ msgctxt "field:sale.sale,allowed_contacts:"
msgid "Allowed Contact"
msgstr "Contactes permesos"
msgctxt "field:sale.sale,contact:"
msgid "Contact"
msgstr "Contacte"
msgctxt "field:sale.sale,invoice_contact:"
msgid "Invoice Contact"
msgstr "Contacte factura"
msgctxt "help:sale.sale,allowed_contacts:"
msgid "Allowed relation types for the related contact."

View File

@ -42,9 +42,9 @@ msgctxt "field:sale.sale,allowed_contacts:"
msgid "Allowed Contact"
msgstr "Contactos permitidos"
msgctxt "field:sale.sale,contact:"
msgid "Contact"
msgstr "Contacto"
msgctxt "field:sale.sale,invoice_contact:"
msgid "Invoice Contact"
msgstr "Contacto factura"
msgctxt "help:sale.sale,allowed_contacts:"
msgid "Allowed relation types for the related contact."

View File

@ -31,6 +31,7 @@ class Sale(ContactMixin, metaclass=PoolMeta):
def _get_invoice_sale(self):
invoice = super(Sale, self)._get_invoice_sale()
if self.contact:
invoice.contact = self.contact
if self.invoice_contact:
if self.invoice_contact in invoice.allowed_invoice_contacts:
invoice.invoice_contact = self.invoice_contact
return invoice

View File

@ -3,7 +3,7 @@
this repository contains the full copyright notices and license terms. -->
<data>
<xpath expr="/form/field[@name='shipment_address']" position="after">
<label name="contact"/>
<field name="contact"/>
<label name="invoice_contact"/>
<field name="invoice_contact"/>
</xpath>
</data>

View File

@ -3,6 +3,6 @@
this repository contains the full copyright notices and license terms. -->
<data>
<xpath expr="/tree/field[@name='party']" position="after">
<field name="contact"/>
<field name="invoice_contact"/>
</xpath>
</data>