diff --git a/addons/stock/report_stock_view.xml b/addons/stock/report_stock_view.xml
index 2753d84974a..1b921098df9 100644
--- a/addons/stock/report_stock_view.xml
+++ b/addons/stock/report_stock_view.xml
@@ -73,17 +73,31 @@
tree
-
+
+
+ report.stock.lines.date.form
+ report.stock.lines.date
+ form
+
+
+
+
+
Dates of Inventories
report.stock.lines.date
- tree
+ form
+ tree,form
diff --git a/addons/stock/stock.py b/addons/stock/stock.py
index b98f3cecc2b..b4ad96196ec 100644
--- a/addons/stock/stock.py
+++ b/addons/stock/stock.py
@@ -1,7 +1,7 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
-# OpenERP, Open Source Management Solution
+# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2008 Tiny SPRL (). All Rights Reserved
# $Id$
#
@@ -1359,15 +1359,15 @@ class report_stock_lines_date(osv.osv):
_description = "Dates of Inventories"
_auto = False
_columns = {
- 'id': fields.integer('Id',size=20),
- 'product_id':fields.integer('Product Id',size=20),
+ 'id': fields.integer('Inventory Line Id', readonly=True),
+ 'product_id':fields.integer('Product Id', readonly=True),
'create_date': fields.datetime('Latest Date of Inventory'),
}
def init(self, cr):
cr.execute("""
create or replace view report_stock_lines_date as (
select
- p.id as id,
+ l.id as id,
p.id as product_id,
max(l.create_date) as create_date
from
@@ -1375,7 +1375,7 @@ class report_stock_lines_date(osv.osv):
left outer join
stock_inventory_line l on (p.id=l.product_id)
where l.create_date is not null
- group by p.id
+ group by p.id,l.id
)""")
report_stock_lines_date()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: