diff --git a/shopfloor/models/stock_move.py b/shopfloor/models/stock_move.py index 040d07ca46a..da24e18d02b 100644 --- a/shopfloor/models/stock_move.py +++ b/shopfloor/models/stock_move.py @@ -68,10 +68,13 @@ def extract_and_action_done(self): ) % (picking.id, picking.name) ) - moves_todo.write({"picking_id": new_picking.id}) - moves_todo.mapped("package_level_id").write({"picking_id": new_picking.id}) - moves_todo.mapped("move_line_ids").write({"picking_id": new_picking.id}) - new_picking.action_assign() - assert new_picking.state == "assigned" + moves_todo.write({"picking_id": new_picking.id}) + moves_todo.package_level_id.write({"picking_id": new_picking.id}) + moves_todo.move_line_ids.write({"picking_id": new_picking.id}) + moves_todo.move_line_ids.package_level_id.write( + {"picking_id": new_picking.id} + ) + new_picking.action_assign() + assert new_picking.state == "assigned" new_picking.action_done() return True