summaryrefslogtreecommitdiff
path: root/addons/web/static
diff options
context:
space:
mode:
authorNicolas Galler <ngl@odoo.com>2020-11-20 08:54:21 +0000
committerNicolas Galler <ngl@odoo.com>2020-11-27 13:19:19 +0000
commitc16d4b5e7b9181c2c792f595a117de10510d45be (patch)
tree31f4c18f84d0d66869b5c578c37bbe30b7421eda /addons/web/static
parent035aefeb36b15e0adb6a1c262a8fab7e69f94fd6 (diff)
[FIX] stock: correct product_qty filter in forecast inventory report
Behavior prior to the fix: - when adding a filter on "Quantity < 0" (or > 0) on the forecast inventory report the quantity reported becomes incorrect: for example if there is a restock on Tuesday and a shipment on Friday that drives the forecasted quantity into a negative, the forecasted inventory report instead reports a negative quantity on Monday. - the problem occurs because the view the report is based on is built using positive and negative entries that are supposed to cancel each other when accounting for stock items (quant). This way the quantity is reported as 0 before the quant is moved in the inventory (there is a positive entry for the quant, and a negative entry for the move up to the move effective date). But when a filter on quantity is placed the "cancelling" entries are not loaded and the report ends up with just the negative value Behavior after the fix: - the quantities are reported as expected: with a negative on Friday, and 0 on the days before - to achieve this the view was modified to perform the grouping of forecast entries inside of the view. This way we have one row per product / day / state and we don't risk selecting only part of the report. - as the view is only read in aggregate there will not be any visible changes to its consumers opw-2379098 closes odoo/odoo#62457 X-original-commit: 4e4584c4b00d70215713029fc1c2a96641d99aa9 Signed-off-by: Nicolas Galler <ngaller@users.noreply.github.com> Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Diffstat (limited to 'addons/web/static')
0 files changed, 0 insertions, 0 deletions