Use absolute quantity to compute sale price

Closes #12496
This commit is contained in:
Cédric Krier
2023-08-17 16:30:28 +02:00
parent 982356c4ab
commit 42ba6d2d66
+1 -1
View File
@@ -1523,7 +1523,7 @@ class SaleLine(TaxableMixin, sequence_ordered(), ModelSQL, ModelView):
with Transaction().set_context(
self._get_context_sale_price()):
unit_price = Product.get_sale_price([self.product],
self.quantity or 0)[self.product.id]
abs(self.quantity or 0))[self.product.id]
if unit_price is not None:
unit_price = round_price(unit_price)
return unit_price