From 95c7bdf84558fc1e3d4a10b75032c3bf1891ca2c Mon Sep 17 00:00:00 2001 From: Eric Antones Date: Sun, 25 Jan 2026 16:19:51 +0100 Subject: [PATCH] [FIX] product: wrong product price update on opening a product pop up from the sale order line --- addons/product/models/product.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/addons/product/models/product.py b/addons/product/models/product.py index 445ecf1064a13..c0c53e02c20e5 100644 --- a/addons/product/models/product.py +++ b/addons/product/models/product.py @@ -261,7 +261,10 @@ def _compute_product_price(self): def _set_product_price(self): for product in self: - if self._context.get('uom'): + if ( + self._context.get('uom') + and 'default_description_sale' not in self._context + ): value = self.env['uom.uom'].browse(self._context['uom'])._compute_price(product.price, product.uom_id) else: value = product.price @@ -270,7 +273,10 @@ def _set_product_price(self): def _set_product_lst_price(self): for product in self: - if self._context.get('uom'): + if ( + self._context.get('uom') + and 'default_description_sale' not in self._context + ): value = self.env['uom.uom'].browse(self._context['uom'])._compute_price(product.lst_price, product.uom_id) else: value = product.lst_price @@ -285,7 +291,10 @@ def _compute_product_price_extra(self): @api.depends_context('uom') def _compute_product_lst_price(self): to_uom = None - if 'uom' in self._context: + if ( + 'uom' in self._context + and 'default_description_sale' not in self._context + ): to_uom = self.env['uom.uom'].browse(self._context['uom']) for product in self: