@@ -31,7 +31,7 @@ class my_report_model(osv.osv):
c.lastdate
FROM product_template a
LEFT JOIN(select product_id AS product_id,name AS nombre,SUM(product_uom_qty) AS pos , MAX(create_date) AS lastdate from sale_order_line group by product_id,name) c on c.product_id=a.id
- WHERE c.pos>0
+ WHERE c.pos>0 and a.sale_ok = True
)
""")
my_report_model()