From 283f8df95bf5d63dbbf5b8c109c996bbb7ed0f42 Mon Sep 17 00:00:00 2001 From: Josse Colpaert Date: Tue, 7 Mar 2017 16:29:11 -0800 Subject: [PATCH] [FIX] point_of_sale: don't generate move lines with a qty of 0 --- addons/point_of_sale/models/pos_order.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/point_of_sale/models/pos_order.py b/addons/point_of_sale/models/pos_order.py index 06395c57b59..c52e2f87084 100644 --- a/addons/point_of_sale/models/pos_order.py +++ b/addons/point_of_sale/models/pos_order.py @@ -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,