Skip to content
Snippets Groups Projects
Commit c8b91b0a authored by Simon Lejeune's avatar Simon Lejeune
Browse files

[FIX] stock: cache invalidation in _action_assign


`reserved_availability` is a computed field of a move depending on its
move lines. We access this field at each iteration of the loop over the
moves to assign and then we create a new move line for it. This triggers
an invalidation of this field, The next iteration will again access this
field and prefetch it for all the next records.

We read the field out of the loop and don't access it again to prevent
these prefetch/invalidation issues.

Confirmation of a PO of ~800 lines goes from 5 minutes to 1 minute.

opw-1953398

closes odoo/odoo#32774

Signed-off-by: default avatarSimon Lejeune (sle) <sle@openerp.com>
parent c2f15d3f
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment