[MERGE] OPW 590457: Cancelled procurements are no longer taken into account for the...
authorChris Biersbach <cbi@openerp.com>
Fri, 5 Apr 2013 12:06:48 +0000 (14:06 +0200)
committerChris Biersbach <cbi@openerp.com>
Fri, 5 Apr 2013 12:06:48 +0000 (14:06 +0200)
bzr revid: cbi@openerp.com-20130405120648-xake0z2grwnp2avg

addons/stock/report/report_stock_move.py

index 8b18331..b064f92 100644 (file)
@@ -189,6 +189,7 @@ CREATE OR REPLACE view report_stock_inventory AS (
                 LEFT JOIN product_uom pu2 ON (m.product_uom=pu2.id)
             LEFT JOIN product_uom u ON (m.product_uom=u.id)
             LEFT JOIN stock_location l ON (m.location_id=l.id)
+            WHERE m.state != 'cancel'
     GROUP BY
         m.id, m.product_id, m.product_uom, pt.categ_id, m.address_id, m.location_id,  m.location_dest_id,
         m.prodlot_id, m.date, m.state, l.usage, m.company_id, pt.uom_id
@@ -210,6 +211,7 @@ CREATE OR REPLACE view report_stock_inventory AS (
                 LEFT JOIN product_uom pu2 ON (m.product_uom=pu2.id)
             LEFT JOIN product_uom u ON (m.product_uom=u.id)
             LEFT JOIN stock_location l ON (m.location_dest_id=l.id)
+            WHERE m.state != 'cancel'
     GROUP BY
         m.id, m.product_id, m.product_uom, pt.categ_id, m.address_id, m.location_id, m.location_dest_id,
         m.prodlot_id, m.date, m.state, l.usage, m.company_id, pt.uom_id