check if uom and quantity is set
This commit is contained in:
parent
05a14c71f8
commit
fe5e0210d9
|
@ -161,6 +161,8 @@ class Operation(sequence_ordered(), Workflow, ModelSQL, ModelView):
|
||||||
|
|
||||||
total = 0.
|
total = 0.
|
||||||
for line in self.lines:
|
for line in self.lines:
|
||||||
|
if not line.uom or not line.quantity:
|
||||||
|
continue
|
||||||
total += Uom.compute_qty(line.uom, line.quantity,
|
total += Uom.compute_qty(line.uom, line.quantity,
|
||||||
self.work_center_category.uom)
|
self.work_center_category.uom)
|
||||||
return total
|
return total
|
||||||
|
|
Loading…
Reference in New Issue