[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:
parent
a55a768d61
commit
baa51efdc9
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue