[Fix]: stock: cancelling move availability doesn't change packing

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

bzr revid: rha@tinyerp.com-20110202121737-y0mqh83pnetbwv9f
This commit is contained in:
rha@tinyerp.com
2011-02-02 17:47:37 +05:30
parent f9211cdef0
commit a54b002a98
+8
View File
@@ -1886,6 +1886,14 @@ class stock_move(osv.osv):
@return: True
"""
self.write(cr, uid, ids, {'state': 'confirmed'})
# fix for bug lp:707031
# called write of related picking because changing move availability does
# not trigger workflow of picking in order to change the state of picking
wf_service = netsvc.LocalService('workflow')
for move in self.browse(cr, uid, ids, context):
if move.picking_id:
wf_service.trg_write(uid, 'stock.picking', move.picking_id.id, cr)
return True
#