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

[17.0][FIX] ddmrp: readd procure_location argument lost in migration #479

Merged
merged 1 commit into from
Jul 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 3 additions & 8 deletions ddmrp/models/stock_buffer.py
Original file line number Diff line number Diff line change
Expand Up @@ -2077,14 +2077,9 @@ def cron_ddmrp(self, automatic=False):
def _values_source_location_from_route(self):
return {"warehouse_id": self.warehouse_id}

def _source_location_from_route(self, route=None):
"""Return the replenishment source location for distributed buffers
If no route is passed, it follows the source location of the rules of
all the routes it finds until it can no longer find a path.
If a route is passed, it stops at the final source location of the
rules of this route only.
"""
current_location = self.location_id
def _source_location_from_route(self, procure_location=None):
"""Return the replenishment source location for distributed buffers"""
current_location = procure_location or self.location_id
rule_values = self._values_source_location_from_route()
while current_location:
rule = self.env["procurement.group"]._get_rule(
Expand Down
Loading