details:   https://code.tryton.org/tryton/commit/cab701fb5ded
branch:    default
user:      Cédric Krier <[email protected]>
date:      Mon Oct 13 18:32:01 2025 +0200
description:
        Use list price used to calculate the base price of sale discount

        Closes #14288
diffstat:

 modules/sale_discount/sale.py |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (14 lines):

diff -r 96b6fec7e199 -r cab701fb5ded modules/sale_discount/sale.py
--- a/modules/sale_discount/sale.py     Fri Oct 17 14:51:15 2025 +0200
+++ b/modules/sale_discount/sale.py     Mon Oct 13 18:32:01 2025 +0200
@@ -57,8 +57,8 @@
     def compute_base_price(self):
         pool = Pool()
         Uom = pool.get('product.uom')
-        if self.product and self.product.list_price is not None:
-            price = self.product.list_price
+        if (self.product
+                and (price := self.product.list_price_used) is not None):
             if self.unit:
                 price = Uom.compute_price(
                     self.product.default_uom, price, self.unit)

Reply via email to