|
@@ -30,7 +30,7 @@ class my_report_model(osv.osv):
|
|
c.pos AS suma,
|
|
c.pos AS suma,
|
|
c.lastdate
|
|
c.lastdate
|
|
FROM product_template a
|
|
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
|
|
|
|
|
|
+ LEFT JOIN(select product_id AS product_id,name AS nombre,SUM(quantity) AS pos , MAX(create_date) AS lastdate from account_invoice_line group by product_id,name) c on c.product_id=a.id
|
|
WHERE c.pos>0 and a.sale_ok = True
|
|
WHERE c.pos>0 and a.sale_ok = True
|
|
)
|
|
)
|
|
""")
|
|
""")
|