From 1edb9928572fc8b1c21eb862bdd0d6d4d4e9b57d Mon Sep 17 00:00:00 2001 From: Gery Debongnie Date: Wed, 29 Jan 2014 10:56:55 +0100 Subject: [PATCH 01/18] [IMP] removes the hardcoded Day, Month, Year value in crm.phonecall.report model and updates the corresponding view (addon crm) bzr revid: ged@openerp.com-20140129095655-xn031hst4yw79kna --- addons/crm/report/crm_phonecall_report.py | 11 ----------- addons/crm/report/crm_phonecall_report_view.xml | 7 ++++--- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/addons/crm/report/crm_phonecall_report.py b/addons/crm/report/crm_phonecall_report.py index fba095f1174..6a3e3bf208b 100644 --- a/addons/crm/report/crm_phonecall_report.py +++ b/addons/crm/report/crm_phonecall_report.py @@ -40,20 +40,12 @@ class crm_phonecall_report(osv.osv): _auto = False _columns = { - 'name': fields.char('Year', size=64, required=False, readonly=True), 'user_id':fields.many2one('res.users', 'User', readonly=True), 'section_id':fields.many2one('crm.case.section', 'Section', readonly=True), 'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority'), 'nbr': fields.integer('# of Cases', readonly=True), 'state': fields.selection(AVAILABLE_STATES, 'Status', size=16, 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), 'create_date': fields.datetime('Create Date', readonly=True, select=True), - 'day': fields.char('Day', size=128, readonly=True), 'delay_close': fields.float('Delay to close', digits=(16,2),readonly=True, group_operator="avg",help="Number of Days to close the case"), 'duration': fields.float('Duration', digits=(16,2),readonly=True, group_operator="avg"), 'delay_open': fields.float('Delay to open',digits=(16,2),readonly=True, group_operator="avg",help="Number of Days to open the case"), @@ -77,9 +69,6 @@ class crm_phonecall_report(osv.osv): create or replace view crm_phonecall_report as ( select id, - to_char(c.date, 'YYYY') as name, - to_char(c.date, 'MM') as month, - to_char(c.date, 'YYYY-MM-DD') as day, to_char(c.create_date, 'YYYY-MM-DD') as creation_date, to_char(c.date_open, 'YYYY-MM-DD') as opening_date, to_char(c.date_closed, 'YYYY-mm-dd') as date_closed, diff --git a/addons/crm/report/crm_phonecall_report_view.xml b/addons/crm/report/crm_phonecall_report_view.xml index 9de9adeade3..32ae9704064 100644 --- a/addons/crm/report/crm_phonecall_report_view.xml +++ b/addons/crm/report/crm_phonecall_report_view.xml @@ -12,6 +12,7 @@ + @@ -52,9 +53,9 @@ - - - + + + From 8621b5cc895d10dcdbf694be61f1ca8a9d87f73e Mon Sep 17 00:00:00 2001 From: Gery Debongnie Date: Wed, 29 Jan 2014 11:39:29 +0100 Subject: [PATCH 02/18] [IMP] removes the hardcoded day, month, year values in crm.lead.report.assign model and updates the corresponding view (addon crm_partner_assign) bzr revid: ged@openerp.com-20140129103929-f26368pjhswxvzci --- .../crm_partner_assign/report/crm_lead_report.py | 13 +------------ .../report/crm_lead_report_view.xml | 15 ++++++++------- 2 files changed, 9 insertions(+), 19 deletions(-) diff --git a/addons/crm_partner_assign/report/crm_lead_report.py b/addons/crm_partner_assign/report/crm_lead_report.py index c7a6b76ee44..572e1796b00 100644 --- a/addons/crm_partner_assign/report/crm_lead_report.py +++ b/addons/crm_partner_assign/report/crm_lead_report.py @@ -30,22 +30,14 @@ class crm_lead_report_assign(osv.osv): _auto = False _description = "CRM Lead Report" _columns = { - 'year': fields.char('Year', size=64, required=False, readonly=True), 'partner_assigned_id':fields.many2one('res.partner', 'Partner', readonly=True), 'grade_id':fields.many2one('res.partner.grade', 'Grade', readonly=True), 'user_id':fields.many2one('res.users', 'User', readonly=True), 'country_id':fields.many2one('res.country', 'Country', readonly=True), 'section_id':fields.many2one('crm.case.section', 'Sales Team', 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), 'company_id': fields.many2one('res.company', 'Company', readonly=True), - 'date_assign': fields.date('Partner Date', readonly=True), + 'date_assign': fields.date('Assign Date', readonly=True), 'create_date': fields.datetime('Create Date', readonly=True), - 'day': fields.char('Day', size=128, readonly=True), 'delay_open': fields.float('Delay to Assign',digits=(16,2),readonly=True, group_operator="avg",help="Number of Days to open the case"), 'delay_close': fields.float('Delay to Close',digits=(16,2),readonly=True, group_operator="avg",help="Number of Days to close the case"), 'delay_expected': fields.float('Overpassed Deadline',digits=(16,2),readonly=True, group_operator="avg"), @@ -77,9 +69,6 @@ class crm_lead_report_assign(osv.osv): CREATE OR REPLACE VIEW crm_lead_report_assign AS ( SELECT c.id, - to_char(c.date_assign, 'YYYY') as year, - to_char(c.date_assign, 'MM') as month, - to_char(c.date_assign, 'YYYY-MM-DD') as day, to_char(c.create_date, 'YYYY-MM-DD') as creation_date, to_char(c.date_open, 'YYYY-MM-DD') as opening_date, to_char(c.date_closed, 'YYYY-mm-dd') as date_closed, diff --git a/addons/crm_partner_assign/report/crm_lead_report_view.xml b/addons/crm_partner_assign/report/crm_lead_report_view.xml index a7ff8d80f0f..271c9b2016f 100644 --- a/addons/crm_partner_assign/report/crm_lead_report_view.xml +++ b/addons/crm_partner_assign/report/crm_lead_report_view.xml @@ -35,10 +35,9 @@ - - - - + + + @@ -50,9 +49,11 @@ crm.lead.assign.graph crm.lead.report.assign - - + + + + @@ -63,7 +64,7 @@ Opp. Assignment Analysis crm.lead.report.assign form - {'default_type': 'opportunity', "search_default_group_partner_date": 1, "search_default_group_grade":1,'group_by_no_leaf':1,'group_by':[]} + {'default_type': 'opportunity', 'group_by_no_leaf':1,'group_by':[]} graph [('type', '=', 'opportunity')] From 8a80b284933440769544a3a5eff5699d38cae851 Mon Sep 17 00:00:00 2001 From: Gery Debongnie Date: Wed, 29 Jan 2014 12:09:48 +0100 Subject: [PATCH 03/18] [IMP] removes the tree view in Partnership Analysis reporting menu, and replaces it with a graph view in pivot table mode (addon crm_partner_assign) bzr revid: ged@openerp.com-20140129110948-yzqb4a9bbugbejnk --- .../report/crm_partner_report_view.xml | 30 +++++++------------ 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/addons/crm_partner_assign/report/crm_partner_report_view.xml b/addons/crm_partner_assign/report/crm_partner_report_view.xml index 4e7e13afb15..02320219218 100644 --- a/addons/crm_partner_assign/report/crm_partner_report_view.xml +++ b/addons/crm_partner_assign/report/crm_partner_report_view.xml @@ -24,7 +24,7 @@ domain="[]" context="{'group_by':'grade_id'}" /> - @@ -35,25 +35,15 @@ - - - - crm.partner.assign.report.tree + + crm.partner.assign.report.graph crm.partner.report.assign - - - - - - - - - - - - - + + + + + @@ -62,8 +52,8 @@ Partnership Analysis crm.partner.report.assign - {'search_default_group_grade': 1, 'group_by_no_leaf':1,'group_by':[]} - tree + {'group_by_no_leaf':1,'group_by':[]} + graph [('grade_id', '!=', False)] From 90f2184e938835d545397bb625e625fc9345e4b4 Mon Sep 17 00:00:00 2001 From: Gery Debongnie Date: Wed, 29 Jan 2014 13:47:39 +0100 Subject: [PATCH 04/18] [IMP] improves the Purchase Analysis reporting view, removes old Day, Month, Year field from the postgres view and updates the dashboard graph view (addon purchase) bzr revid: ged@openerp.com-20140129124739-6sir9fz6jak9ic0y --- addons/purchase/board_purchase_view.xml | 11 ++-- addons/purchase/report/purchase_report.py | 12 +--- .../purchase/report/purchase_report_view.xml | 55 +++---------------- 3 files changed, 14 insertions(+), 64 deletions(-) diff --git a/addons/purchase/board_purchase_view.xml b/addons/purchase/board_purchase_view.xml index d491985cf52..a317138a310 100644 --- a/addons/purchase/board_purchase_view.xml +++ b/addons/purchase/board_purchase_view.xml @@ -17,15 +17,12 @@ purchase.report - - - @@ -39,9 +36,9 @@ purchase.report - - - + + + @@ -50,7 +47,7 @@ purchase.report form graph,tree - {'group_by':['month','category_id'],'group_by_no_leaf':1} + {'group_by_no_leaf':1} [('state','in',('approved','except_picking','except_invoice','done'))] diff --git a/addons/purchase/report/purchase_report.py b/addons/purchase/report/purchase_report.py index f6a37bb37a7..ada1d83cdaf 100644 --- a/addons/purchase/report/purchase_report.py +++ b/addons/purchase/report/purchase_report.py @@ -32,8 +32,6 @@ class purchase_report(osv.osv): _auto = False _columns = { 'date': fields.date('Order Date', readonly=True, help="Date on which this document has been created"), - 'name': fields.char('Year',size=64,required=False, readonly=True), - 'day': fields.char('Day', size=128, readonly=True), 'state': fields.selection([('draft', 'Request for Quotation'), ('confirmed', 'Waiting Supplier Ack'), ('approved', 'Approved'), @@ -60,12 +58,10 @@ class purchase_report(osv.osv): 'negociation': fields.float('Purchase-Standard Price', readonly=True, group_operator="avg"), 'price_standard': fields.float('Products Value', readonly=True, group_operator="sum"), 'nbr': fields.integer('# of Lines', 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), 'category_id': fields.many2one('product.category', 'Category', readonly=True) } - _order = 'name desc,price_total desc' + _order = 'date desc, price_total desc' def init(self, cr): tools.sql.drop_view_if_exists(cr, 'purchase_report') cr.execute(""" @@ -73,9 +69,6 @@ class purchase_report(osv.osv): select min(l.id) as id, s.date_order as date, - to_char(s.date_order, 'YYYY') as name, - to_char(s.date_order, 'MM') as month, - to_char(s.date_order, 'YYYY-MM-DD') as day, s.state, s.date_approve, s.minimum_planned_date as expected_date, @@ -121,9 +114,6 @@ class purchase_report(osv.osv): l.product_id, t.categ_id, s.date_order, - to_char(s.date_order, 'YYYY'), - to_char(s.date_order, 'MM'), - to_char(s.date_order, 'YYYY-MM-DD'), s.state, s.warehouse_id, u.uom_type, diff --git a/addons/purchase/report/purchase_report_view.xml b/addons/purchase/report/purchase_report_view.xml index baaf2f8312c..d7700e5fca7 100644 --- a/addons/purchase/report/purchase_report_view.xml +++ b/addons/purchase/report/purchase_report_view.xml @@ -6,7 +6,12 @@ purchase.report + + + + + @@ -43,66 +48,24 @@ - - - + + + - - purchase.order.qty.amount.graph - purchase.report - - - - - - - - - - - purchase.order.by.user.graph - purchase.report - - - - - - - - - - Purchase Analysis purchase.report form graph - {'search_default_year':1,'search_default_month':1,'search_default_group_partner_id':1,'search_default_group_product_id': 1, 'search_default_orders': 1, 'group_by_no_leaf':1,'group_by':[]} + {'search_default_year':1,'search_default_month':1, 'search_default_orders': 1, 'group_by_no_leaf':1,'group_by':[]} Purchase Analysis allows you to easily check and analyse your company purchase history and performance. From this menu you can track your negotiation performance, the delivery performance of your suppliers, etc. - - Total Qty and Amount by month - purchase.report - form - graph - - - - - Total Orders by User per month - purchase.report - form - graph - - - - From 23f4aca0a88031f53c33c415a718b7c1df90b503 Mon Sep 17 00:00:00 2001 From: Gery Debongnie Date: Wed, 29 Jan 2014 14:55:19 +0100 Subject: [PATCH 05/18] [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 @@ + From ddc1d840e7ba26d10cf94d013a3696bbe9777bb3 Mon Sep 17 00:00:00 2001 From: Gery Debongnie Date: Wed, 29 Jan 2014 15:30:55 +0100 Subject: [PATCH 06/18] [IMP] improves the Work Order Analysis reporting view, removes old Day, Month, Year field from the postgres view (addon mrp_operations) bzr revid: ged@openerp.com-20140129143055-2qtivjtkpzyb13zw --- .../mrp_operations/report/mrp_workorder_analysis.py | 7 ------- .../report/mrp_workorder_analysis_view.xml | 11 +++++++---- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/addons/mrp_operations/report/mrp_workorder_analysis.py b/addons/mrp_operations/report/mrp_workorder_analysis.py index f91961ad74c..d9d3947bae6 100644 --- a/addons/mrp_operations/report/mrp_workorder_analysis.py +++ b/addons/mrp_operations/report/mrp_workorder_analysis.py @@ -28,10 +28,6 @@ class mrp_workorder(osv.osv): _description = "Work Order Report" _auto = False _columns = { - 'year': fields.char('Year', size=64, 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), - 'day': fields.char('Day', size=64, readonly=True), 'nbr': fields.integer('# of Lines', readonly=True), 'date': fields.date('Date', readonly=True), 'product_id': fields.many2one('product.product', 'Product', readonly=True), @@ -50,9 +46,6 @@ class mrp_workorder(osv.osv): create or replace view mrp_workorder as ( select to_date(to_char(wl.date_planned, 'MM-dd-YYYY'),'MM-dd-YYYY') as date, - to_char(wl.date_planned, 'YYYY') as year, - to_char(wl.date_planned, 'MM') as month, - to_char(wl.date_planned, 'YYYY-MM-DD') as day, min(wl.id) as id, mp.product_id as product_id, sum(wl.hour) as total_hours, diff --git a/addons/mrp_operations/report/mrp_workorder_analysis_view.xml b/addons/mrp_operations/report/mrp_workorder_analysis_view.xml index 144bfb95c63..92c6ef9adb2 100644 --- a/addons/mrp_operations/report/mrp_workorder_analysis_view.xml +++ b/addons/mrp_operations/report/mrp_workorder_analysis_view.xml @@ -10,7 +10,10 @@ + + + @@ -31,9 +34,9 @@ - - - + + + @@ -45,7 +48,7 @@ graph - {'search_default_Workcenter': 1,'search_default_year':1,'search_default_month':1,'group_by_no_leaf':1,'group_by':[]} + {'search_default_Workcenter': 1,'group_by_no_leaf':1,'group_by':[]} From 8dba681c697c6c8e639a917f39a120c82267a6b5 Mon Sep 17 00:00:00 2001 From: Gery Debongnie Date: Wed, 29 Jan 2014 15:42:33 +0100 Subject: [PATCH 07/18] [IMP] improves the membership reporting view by adding a measure to the pivot table (num paid) (addon membership) bzr revid: ged@openerp.com-20140129144233-4flp69bq188kdy05 --- addons/membership/report/report_membership_view.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/membership/report/report_membership_view.xml b/addons/membership/report/report_membership_view.xml index bfbdcefca5d..50b579d9ec2 100644 --- a/addons/membership/report/report_membership_view.xml +++ b/addons/membership/report/report_membership_view.xml @@ -40,6 +40,7 @@ + From 906f28109cc1eac445c0035beb0046a902f5cd21 Mon Sep 17 00:00:00 2001 From: Gery Debongnie Date: Wed, 29 Jan 2014 16:24:40 +0100 Subject: [PATCH 08/18] [IMP] improves the task analysis reporting view by adding measures to the pivot table (num paid) and changes the view in dashboard project (addon project) bzr revid: ged@openerp.com-20140129152440-ibi9ity10onbi3st --- addons/project/report/project_cumulative.xml | 3 ++- addons/project/report/project_report.py | 9 --------- addons/project/report/project_report_view.xml | 14 +++++++++----- 3 files changed, 11 insertions(+), 15 deletions(-) diff --git a/addons/project/report/project_cumulative.xml b/addons/project/report/project_cumulative.xml index 8886ae17505..e85d9d80138 100644 --- a/addons/project/report/project_cumulative.xml +++ b/addons/project/report/project_cumulative.xml @@ -6,10 +6,11 @@ project.task.history.cumulative.graph project.task.history.cumulative - + + diff --git a/addons/project/report/project_report.py b/addons/project/report/project_report.py index ed086b4318d..5a473469b2d 100644 --- a/addons/project/report/project_report.py +++ b/addons/project/report/project_report.py @@ -29,8 +29,6 @@ class report_project_task_user(osv.osv): _auto = False _columns = { 'name': fields.char('Task Summary', size=128, readonly=True), - 'day': fields.char('Day', size=128, readonly=True), - 'year': fields.char('Year', size=64, required=False, readonly=True), 'user_id': fields.many2one('res.users', 'Assigned To', readonly=True), 'date_start': fields.date('Assignation Date', readonly=True), 'no_of_days': fields.integer('# of Days', size=128, readonly=True), @@ -52,7 +50,6 @@ class report_project_task_user(osv.osv): 'nbr': fields.integer('# of tasks', readonly=True), 'priority': fields.selection([('4', 'Very Low'), ('3', 'Low'), ('2', 'Medium'), ('1', 'Urgent'), ('0', 'Very urgent')], string='Priority', readonly=True), - 'month':fields.selection(fields.date.MONTHS, 'Month', readonly=True), 'state': fields.selection([('draft', 'Draft'), ('open', 'In Progress'), ('pending', 'Pending'), ('cancelled', 'Cancelled'), ('done', 'Done')],'Status', readonly=True), 'company_id': fields.many2one('res.company', 'Company', readonly=True), 'partner_id': fields.many2one('res.partner', 'Contact', readonly=True), @@ -67,9 +64,6 @@ class report_project_task_user(osv.osv): SELECT (select 1 ) AS nbr, t.id as id, - to_char(date_start, 'YYYY') as year, - to_char(date_start, 'MM') as month, - to_char(date_start, 'YYYY-MM-DD') as day, date_trunc('day',t.date_start) as date_start, date_trunc('day',t.date_end) as date_end, date_trunc('day',t.date_last_stage_update) as date_last_stage_update, @@ -102,9 +96,6 @@ class report_project_task_user(osv.osv): total_hours, planned_hours, hours_delay, - year, - month, - day, create_date, write_date, date_start, diff --git a/addons/project/report/project_report_view.xml b/addons/project/report/project_report_view.xml index 6fb4e24e7ad..aced63a34d6 100644 --- a/addons/project/report/project_report_view.xml +++ b/addons/project/report/project_report_view.xml @@ -11,8 +11,12 @@ report.project.task.user - + + + + + @@ -44,9 +48,9 @@ - - - + + + @@ -59,7 +63,7 @@ form graph - {'search_default_year':1,'search_default_project':1,'group_by_no_leaf':1,'group_by':[]} + {'group_by_no_leaf':1,'group_by':[]} This report allows you to analyse the performance of your projects and users. You can analyse the quantities of tasks, the hours spent compared to the planned hours, the average number of days to open or close a task, etc. From 4b3076e955dadd306c8dd94dd8de9316e826de1b Mon Sep 17 00:00:00 2001 From: Gery Debongnie Date: Wed, 29 Jan 2014 17:03:48 +0100 Subject: [PATCH 09/18] [IMP] improves the reporting views in account module (work on the Pivot tables, and remove some useless day/month/year attributes) (addon account) bzr revid: ged@openerp.com-20140129160348-230nvcutbdqh1hx1 --- .../report/account_analytic_entries_report.py | 8 -------- .../report/account_analytic_entries_report_view.xml | 12 ++++++------ addons/account/report/account_invoice_report.py | 13 +------------ .../account/report/account_invoice_report_view.xml | 10 ++++++---- .../account/report/account_treasury_report_view.xml | 2 ++ 5 files changed, 15 insertions(+), 30 deletions(-) diff --git a/addons/account/report/account_analytic_entries_report.py b/addons/account/report/account_analytic_entries_report.py index f7d1177e3b0..1cd0f4c9026 100644 --- a/addons/account/report/account_analytic_entries_report.py +++ b/addons/account/report/account_analytic_entries_report.py @@ -28,11 +28,6 @@ class analytic_entries_report(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), 'user_id': fields.many2one('res.users', 'User',readonly=True), 'name': fields.char('Description', size=64, readonly=True), 'partner_id': fields.many2one('res.partner', 'Partner'), @@ -56,9 +51,6 @@ class analytic_entries_report(osv.osv): min(a.id) as id, count(distinct a.id) as nbr, a.date as date, - to_char(a.date, 'YYYY') as year, - to_char(a.date, 'MM') as month, - to_char(a.date, 'YYYY-MM-DD') as day, a.user_id as user_id, a.name as name, analytic.partner_id as partner_id, diff --git a/addons/account/report/account_analytic_entries_report_view.xml b/addons/account/report/account_analytic_entries_report_view.xml index 047d563cc58..1d2e87be339 100644 --- a/addons/account/report/account_analytic_entries_report_view.xml +++ b/addons/account/report/account_analytic_entries_report_view.xml @@ -6,7 +6,6 @@ analytic.entries.report - @@ -21,9 +20,9 @@ - - - + + + @@ -34,8 +33,9 @@ - - + + + diff --git a/addons/account/report/account_invoice_report.py b/addons/account/report/account_invoice_report.py index d8dc45f9a3b..8fecf85ee0b 100644 --- a/addons/account/report/account_invoice_report.py +++ b/addons/account/report/account_invoice_report.py @@ -55,11 +55,6 @@ class account_invoice_report(osv.osv): _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), 'product_id': fields.many2one('product.product', 'Product', readonly=True), 'product_qty':fields.float('Qty', readonly=True), 'uom_name': fields.char('Reference Unit of Measure', size=128, readonly=True), @@ -105,7 +100,7 @@ class account_invoice_report(osv.osv): def _select(self): select_str = """ - SELECT sub.id, sub.date, sub.year, sub.month, sub.day, sub.product_id, sub.partner_id, sub.country_id, + SELECT sub.id, sub.date, sub.product_id, sub.partner_id, sub.country_id, sub.payment_term, sub.period_id, sub.uom_name, sub.currency_id, sub.journal_id, sub.fiscal_position, sub.user_id, sub.company_id, sub.nbr, sub.type, sub.state, sub.categ_id, sub.date_due, sub.account_id, sub.account_line_id, sub.partner_bank_id, @@ -118,9 +113,6 @@ class account_invoice_report(osv.osv): select_str = """ SELECT min(ail.id) AS id, ai.date_invoice AS date, - to_char(ai.date_invoice::timestamp with time zone, 'YYYY'::text) AS year, - to_char(ai.date_invoice::timestamp with time zone, 'MM'::text) AS month, - to_char(ai.date_invoice::timestamp with time zone, 'YYYY-MM-DD'::text) AS day, ail.product_id, ai.partner_id, ai.payment_term, ai.period_id, CASE WHEN u.uom_type::text <> 'reference'::text @@ -192,9 +184,6 @@ class account_invoice_report(osv.osv): def _group_by(self): group_by_str = """ GROUP BY ail.product_id, ai.date_invoice, ai.id, - to_char(ai.date_invoice::timestamp with time zone, 'YYYY'::text), - to_char(ai.date_invoice::timestamp with time zone, 'MM'::text), - to_char(ai.date_invoice::timestamp with time zone, 'YYYY-MM-DD'::text), ai.partner_id, ai.payment_term, ai.period_id, u.name, ai.currency_id, ai.journal_id, ai.fiscal_position, ai.user_id, ai.company_id, ai.type, ai.state, pt.categ_id, ai.date_due, ai.account_id, ail.account_id, ai.partner_bank_id, ai.residual, diff --git a/addons/account/report/account_invoice_report_view.xml b/addons/account/report/account_invoice_report_view.xml index 67d568801b7..24723d7fb12 100644 --- a/addons/account/report/account_invoice_report_view.xml +++ b/addons/account/report/account_invoice_report_view.xml @@ -6,8 +6,10 @@ account.invoice.report + - + + @@ -47,9 +49,9 @@ - - - + + + diff --git a/addons/account/report/account_treasury_report_view.xml b/addons/account/report/account_treasury_report_view.xml index fe898cd81ce..f1c84849831 100644 --- a/addons/account/report/account_treasury_report_view.xml +++ b/addons/account/report/account_treasury_report_view.xml @@ -24,6 +24,8 @@ + + From d07bb7e8703ec7168c0b601ac2ca8e718ebd3ce1 Mon Sep 17 00:00:00 2001 From: Gery Debongnie Date: Wed, 29 Jan 2014 17:07:09 +0100 Subject: [PATCH 10/18] [IMP] improves the reporting view Asset Analysis in accounting module (adds some relevent measures to the pivot table) (addon account_asset) bzr revid: ged@openerp.com-20140129160709-t5e4c9h91y0jug6e --- addons/account_asset/report/account_asset_report_view.xml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/addons/account_asset/report/account_asset_report_view.xml b/addons/account_asset/report/account_asset_report_view.xml index 4655172572c..19299eee501 100644 --- a/addons/account_asset/report/account_asset_report_view.xml +++ b/addons/account_asset/report/account_asset_report_view.xml @@ -7,8 +7,11 @@ asset.asset.report - - + + + + + From 7fd82bc83b27180f40483e0a26f19ab35d2718e2 Mon Sep 17 00:00:00 2001 From: Gery Debongnie Date: Thu, 30 Jan 2014 10:18:16 +0100 Subject: [PATCH 11/18] [FIX] remove references to 'month' account.invoice.report field in sale/board_sale_view.xml. That field was removed in the model (addon sale) bzr revid: ged@openerp.com-20140130091816-y7w38epdk440t44m --- addons/sale/board_sale_view.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/sale/board_sale_view.xml b/addons/sale/board_sale_view.xml index 021e0c140af..0ad4a6774fc 100644 --- a/addons/sale/board_sale_view.xml +++ b/addons/sale/board_sale_view.xml @@ -17,7 +17,7 @@ - + @@ -28,7 +28,7 @@ - + @@ -40,8 +40,8 @@ form graph,tree - [('year','ilike',time.strftime('%Y')),('user_id','=',uid)] - {'group_by_no_leaf':1,'group_by':['month']} + [('date','<=', time.strftime('%Y-%m-%d')),('date','>=',time.strftime('%Y-01-01')),('user_id','=',uid)] + {'group_by_no_leaf':1} From e58efb7361a6e2ef9d328545e277060de224d0d1 Mon Sep 17 00:00:00 2001 From: Gery Debongnie Date: Thu, 30 Jan 2014 10:44:55 +0100 Subject: [PATCH 12/18] [IMP] replace the Order Analysis tree view by a graph view to use the new Pivot table. Also, removes the Day/Month/Year attributes of the postgres view (addon point_of_sale) bzr revid: ged@openerp.com-20140130094455-cai7dvvozwhojaff --- .../point_of_sale/report/pos_order_report.py | 13 +----- .../report/pos_order_report_view.xml | 46 +++++++------------ 2 files changed, 18 insertions(+), 41 deletions(-) diff --git a/addons/point_of_sale/report/pos_order_report.py b/addons/point_of_sale/report/pos_order_report.py index f3ee5e317c8..5489ccf7099 100644 --- a/addons/point_of_sale/report/pos_order_report.py +++ b/addons/point_of_sale/report/pos_order_report.py @@ -28,11 +28,6 @@ class pos_order_report(osv.osv): _auto = False _columns = { 'date': fields.date('Date Order', readonly=True), - 'year': fields.char('Year', size=4, 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), - 'day': fields.char('Day', size=128, readonly=True), 'partner_id':fields.many2one('res.partner', 'Partner', readonly=True), 'product_id':fields.many2one('product.product', 'Product', readonly=True), 'state': fields.selection([('draft', 'New'), ('paid', 'Closed'), ('done', 'Synchronized'), ('invoiced', 'Invoiced'), ('cancel', 'Cancelled')], @@ -57,15 +52,12 @@ class pos_order_report(osv.osv): select min(l.id) as id, count(*) as nbr, - to_date(to_char(s.date_order, 'dd-MM-YYYY'),'dd-MM-YYYY') as date, + s.date_order as date, sum(l.qty * u.factor) as product_qty, sum(l.qty * l.price_unit) as price_total, sum((l.qty * l.price_unit) * (l.discount / 100)) as total_discount, (sum(l.qty*l.price_unit)/sum(l.qty * u.factor))::decimal(16,2) as average_price, sum(cast(to_char(date_trunc('day',s.date_order) - date_trunc('day',s.create_date),'DD') as int)) as delay_validation, - to_char(s.date_order, 'YYYY') as year, - to_char(s.date_order, 'MM') as month, - to_char(s.date_order, 'YYYY-MM-DD') as day, s.partner_id as partner_id, s.state as state, s.user_id as user_id, @@ -78,8 +70,7 @@ class pos_order_report(osv.osv): left join product_template pt on (pt.id=l.product_id) left join product_uom u on (u.id=pt.uom_id) group by - to_char(s.date_order, 'dd-MM-YYYY'),to_char(s.date_order, 'YYYY'),to_char(s.date_order, 'MM'), - to_char(s.date_order, 'YYYY-MM-DD'), s.partner_id,s.state, + s.date_order, s.partner_id,s.state, s.user_id,s.warehouse_id,s.company_id,s.sale_journal,l.product_id,s.create_date having sum(l.qty * u.factor) != 0)""") diff --git a/addons/point_of_sale/report/pos_order_report_view.xml b/addons/point_of_sale/report/pos_order_report_view.xml index 135b6dcadaa..a34bab9c559 100644 --- a/addons/point_of_sale/report/pos_order_report_view.xml +++ b/addons/point_of_sale/report/pos_order_report_view.xml @@ -1,29 +1,18 @@ - - report.pos.order.tree + + report.pos.order.graph report.pos.order - - - - - - - - - - - - - - - - - - - + + + + + + + + @@ -36,10 +25,7 @@ - - - + @@ -50,9 +36,9 @@ - - - + + + @@ -62,9 +48,9 @@ Orders Analysis report.pos.order form - tree + graph - {'search_default_year':1,'search_default_today':1,'group_by_no_leaf':1,'group_by':['product_id']} + {'search_default_year':1, 'group_by_no_leaf':1,'group_by':['product_id']} From b44035d478446226da790c0ffa681411bfe66561 Mon Sep 17 00:00:00 2001 From: Gery Debongnie Date: Thu, 30 Jan 2014 11:06:56 +0100 Subject: [PATCH 13/18] [FIX] changes reference to removed field account_invoice_report_day to account_invoice_report_date in addon gamification_sale_crm bzr revid: ged@openerp.com-20140130100656-5ki5ihw7tla2yuya --- addons/gamification_sale_crm/sale_crm_goals.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/addons/gamification_sale_crm/sale_crm_goals.xml b/addons/gamification_sale_crm/sale_crm_goals.xml index b48cc8a3117..4c1f8e46149 100644 --- a/addons/gamification_sale_crm/sale_crm_goals.xml +++ b/addons/gamification_sale_crm/sale_crm_goals.xml @@ -10,7 +10,7 @@ True - + [('state','!=','cancel'),('user_id','=',user.id),('type','=','out_invoice')] @@ -86,7 +86,7 @@ count orders - + [('state','=','paid'),('user_id','=',user.id),('type','=','out_invoice')] @@ -96,7 +96,7 @@ True - + [('state','=','paid'),('user_id','=',user.id),('type','=','out_invoice')] @@ -108,7 +108,7 @@ lower invoices - + [('state','!=','cancel'),('user_id','=',user.id),('type','=','out_refund')] @@ -119,7 +119,7 @@ True - + [('state','!=','cancel'),('user_id','=',user.id),('type','=','out_refund')] From 6a8e9256ae554326a18f0fb4b57a84f5f94577e2 Mon Sep 17 00:00:00 2001 From: Gery Debongnie Date: Thu, 30 Jan 2014 11:51:40 +0100 Subject: [PATCH 14/18] [IMP] updates the reporting fleet view (cost analysis/indicative costs analysis) to use the new pivot table view (addon fleet) bzr revid: ged@openerp.com-20140130105140-f24cdpt3peqvavxn --- addons/fleet/fleet_board_view.xml | 12 ++++++------ addons/fleet/fleet_view.xml | 20 +++++++++----------- 2 files changed, 15 insertions(+), 17 deletions(-) diff --git a/addons/fleet/fleet_board_view.xml b/addons/fleet/fleet_board_view.xml index 41093d2c283..c4732d9a0f4 100644 --- a/addons/fleet/fleet_board_view.xml +++ b/addons/fleet/fleet_board_view.xml @@ -54,10 +54,10 @@ Costs Analysis fleet.vehicle.cost - + form - tree - {"search_default_parent_false" : True,"search_default_groupby_year" : True,"search_default_groupby_cost_type" : True,"search_default_groupby_cost_subtype" : True, "search_default_groupby_vehicle_id" : True,} + graph + {"search_default_parent_false" : True,"search_default_groupby_year" : True, "search_default_groupby_cost_subtype" : True,"search_default_groupby_vehicle_id" : True}

OpenERP helps you managing the costs for your different vehicles @@ -73,10 +73,10 @@ Indicative Costs Analysis fleet.vehicle.cost - + form - tree - {"search_default_parent_true" : True,"search_default_groupby_cost_subtype" : True,"search_default_groupby_cost_type" : True,"search_default_groupby_parent_id" : True,} + graph + {"search_default_parent_true" : True,"search_default_groupby_cost_subtype" : True,"search_default_groupby_parent_id" : True,}

OpenERP helps you managing the costs for your different vehicles diff --git a/addons/fleet/fleet_view.xml b/addons/fleet/fleet_view.xml index db38821b56e..c8929d2b492 100644 --- a/addons/fleet/fleet_view.xml +++ b/addons/fleet/fleet_view.xml @@ -849,19 +849,17 @@ - - fleet.vehicle.cost.tree + + fleet.vehicle.cost.graph fleet.vehicle.cost - - - - - - - - - + + + + + + + From 85cb9774b7c1e7b476264c841725857e046f22be Mon Sep 17 00:00:00 2001 From: Gery Debongnie Date: Thu, 30 Jan 2014 13:44:02 +0100 Subject: [PATCH 15/18] [IMP] changes the reception analysis reporting view (warehouse) to select the correct pivot table (addon purchase) bzr revid: ged@openerp.com-20140130124402-crfr39uqptlzc3cv --- addons/purchase/report/purchase_report_view.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/purchase/report/purchase_report_view.xml b/addons/purchase/report/purchase_report_view.xml index d7700e5fca7..50b22f40a05 100644 --- a/addons/purchase/report/purchase_report_view.xml +++ b/addons/purchase/report/purchase_report_view.xml @@ -76,6 +76,7 @@ form graph + {'full':'1','contact_display': 'partner','search_default_done':1, 'search_default_month':1, 'search_default_group_type':1, 'group_by': [], 'group_by_no_leaf':1,'search_default_year':1,} Reception Analysis allows you to easily check and analyse your company order receptions and the performance of your supplier's deliveries. From 18a2a01853696d5b08e6737e77074e32098ac10c Mon Sep 17 00:00:00 2001 From: Gery Debongnie Date: Thu, 30 Jan 2014 14:13:59 +0100 Subject: [PATCH 16/18] [IMP] improves the reporting view Expenses Analysis (add some measures to the table) in addon hr_expense bzr revid: ged@openerp.com-20140130131359-ziq94d5jmvrxbc3y --- addons/hr_expense/report/hr_expense_report_view.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/addons/hr_expense/report/hr_expense_report_view.xml b/addons/hr_expense/report/hr_expense_report_view.xml index 45a72fa0630..f2ba5290c96 100644 --- a/addons/hr_expense/report/hr_expense_report_view.xml +++ b/addons/hr_expense/report/hr_expense_report_view.xml @@ -10,6 +10,9 @@ + + + From a768f15038f1c93f2ae2df05487fdfa76c8d1273 Mon Sep 17 00:00:00 2001 From: Gery Debongnie Date: Thu, 30 Jan 2014 14:17:37 +0100 Subject: [PATCH 17/18] [IMP] improves the reporting view Timesheet Analysis (add some measures to the table) in addon hr_timesheet_sheet bzr revid: ged@openerp.com-20140130131737-hibhsfqurtxe7weh --- addons/hr_timesheet_sheet/report/hr_timesheet_report_view.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/hr_timesheet_sheet/report/hr_timesheet_report_view.xml b/addons/hr_timesheet_sheet/report/hr_timesheet_report_view.xml index 5e2ca249d7d..8e06530ee9b 100644 --- a/addons/hr_timesheet_sheet/report/hr_timesheet_report_view.xml +++ b/addons/hr_timesheet_sheet/report/hr_timesheet_report_view.xml @@ -9,6 +9,7 @@ + From e96e86b3148acd823bf2357c6c0350ef789e1002 Mon Sep 17 00:00:00 2001 From: Gery Debongnie Date: Thu, 30 Jan 2014 14:20:07 +0100 Subject: [PATCH 18/18] [IMP] improves the reporting view Timesheet Sheet Analysis (add some measures to the table) in addon hr_timesheet_sheet bzr revid: ged@openerp.com-20140130132007-uyvddo0eq8yssft8 --- addons/hr_timesheet_sheet/report/timesheet_report_view.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/addons/hr_timesheet_sheet/report/timesheet_report_view.xml b/addons/hr_timesheet_sheet/report/timesheet_report_view.xml index 47854b1f2fd..a85b17b88af 100644 --- a/addons/hr_timesheet_sheet/report/timesheet_report_view.xml +++ b/addons/hr_timesheet_sheet/report/timesheet_report_view.xml @@ -9,6 +9,10 @@ + + + +