[MERGE] forward port of branch 7.0 up to revid 9943 launchpad_translations_on_behalf_...
[odoo/odoo.git] / addons / procurement / procurement.py
index 5e3f8b5..1e7076d 100644 (file)
@@ -439,7 +439,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'})
         for id in ids:
             workflow.trg_trigger(uid, 'procurement.order', id, cr)