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
[10.0][PERF] Perf improvement when migrating stock module #2151
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All performance improvements are welcome!
/ocabot merge |
Hey, thanks for contributing! Proceeding to merge this for you. |
@pedrobaeza your merge command was aborted due to failed check(s), which you can inspect on this commit of 10.0-ocabot-merge-pr-2151-by-pedrobaeza-bump-no. After fixing the problem, you can re-issue a merge command. Please refrain from merging manually as it will most probably make the target branch red. |
Please fix flake8:
|
Adding the related store field with the ORM is slow This PR add it manually the fields - stock_move.scrapped - stock_production_lot.product_uom_id Manually bypassing the ORM Reduce time from 4 hours to 30 minutes
fbedf75
to
b7cdcd0
Compare
Sorry for the pep8, it should be fixed now, waiting for travis. |
Thanks! |
/ocabot merge |
What a great day to merge this nice PR. Let's do it! |
Congratulations, your PR was merged at d251743. Thanks a lot for contributing to OCA. ❤️ |
Thanks for merging so fast the PR. |
Description of the issue/feature this PR addresses:
Adding related field with the ORM is long
Current behavior before PR:
On my database adding the fields stock_move.scrapped and stock_production_lot.product_uom_id
take 4 hours. Around 3.5 million of stock move and 1.3 million of stock production lot
Desired behavior after PR is merged:
It only take 30 min
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr