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

[14.0][PERF] stock_available_to_promise_release priority #721

Open
wants to merge 1 commit into
base: 14.0
Choose a base branch
from

Conversation

jbaudoux
Copy link
Contributor

Prevent odoo to try to compute if a state change must be tracked when the priority is changed. As many moves can be released at the same time this useless computation is not neglectable.

cc @mt-software-de

Prevent odoo to try to compute if a state change must be tracked when
the priority is changed. As many moves can be released at the same time
this useless computation is not neglectable.
@@ -514,7 +514,9 @@ def _assign_picking_post_process(self, new=False):
super()._assign_picking_post_process(new)
priorities = self.mapped("move_dest_ids.picking_id.priority")
if priorities:
self.picking_id.write({"priority": max(priorities)})
self.picking_id.with_context(tracking_disable=True).write(
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe you can add a comment?

@jbaudoux jbaudoux changed the title [14.0][PERF] stock_available_to_promise_release [14.0][PERF] stock_available_to_promise_release priority Aug 17, 2023
@jbaudoux
Copy link
Contributor Author

@TDu Besides the perf improvement, there is something we need to adapt in the code implementation you did in 1d4e50f
We cannot write the priority on the picking as this will override the priority of all moves.
Something similar to this fix 046e10e

Copy link

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Dec 17, 2023
@jbaudoux jbaudoux added no stale Use this label to prevent the automated stale action from closing this PR/Issue. and removed stale PR/Issue without recent activity, it'll be soon closed automatically. labels Dec 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no stale Use this label to prevent the automated stale action from closing this PR/Issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants