[FIX] stock: move analysis report incorrectly merges multiple lines with same picking...
authorOlivier Dony <odo@openerp.com>
Fri, 25 Oct 2013 10:36:26 +0000 (12:36 +0200)
committerOlivier Dony <odo@openerp.com>
Fri, 25 Oct 2013 10:36:26 +0000 (12:36 +0200)
commit16326661012b81ee9465915ad4c2e7b2e8dfa854
tree4fa17c1ce5b488fc15c32d45d32ec0c8bdb359ec
parent8bc457816f02200f6338fd6578b952b8c7dec52c
[FIX] stock: move analysis report incorrectly merges multiple lines with same picking, product and qty

This error probably stems from the useless complexity of
the SQL view declaration and the double GROUP BY levels.

The patch rewrites the view query with a single GROUP BY
level and proper aggregation levels, but the core part
of the patch is to replace the outer `group by product_qty`
with a `sum(product_qty)`.

Some columns were also mentioned twice in the same GROUP
BY clause, for some reason.

bzr revid: odo@openerp.com-20131025103626-7l78kdjjr7c2wesb
addons/stock/report/report_stock_move.py