Skip to content
Snippets Groups Projects
Commit 60fafa9f authored by Rémy Voet (ryv)'s avatar Rémy Voet (ryv)
Browse files

[FIX] stock: improve perf of replenishement report

Avoid to filter in a loop and use a read_group instead to group by
product-warehouse outside.
Also remove costly useless code.

Performance gain
----------------
On a large database (120K stock move, 5k product) where
+- 700 manual orderpoints will be create during the open of the
replenishement report:
Before:
16.14 +- 0.16 sec of python. (SQL time is +- 14 sec)
After:
1.33 +- 0.91 sec of python. (SQL time ==)

task-2390516

X-original-commit: 569b45d5cb139825690a90189b7a360f3fa89815
parent 805502c3
No related branches found
No related tags found
Loading
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