diff options
| author | Denis Ledoux <dle@odoo.com> | 2015-06-15 16:21:52 +0200 |
|---|---|---|
| committer | Denis Ledoux <dle@odoo.com> | 2015-06-15 16:28:13 +0200 |
| commit | 55b7f15ee2427e4c99edf05a5a61b069a5395bab (patch) | |
| tree | 4fd9f7cce016349acb17990b7a19c44e43c86e56 /addons/analytic_user_function/analytic_user_function_view.xml | |
| parent | 0d5b01543e1da2a3e2447b5a5aeb432acc0ace11 (diff) | |
[FIX] stock_account: stock valuation report performances
Basically, computation of the `inventory_value` is now done
in batch instead of one by one.
In a real use case, the computation of the stock valuation
passed from 20+ minutes to less than a minute.
This revision contains an unusual SQL request:
`SELECT DISTINCT ON`
Basically, it returns the most recent line of table
product_price_history for each tuple
`(product_template_id, company_id)`
which is actually what we want, with good performances.
See postgresql doc for more information:
http://www.postgresql.org/docs/9.0/static/sql-select.html#SQL-DISTINCT
opw-641154
Diffstat (limited to 'addons/analytic_user_function/analytic_user_function_view.xml')
0 files changed, 0 insertions, 0 deletions
