[FIX] point_of_sale: don't generate move lines with a qty of 0

This commit is contained in:
Josse Colpaert
2017-04-12 15:40:40 +02:00
parent 99deebe015
commit 283f8df95b
+1 -1
View File
@@ -597,7 +597,7 @@ class PosOrder(models.Model):
return_picking = Picking.create(return_vals)
return_picking.message_post(body=message)
for line in order.lines.filtered(lambda l: l.product_id.type in ['product', 'consu']):
for line in order.lines.filtered(lambda l: l.product_id.type in ['product', 'consu'] and l.qty != 0):
moves |= Move.create({
'name': line.name,
'product_uom': line.product_id.uom_id.id,