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

[16.0][ADD] sale_stock_available_from_route_location #27

Conversation

QuocDuong1306
Copy link

Context

  • Currently, the forecasted and available quantities on the Availability widget of Sale Order are based on all locations of the warehouse.

  • This module will re-calculate those quantities based only on the locations defined for the defined route of the Sale Order Line.

Develop

  • The implementation of this module relies on the capacity of native odoo to calculate quantities based on a warehouse or a location passed in the context in _get_domain_locations.

  • But it needs a patch on odoo upstream to generalize _compute_qty_at_date, see here.

Depend:

@QuocDuong1306 QuocDuong1306 marked this pull request as draft July 23, 2024 07:39
Copy link

@jbaudoux jbaudoux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a design issue. I need to reanalyze this.

We need compatibility with the release mechanism which relies on the warehouse of the move. So I fear we can't escape from having a dedicated warehouse. Then the question is if we want to be able to set the warehouse at line level or if we can stay standard and just have one SO per stock to be used (i.e. warehouse)

Comment on lines +56 to +61
rules_to_consider = self.route_id.rule_ids.filtered(
lambda loc: loc.action in ("pull", "pull_push")
and loc.location_dest_id.usage == "customer"
)
if rules_to_consider:
locations_to_consider = rules_to_consider.mapped("location_src_id.id")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The route will likely define a rule to pick from dedicated stock to output.
Once on output, it will be the warehouse ship rule.

@jbaudoux
Copy link

Can be managed in standard with some configuration using different warehouses

@jbaudoux jbaudoux closed this Sep 11, 2024
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.

3 participants