[FIX] Sale : Cancelled partial packing should affect Sale order's Shipped field
bzr revid: jma@tinyerp.com-20100511131438-0mihujf8ah39iqs8
This commit is contained in:
@@ -192,6 +192,19 @@ class stock_picking(osv.osv):
|
||||
})
|
||||
|
||||
return result
|
||||
|
||||
def action_cancel(self, cr, uid, ids, context={}):
|
||||
res = super(stock_picking, self).action_cancel(cr, uid, ids, context=context)
|
||||
for pick in self.browse(cr, uid, ids, context):
|
||||
call_ship_end = True
|
||||
if pick.sale_id:
|
||||
for picks in pick.sale_id.picking_ids:
|
||||
if picks.state not in ('done','cancel'):
|
||||
call_ship_end = False
|
||||
break
|
||||
if call_ship_end:
|
||||
self.pool.get('sale.order').action_ship_end(cr, uid, [pick.sale_id.id], context)
|
||||
return res
|
||||
|
||||
|
||||
stock_picking()
|
||||
|
||||
Reference in New Issue
Block a user