Commit 0413a4ab authored by Jeremy Kersten's avatar Jeremy Kersten
Browse files

[FIX] sale: avoid division by zero in _get_price_reduce

close #11999
parent deef119d
......@@ -904,7 +904,7 @@ class sale_order_line(osv.osv):
def _get_price_reduce(self, cr, uid, ids, field_name, arg, context=None):
res = dict.fromkeys(ids, 0.0)
for line in self.browse(cr, uid, ids, context=context):
res[] = line.price_subtotal / line.product_uom_qty
res[] = line.price_subtotal / line.product_uom_qty if line.product_uom_qty else 0.0
return res
_name = 'sale.order.line'
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment