mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
Rely on stock_move_common_dest as dependency
This commit is contained in:
committed by
Guewen Baconnier
parent
a7dcbec325
commit
de4dcfd141
@@ -12,6 +12,6 @@
|
||||
"license": "AGPL-3",
|
||||
"application": False,
|
||||
"installable": True,
|
||||
"depends": ["stock"],
|
||||
"depends": ["stock_move_common_dest"],
|
||||
"data": ["views/stock_picking.xml"],
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ class StockPicking(models.Model):
|
||||
|
||||
@api.depends(
|
||||
"picking_type_id.display_completion_info",
|
||||
"move_lines.move_dest_ids.move_orig_ids.state",
|
||||
"move_lines.common_dest_move_ids.state",
|
||||
)
|
||||
def _compute_completion_info(self):
|
||||
for picking in self:
|
||||
@@ -49,9 +49,7 @@ class StockPicking(models.Model):
|
||||
continue
|
||||
# Depending moves are all the origin moves linked to the
|
||||
# destination pickings' moves
|
||||
depending_moves = picking.move_lines.mapped(
|
||||
"move_dest_ids.picking_id.move_lines.move_orig_ids"
|
||||
)
|
||||
depending_moves = picking.move_lines.mapped("common_dest_move_ids")
|
||||
# If all the depending moves are done or canceled then next picking
|
||||
# is ready to be processed
|
||||
if all(m.state in ("done", "cancel") for m in depending_moves):
|
||||
|
||||
Reference in New Issue
Block a user