[FIX] purchase: Description is changed after quantity is modified if seller is set

TT36008

closes odoo/odoo#90056

X-original-commit: d696f070c6a0412236816a9f36ebba8b15ab0cf2
Signed-off-by: Arnold Moyaux <arm@odoo.com>
This commit is contained in:
Carlos Dauden
2022-04-29 11:01:55 +02:00
committed by Arnold Moyaux
parent def3b8e408
commit 1cbacccf69
+2 -1
View File
@@ -1232,7 +1232,8 @@ class PurchaseOrderLine(models.Model):
self.price_unit = price_unit
product_ctx = {'seller_id': seller.id, 'lang': get_lang(self.env, self.partner_id.lang).code}
self.name = self._get_product_purchase_description(self.product_id.with_context(product_ctx))
if seller.product_name:
self.name = self._get_product_purchase_description(self.product_id.with_context(product_ctx))
@api.onchange('product_id', 'product_qty', 'product_uom')
def _onchange_suggest_packaging(self):