summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Trigaux <mat@openerp.com>2014-05-27 17:56:30 +0200
committerMartin Trigaux <mat@openerp.com>2014-05-27 17:56:30 +0200
commit41c5ceb8ebb95c1b4e98d8dd1f12b8e547a24b1d (patch)
tree00f5ba15053100bf206093edba2e8793db54763b
parent1ef2c181033bd200906fb1e5ce35e234bf566ac6 (diff)
[FIX] stock: clean previous commit
-rw-r--r--addons/stock/stock.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/stock/stock.py b/addons/stock/stock.py
index 64a43852ad4..4c45de266d7 100644
--- a/addons/stock/stock.py
+++ b/addons/stock/stock.py
@@ -2411,9 +2411,9 @@ class stock_move(osv.osv):
picking_ids.append(move.picking_id.id)
if move.move_dest_id.id and (move.state != 'done'):
# Downstream move should only be triggered if this move is the last pending upstream move
- other_upstream_move_ids = self.search(cr, uid, [('id','!=',move.id),('state','not in',['done','cancel']),
+ other_upstream_move_ids = self.search(cr, uid, [('id','not in',move_ids),('state','not in',['done','cancel']),
('move_dest_id','=',move.move_dest_id.id)], context=context)
- if not set(other_upstream_move_ids) - set(move_ids):
+ if not other_upstream_move_ids:
self.write(cr, uid, [move.id], {'move_history_ids': [(4, move.move_dest_id.id)]})
if move.move_dest_id.state in ('waiting', 'confirmed'):
self.force_assign(cr, uid, [move.move_dest_id.id], context=context)