[FIX] stock: check the state before put in pack
Makes consistent the Python logic and the view. Closes #22534 opw-813477
This commit is contained in:
committed by
Nicolas Martinelli
parent
b730de1978
commit
b55e844e1a
@@ -831,7 +831,7 @@ class Picking(models.Model):
|
||||
|
||||
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:
|
||||
|
||||
Reference in New Issue
Block a user