diff options
| author | Josse Colpaert <jco@odoo.com> | 2017-03-07 16:29:11 -0800 |
|---|---|---|
| committer | Josse Colpaert <jco@odoo.com> | 2017-04-12 15:40:40 +0200 |
| commit | 283f8df95bf5d63dbbf5b8c109c996bbb7ed0f42 (patch) | |
| tree | 25dee725fe6f25602a3cbe0f53648833e057df2f | |
| parent | 99deebe0154311a254141c54a8336b4a3f4add26 (diff) | |
[FIX] point_of_sale: don't generate move lines with a qty of 0
| -rw-r--r-- | addons/point_of_sale/models/pos_order.py | 2 |
1 files changed, 1 insertions, 1 deletions
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, |
