[16.0][FIX] shopfloor: Fetch qty_available only when needed#1055
[16.0][FIX] shopfloor: Fetch qty_available only when needed#1055OCA-git-bot merged 1 commit intoOCA:16.0from
Conversation
lmignon
left a comment
There was a problem hiding this comment.
Do you've analyzed the domain used in such a case. The qty available is computed for a specific location. I find it hard to believe that there are several people at the same time asking for the same quantity of the same product for the same location... In any case, if you don't need the field because you don't display it, it's time saved.
The quantity is not relevant; the issue is related to the same product from the same location, and it occurs consistently based on the data I analyzed in our use case. |
|
This PR has the |
|
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. |
|
ping @sbejaoui |
Several services use `_data_move_line` to prepare stock move line data for the Shopfloor frontend. However, qty_available is not displayed on all pages where stock move lines are handled. Since qty_available is computed from quants, accessing it unnecessarily can lead to useless database queries. In high-concurrency environments, this can even trigger deadlocks when reads and writes occur simultaneously across many Shopfloor users. This fix limits the use of qty_available to cases where it’s strictly needed.
55434a6 to
60cad64
Compare
|
changes made, please review |
|
/ocabot merge minor |
|
What a great day to merge this nice PR. Let's do it! |
|
Congratulations, your PR was merged at d97f641. Thanks a lot for contributing to OCA. ❤️ |
Several services use
_data_move_lineto prepare stock move line data for the Shopfloor frontend. However, qty_available is not displayed on all pages where stock move lines are handled.Since qty_available is computed from quants, accessing it unnecessarily can lead to useless database queries. In high-concurrency environments, this can even trigger deadlocks when reads and writes occur simultaneously across many Shopfloor users.
This fix limits the use of qty_available to cases where it’s strictly needed.
@lmignon , @rousseldenis