[FIX] sale: Translation issue on T&C on Invoices
The sale_note field is translated according to the language of the customer in a SO.
This fix applies the same behavior on the customer invoice.
Inspired from this commit: 978b8f64ec
opw:1830838
This commit is contained in:
@@ -39,6 +39,9 @@ class AccountInvoice(models.Model):
|
||||
def _onchange_delivery_address(self):
|
||||
addr = self.partner_id.address_get(['delivery'])
|
||||
self.partner_shipping_id = addr and addr.get('delivery')
|
||||
if self.env.context.get('type', 'out_invoice') == 'out_invoice':
|
||||
company = self.company_id or self.env.user.company_id
|
||||
self.comment = company.with_context(lang=self.partner_id.lang).sale_note
|
||||
|
||||
@api.multi
|
||||
def action_invoice_paid(self):
|
||||
|
||||
Reference in New Issue
Block a user