[FIX] purchase: keep context
Modify the existing context instead of replacing it. Closes #22400 opw-806661
This commit is contained in:
committed by
Nicolas Martinelli
parent
ae6037e17a
commit
c5586134a3
@@ -765,10 +765,10 @@ class PurchaseOrderLine(models.Model):
|
||||
self.product_uom = self.product_id.uom_po_id or self.product_id.uom_id
|
||||
result['domain'] = {'product_uom': [('category_id', '=', self.product_id.uom_id.category_id.id)]}
|
||||
|
||||
product_lang = self.product_id.with_context({
|
||||
'lang': self.partner_id.lang,
|
||||
'partner_id': self.partner_id.id,
|
||||
})
|
||||
product_lang = self.product_id.with_context(
|
||||
lang=self.partner_id.lang,
|
||||
partner_id=self.partner_id.id,
|
||||
)
|
||||
self.name = product_lang.display_name
|
||||
if product_lang.description_purchase:
|
||||
self.name += '\n' + product_lang.description_purchase
|
||||
|
||||
Reference in New Issue
Block a user