summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoruco (Open ERP) <uco@tinyerp.com>2010-09-29 10:22:19 +0530
committeruco (Open ERP) <uco@tinyerp.com>2010-09-29 10:22:19 +0530
commitbb17e729bfc8340d44fc3ca03151c8abc9ea45b9 (patch)
tree4e2d808461f7f2bcb5ad976d85571069bd7001ff
parent11cc4b59d48c1767b164f2edfd2338fe7c4ff5de (diff)
[FIX] stock: Error while opening dashboard.
bzr revid: uco@tinyerp.com-20100929045219-a2q4dqsbu3el14yk
-rw-r--r--addons/stock/stock.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/addons/stock/stock.py b/addons/stock/stock.py
index dbf55768b3e..571b9643129 100644
--- a/addons/stock/stock.py
+++ b/addons/stock/stock.py
@@ -2630,7 +2630,7 @@ class report_delivery_products_planned(osv.osv):
tools.drop_view_if_exists(cr, 'report_delivery_products_planned')
cr.execute("""
create or replace view report_delivery_products_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 = 'out'
@@ -2639,14 +2639,12 @@ class report_delivery_products_planned(osv.osv):
union
- select stock.date, min(stock.id), 0 as actual_qty, sum(stock.product_qty) as planned_qty
+ select stock.date as date, min(stock.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 = 'out'
where stock.date between (select cast(date_trunc('week', current_date) as date)) and (select cast(date_trunc('week', current_date) as date) + 7)
- group by stock.date
-
-
+ group by stock.date
)
""")