Do not try to compute promotion quantity for lines without type line

Closes #12351
(grafted from e4c4fcb90528908ed5135c1e78d8c7334d7c8c63)

--HG--
branch : 6.0
This commit is contained in:
Cédric Krier
2023-11-02 16:42:45 +01:00
parent 71b8ab0f2d
commit beec812a61
+2
View File
@@ -241,6 +241,8 @@ class Promotion(
if self.unit:
quantity = 0
for line in sale.lines:
if line.type != 'line':
continue
if self.is_valid_sale_line(line):
quantity += Uom.compute_qty(line.unit, line.quantity,
self.unit)