[FIX] account: translate invoce line desc
opw-1922531 Before this commit, the product's description for customers was not translated in the invoice. Now, the product's description for customers is translated in the invoice. closes odoo/odoo#30107
This commit is contained in:
@@ -1712,17 +1712,17 @@ class AccountInvoiceLine(models.Model):
|
||||
self.price_unit = 0.0
|
||||
domain['uom_id'] = []
|
||||
else:
|
||||
self_lang = self
|
||||
if part.lang:
|
||||
product = self.product_id.with_context(lang=part.lang)
|
||||
else:
|
||||
product = self.product_id
|
||||
|
||||
self_lang = self.with_context(lang=part.lang)
|
||||
|
||||
product = self_lang.product_id
|
||||
account = self.get_invoice_line_account(type, product, fpos, company)
|
||||
if account:
|
||||
self.account_id = account.id
|
||||
self._set_taxes()
|
||||
|
||||
product_name = self._get_invoice_line_name_from_product()
|
||||
product_name = self_lang._get_invoice_line_name_from_product()
|
||||
if product_name != None:
|
||||
self.name = product_name
|
||||
|
||||
|
||||
Reference in New Issue
Block a user