[MERGE] [FIX] procurement: cancelling purchase order should trigger action_assign on the stock move to correctly handle linked picking

lp bug: https://launchpad.net/bugs/1290509 fixed

bzr revid: mat@openerp.com-20140328130305-ozcdq0jft24p5n1i
This commit is contained in:
Martin Trigaux
2014-03-28 14:03:05 +01:00
+2 -1
View File
@@ -441,7 +441,8 @@ class procurement_order(osv.osv):
if len(to_cancel):
move_obj.action_cancel(cr, uid, to_cancel)
if len(to_assign):
move_obj.write(cr, uid, to_assign, {'state': 'assigned'})
move_obj.write(cr, uid, to_assign, {'state': 'confirmed'})
move_obj.action_assign(cr, uid, to_assign)
self.write(cr, uid, ids, {'state': 'cancel'})
wf_service = netsvc.LocalService("workflow")
for id in ids: