Skip to content

Commit

Permalink
[FIX] stock: check the state before put in pack
Browse files Browse the repository at this point in the history
Makes consistent the Python logic and the view.

Closes #22534
opw-813477
  • Loading branch information
fmdl authored and nim-odoo committed Feb 21, 2018
1 parent b730de1 commit 938bcc4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addons/stock/models/stock_picking.py
Original file line number Diff line number Diff line change
Expand Up @@ -831,7 +831,7 @@ def _create_backorder(self, backorder_moves=[]):

def _put_in_pack(self):
package = False
for pick in self:
for pick in self.filtered(lambda p: p.state not in ('done', 'cancel')):
operations = pick.move_line_ids.filtered(lambda o: o.qty_done > 0 and not o.result_package_id)
operation_ids = self.env['stock.move.line']
if operations:
Expand Down

0 comments on commit 938bcc4

Please sign in to comment.