Support empty list price on product

issue10244
review350341002
This commit is contained in:
Cédric Krier committed 2021-09-13 23:29:57 +02:00
1 parent 1394309917
commit 5dfee5262e
1 file changed
+1 -1
+1 -1
View File
@@ -686,7 +686,7 @@ class Line(sequence_ordered(), ModelSQL, ModelView):
with Transaction().set_context(self._get_context_sale_price()):
self.unit_price = Product.get_sale_price(
[product], self.quantity or 0)[product.id]
if self.unit_price:
if self.unit_price is not None:
self.unit_price = round_price(self.unit_price)
self.consumption_recurrence = self.service.consumption_recurrence