From 23f4aca0a88031f53c33c415a718b7c1df90b503 Mon Sep 17 00:00:00 2001 From: Gery Debongnie Date: Wed, 29 Jan 2014 14:55:19 +0100 Subject: [PATCH] [IMP] improves the Reception Analysis reporting view, removes old Day, Month, Year field from the postgres view and updates the dashboard graph view (addon stock) bzr revid: ged@openerp.com-20140129135519-uo98mu24qy2h29pq --- addons/stock/board_warehouse_view.xml | 8 ++++---- addons/stock/report/report_stock_move.py | 11 +---------- addons/stock/report/report_stock_move_view.xml | 11 ++++++++--- 3 files changed, 13 insertions(+), 17 deletions(-) diff --git a/addons/stock/board_warehouse_view.xml b/addons/stock/board_warehouse_view.xml index a1f327eab5d..136d8991a99 100644 --- a/addons/stock/board_warehouse_view.xml +++ b/addons/stock/board_warehouse_view.xml @@ -7,9 +7,9 @@ report.stock.move - - + + @@ -19,7 +19,7 @@ report.stock.move form graph,tree - [('type','=','in'),('day','<=', time.strftime('%Y-%m-%d')),('day','>',(context_today()-datetime.timedelta(days=15)).strftime('%Y-%m-%d'))] + [('type','=','in'),('date','<=', time.strftime('%Y-%m-%d')),('date','>',(context_today()-datetime.timedelta(days=15)).strftime('%Y-%m-%d'))] {'search_default_in':1} @@ -28,7 +28,7 @@ report.stock.move form graph,tree - [('type','=','out'),('day','<=', time.strftime('%Y-%m-%d')),('day','>',(context_today()-datetime.timedelta(days=15)).strftime('%Y-%m-%d'))] + [('type','=','out'),('date','<=', time.strftime('%Y-%m-%d')),('date','>',(context_today()-datetime.timedelta(days=15)).strftime('%Y-%m-%d'))] {'search_default_out':1} diff --git a/addons/stock/report/report_stock_move.py b/addons/stock/report/report_stock_move.py index db9ea187260..1b183f5fcbd 100644 --- a/addons/stock/report/report_stock_move.py +++ b/addons/stock/report/report_stock_move.py @@ -30,11 +30,6 @@ class report_stock_move(osv.osv): _auto = False _columns = { 'date': fields.date('Date', readonly=True), - 'year': fields.char('Year', size=4, readonly=True), - 'day': fields.char('Day', size=128, readonly=True), - 'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'), - ('05','May'), ('06','June'), ('07','July'), ('08','August'), ('09','September'), - ('10','October'), ('11','November'), ('12','December')], 'Month',readonly=True), 'partner_id':fields.many2one('res.partner', 'Partner', readonly=True), 'product_id':fields.many2one('product.product', 'Product', readonly=True), 'company_id':fields.many2one('res.company', 'Company', readonly=True), @@ -63,9 +58,6 @@ class report_stock_move(osv.osv): SELECT min(sm.id) as id, date_trunc('day', sm.date) as date, - to_char(date_trunc('day',sm.date), 'YYYY') as year, - to_char(date_trunc('day',sm.date), 'MM') as month, - to_char(date_trunc('day',sm.date), 'YYYY-MM-DD') as day, avg(date(sm.date)-date(sm.create_date)) as day_diff, avg(date(sm.date_expected)-date(sm.create_date)) as day_diff1, avg(date(sm.date)-date(sm.date_expected)) as day_diff2, @@ -115,8 +107,7 @@ class report_stock_move(osv.osv): coalesce(sp.type, 'other'), date_trunc('day', sm.date), sm.partner_id, sm.state, sm.product_uom, sm.date_expected, sm.product_id, pt.standard_price, sm.picking_id, - sm.company_id, sm.location_id, sm.location_dest_id, pu.factor, pt.categ_id, sp.stock_journal_id, - year, month, day + sm.company_id, sm.location_id, sm.location_dest_id, pu.factor, pt.categ_id, sp.stock_journal_id ) """) diff --git a/addons/stock/report/report_stock_move_view.xml b/addons/stock/report/report_stock_move_view.xml index fa578a82309..452cfd1b3e6 100644 --- a/addons/stock/report/report_stock_move_view.xml +++ b/addons/stock/report/report_stock_move_view.xml @@ -16,6 +16,9 @@ + + + @@ -52,9 +55,9 @@ - - - + + + @@ -66,6 +69,7 @@ form graph + {'contact_display': 'partner','search_default_done':1,'search_default_year':1, 'search_default_month':1, 'search_default_group_type':1, 'group_by': [], 'group_by_no_leaf':1,} Moves Analysis allows you to easily check and analyse your company stock moves. Use this report when you want to analyse the different routes taken by your products and inventory management performance. @@ -78,6 +82,7 @@ +