From 609058edda3ef483b46de9f5cb61bb3c1485b4b9 Mon Sep 17 00:00:00 2001 From: "JMA (OpenERP)" Date: Tue, 11 May 2010 13:19:16 +0530 Subject: [PATCH] [FIX] Stock : drop view check added for stock_report_prodlots bzr revid: jma@tinyerp.com-20100511074916-hnyftvq9cho4wq1f --- addons/stock/report/report_stock.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/addons/stock/report/report_stock.py b/addons/stock/report/report_stock.py index da1dd27ff14..3e7fe147c73 100644 --- a/addons/stock/report/report_stock.py +++ b/addons/stock/report/report_stock.py @@ -22,6 +22,7 @@ from osv import osv, fields from tools.translate import _ import tools +from tools.sql import drop_view_if_exists # # Check if it works with UoM ??? @@ -38,7 +39,7 @@ class stock_report_prodlots(osv.osv): } def init(self, cr): - tools.drop_view_if_exists(cr, 'stock_report_prodlots') + drop_view_if_exists(cr, 'stock_report_prodlots') cr.execute(""" create or replace view stock_report_prodlots as ( select max(id) as id, @@ -94,7 +95,7 @@ class stock_report_tracklots(osv.osv): } def init(self, cr): - tools.drop_view_if_exists(cr, 'stock_report_tracklots') + drop_view_if_exists(cr, 'stock_report_prodlots') cr.execute(""" create or replace view stock_report_tracklots as ( @@ -149,7 +150,7 @@ class report_stock_lines_date(osv.osv): 'date': fields.datetime('Latest Inventory Date'), } def init(self, cr): - tools.drop_view_if_exists(cr, 'report_stock_lines_date') + drop_view_if_exists(cr, 'stock_report_prodlots') cr.execute(""" create or replace view report_stock_lines_date as ( select