[FIX] point_of_sale: do not create empty picking for order with only service products

When confirming a pos order with only "service" products, an emtpy pos order is
created which stays in "draft" state forever.

Closes #7460
This commit is contained in:
Jos De Graeve 2015-07-04 10:57:45 +02:00 committed by Nicolas Martinelli
parent a55a768d61
commit baa51efdc9
1 changed files with 2 additions and 0 deletions

View File

@ -790,6 +790,8 @@ class pos_order(osv.osv):
move_obj = self.pool.get('stock.move')
for order in self.browse(cr, uid, ids, context=context):
if all(t == 'service' for t in order.lines.mapped('product_id.type')):
continue
addr = order.partner_id and partner_obj.address_get(cr, uid, [order.partner_id.id], ['delivery']) or {}
picking_type = order.picking_type_id
picking_id = False