[Fix] stock: Fix Error while opening dashboard for

bzr revid: sbh@tinyerp.com-20100929131842-ss1px9hwmmfr5gqt
This commit is contained in:
sbh (Open ERP) 2010-09-29 18:48:42 +05:30
parent f3bb5ba6c9
commit 47502593c6
1 changed files with 2 additions and 2 deletions

View File

@ -2595,7 +2595,7 @@ class report_products_to_received_planned(osv.osv):
tools.drop_view_if_exists(cr, 'report_products_to_received_planned')
cr.execute("""
create or replace view report_products_to_received_planned as (
select stock.create_date, min(stock.id) as id, sum(stock.product_qty) as qty, 0 as planned_qty
select stock.create_date as date, min(stock.id) as id, sum(stock.product_qty) as qty, 0 as planned_qty
from stock_picking picking
inner join stock_move stock
on picking.id = stock.picking_id and picking.type = 'in'
@ -2604,7 +2604,7 @@ class report_products_to_received_planned(osv.osv):
union
select stock.date, min(stock.id) as id, 0 as actual_qty, sum(stock.product_qty) as planned_qty
select stock.date as date , min(stock.id) as id, 0 as actual_qty, sum(stock.product_qty) as planned_qty
from stock_picking picking
inner join stock_move stock
on picking.id = stock.picking_id and picking.type = 'in'