summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src
diff options
context:
space:
mode:
authorDenis Ledoux <dle@odoo.com>2016-02-16 16:23:05 +0100
committerDenis Ledoux <dle@odoo.com>2016-02-16 16:37:32 +0100
commit1d7c12022dcffce4792b9eec85706e19338cfa9f (patch)
treea0fc01b543d33c8ccc1c6e3e33f3e3c6725f5bff /addons/web_editor/static/src
parent7b445112bcab9288077fe1497d0dbce3f6f78ccb (diff)
[FIX] stock_account: valuation history with moves having multiple quant prices
The revision 29bd62252158803cdad351a2966af6eeac4cca74 aimed to improve the performance by changing the view index, to use a BIGINT instead of a text. It was assumed that the index used (`stock_move.id`) could not appear multiple times with the JOINs and group bys defined. This was in fact possible, if a stock move is associated to several quants with different costs, because of the JOIN on the many2many table `stock_quant_move_rel` linking quants to moves, and the GROUP BY `price_unit_on_quant` that caused the different moves/quants association not to be merged within one unique line if the costs on the quants are different. Instead of the group by, we now aggregate the quants costs, using the weighted average, so the index used can be unique, as expected. From now, the inventory value per line in this report view can therefore be different than what can be found on the quants, but this report view is based on the stock moves rather than the stock quants, and this is therefore accepted. In other words, the inventory value is computed for the stock move rather than for the stock quant. opw-658903
Diffstat (limited to 'addons/web_editor/static/src')
0 files changed, 0 insertions, 0 deletions