[FIX] stock_picking_batch_custom: validar collected solo en operaciones detalladas
This commit is contained in:
parent
2237cba034
commit
05a8908007
4 changed files with 63 additions and 27 deletions
|
|
@ -43,15 +43,13 @@ class StockPicking(models.Model):
|
|||
batch_pickings = self.filtered(
|
||||
lambda picking, batch=batch: picking.batch_id == batch
|
||||
)
|
||||
processed_product_ids = (
|
||||
batch_pickings.move_line_ids.filtered(
|
||||
lambda line: line.move_id.state not in ("cancel", "done")
|
||||
processed_move_lines = batch_pickings.move_line_ids.filtered(
|
||||
lambda line: (
|
||||
line.move_id.state not in ("cancel", "done")
|
||||
and line.product_id
|
||||
and line.quantity
|
||||
and line.move_id.quantity > 0
|
||||
)
|
||||
.mapped("product_id")
|
||||
.ids
|
||||
)
|
||||
if not processed_product_ids:
|
||||
if not processed_move_lines:
|
||||
continue
|
||||
batch._check_all_products_collected(processed_product_ids)
|
||||
batch._check_all_products_collected(batch_pickings)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue