[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:
Goffin Simon
2018-04-12 11:57:29 +02:00
parent 2b380e4e39
commit 9bf1f97d9b
+3
View File
@@ -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):