openerp-dev-web team mailing list archive
-
openerp-dev-web team
-
Mailing list archive
-
Message #05314
[Merge] lp:~openerp-dev/openobject-addons/6.0-bug-722538-jvo into lp:openobject-addons/6.0
Jay Vora (OpenERP) has proposed merging lp:~openerp-dev/openobject-addons/6.0-bug-722538-jvo into lp:openobject-addons/6.0.
Requested reviews:
OpenERP Core Team (openerp)
Related bugs:
Bug #722538 in OpenERP Addons: "[trunk][6.0] duplicate chained moves when processing incoming pickings"
https://bugs.launchpad.net/openobject-addons/+bug/722538
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-bug-722538-jvo/+merge/57135
--
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-bug-722538-jvo/+merge/57135
Your team OpenERP R&D Team is subscribed to branch lp:~openerp-dev/openobject-addons/6.0-bug-722538-jvo.
=== modified file 'stock/stock.py'
--- stock/stock.py 2011-04-04 10:02:08 +0000
+++ stock/stock.py 2011-04-11 10:33:24 +0000
@@ -2108,11 +2108,11 @@
todo = []
for move in self.browse(cr, uid, ids, context=context):
- #print 'DONE MOVE', move.id, move.product_id.name, move.move_dest_id.id, move.state, move.move_dest_id and move.move_dest_id.state
if move.state=="draft":
todo.append(move.id)
if todo:
self.action_confirm(cr, uid, todo, context=context)
+ todo = []
for move in self.browse(cr, uid, ids, context=context):
if move.state in ['done','cancel']:
@@ -2135,10 +2135,13 @@
prodlot_id = partial_datas and partial_datas.get('move%s_prodlot_id' % (move.id), False)
if prodlot_id:
self.write(cr, uid, [move.id], {'prodlot_id': prodlot_id}, context=context)
- if move.state not in ('confirmed','done'):
- self.action_confirm(cr, uid, move_ids, context=context)
-
- self.write(cr, uid, move_ids, {'state': 'done', 'date_planned': time.strftime('%Y-%m-%d %H:%M:%S')}, context=context)
+ if move.state not in ('confirmed','done','assigned'):
+ todo.append(move.id)
+
+ if todo:
+ self.action_confirm(cr, uid, todo, context=context)
+
+ self.write(cr, uid, move_ids, {'state': 'done', 'date': time.strftime('%Y-%m-%d %H:%M:%S')}, context=context)
for id in move_ids:
wf_service.trg_trigger(uid, 'stock.move', id, cr)
Follow ups