credativ team mailing list archive
-
credativ team
-
Mailing list archive
-
Message #05140
[Merge] lp:~credativ/openobject-addons/6.1-lp-1033731 into lp:openobject-addons/6.1
Craig Gowing (credativ) has proposed merging lp:~credativ/openobject-addons/6.1-lp-1033731 into lp:openobject-addons/6.1.
Requested reviews:
OpenERP Core Team (openerp)
Related bugs:
Bug #1033731 in OpenERP Addons: "JIT does not work with PHANTOM, make_to_order + produce"
https://bugs.launchpad.net/openobject-addons/+bug/1033731
For more details, see:
https://code.launchpad.net/~credativ/openobject-addons/6.1-lp-1033731/+merge/157292
Fix for lp:1033731
--
https://code.launchpad.net/~credativ/openobject-addons/6.1-lp-1033731/+merge/157292
Your team credativ is subscribed to branch lp:~credativ/openobject-addons/6.1-lp-1033731.
=== modified file 'stock/stock.py'
--- stock/stock.py 2012-10-22 09:29:02 +0000
+++ stock/stock.py 2013-04-05 07:41:24 +0000
@@ -727,7 +727,13 @@
todo = self.action_explode(cr, uid, todo, context)
if len(todo):
- self.pool.get('stock.move').action_confirm(cr, uid, todo, context=context)
+ # JIT may assign stock moves immediately, so only confirm
+ # moves if they are still draft
+ move_obj = self.pool.get('stock.move')
+ moves = move_obj.read(cr, uid, todo, ['id','state'], context=context)
+ to_confirm = [ m['id'] for m in moves if m['state'] == 'draft' ]
+ if len(to_confirm):
+ self.pool.get('stock.move').action_confirm(cr, uid, to_confirm, context=context)
return True
def test_auto_picking(self, cr, uid, ids):