Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MIG] stock_orderpoint_route: Migration to 18.0 #33

Open
wants to merge 11 commits into
base: 18.0
Choose a base branch
from

Conversation

grindtildeath
Copy link
Contributor

No description provided.

JordiBForgeFlow and others added 11 commits February 6, 2025 18:38
Improve code after reviews

* performance (less queries executed)
* disable tracking in tests (faster)
* use with_user instead of sudo
* the double for loop in _compute_route_ids actually generates one more
  query as the simple one in this commit (thanks to the cache)
* extract a method
* the parent locations can be found using 'parent_of' which will use the
  parent_path under the hood (example: 1/7/8 will return locations 1, 7,
  8)
This is to avoid issue below for any module that inherits tree view of
the model `stock.warehouse.orderpoint`. Example: `stock_orderpoint_manual_procurement`

Field route_ids used in field route_id default domain
([('id', 'in', route_ids)]) must be present in view but is missing.
@grindtildeath grindtildeath force-pushed the 18.0-mig-stock_orderpoint_route branch from 88b35ce to ddd4c89 Compare February 6, 2025 17:56
@grindtildeath
Copy link
Contributor Author

This one will need fixing because IMO the condition to filter routes in _get_location_routes_of_parents is not correct for following reasons:

  • In v18.0, multi step reception route is excluded because its rule doesn't use an internal source location
  • Even in v16.0, using a single step reception route, it is excluded because its single rule doesn't use an internal source location
  • The delivery route should not be selectable from the orderpoint as triggering the procurement with this route selected will not generate anything

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants