Skip to content

Commit

Permalink
Fix application of push rules if chained move is done, cancelled or d…
Browse files Browse the repository at this point in the history
…raft
  • Loading branch information
grindtildeath committed Jun 15, 2018
1 parent d702e82 commit 302abea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addons/stock/models/stock_move.py
Expand Up @@ -506,7 +506,7 @@ def _push_apply(self):
Push = self.env['stock.location.path']
for move in self:
# if the move is already chained, there is no need to check push rules
if move.move_dest_ids:
if move.move_dest_ids.filtered(lambda m: m.state not in ('done', 'cancel', 'draft')):
continue
# if the move is a returned move, we don't want to check push rules, as returning a returned move is the only decent way
# to receive goods without triggering the push rules again (which would duplicate chained operations)
Expand Down

0 comments on commit 302abea

Please sign in to comment.