[IMP] Make sure normal products will still work
authorJosse Colpaert <jco@odoo.com>
Tue, 19 Aug 2014 10:26:05 +0000 (12:26 +0200)
committerJosse Colpaert <jco@odoo.com>
Wed, 3 Sep 2014 17:18:16 +0000 (19:18 +0200)
addons/mrp/stock.py

index e3ac753..fb5a3bf 100644 (file)
@@ -131,8 +131,8 @@ class StockMove(osv.osv):
                 
             #delete the move with original product which is not relevant anymore
             move_obj.unlink(cr, SUPERUSER_ID, [move.id], context=context)
-        #return list of newly created move or the move id otherwise
-        return processed_ids or []
+        #return list of newly created move or the move id otherwise, unless there is no move anymore
+        return processed_ids or (not bis and [move.id]) or []
 
     def action_confirm(self, cr, uid, ids, context=None):
         move_ids = []