From 5e5c73e7ba9f389e8c740b5daf39f14054c5615f Mon Sep 17 00:00:00 2001 From: qdc Date: Thu, 21 Aug 2014 12:53:47 +0200 Subject: [PATCH] [IMP] Cleaning of reporting (group_by, filters), adding new favourites and default views, some renaming (py and xml files) --- addons/account/account_invoice_view.xml | 25 ++-- .../report/account_analytic_entries_report.py | 6 +- .../account_analytic_entries_report_view.xml | 25 ++-- .../account/report/account_entries_report.py | 12 +- .../report/account_entries_report_view.xml | 45 +++---- .../account/report/account_invoice_report.py | 10 +- .../report/account_invoice_report_view.xml | 29 ++--- .../report/account_treasury_report_view.xml | 3 + .../report/account_asset_report_view.xml | 37 +++--- .../report/account_followup_report.xml | 18 +-- .../account_voucher_sales_receipt_view.xml | 31 +++-- addons/crm/__openerp__.py | 3 +- addons/crm/crm_lead_demo.xml | 22 ++++ addons/crm/crm_lead_menu.xml | 4 +- addons/crm/crm_lead_view.xml | 23 ++-- addons/crm/report/__init__.py | 6 +- addons/crm/report/crm_lead_report.py | 40 ++---- addons/crm/report/crm_lead_report_view.xml | 76 +++++------ addons/crm/report/crm_opportunity_report.py | 101 ++++++++++++++ .../report/crm_opportunity_report_view.xml | 123 ++++++++++++++++++ addons/crm/report/crm_phonecall_report.py | 14 +- .../crm/report/crm_phonecall_report_view.xml | 56 +++++--- addons/crm_claim/report/crm_claim_report.py | 12 +- .../report/crm_claim_report_view.xml | 37 +++--- .../report/crm_helpdesk_report.py | 12 +- .../report/crm_helpdesk_report_view.xml | 34 ++--- addons/crm_partner_assign/crm_lead_view.xml | 4 +- .../report/crm_lead_report.py | 16 +-- .../report/crm_lead_report_view.xml | 30 ++--- .../report/crm_partner_report.py | 4 +- .../report/crm_partner_report_view.xml | 30 ++--- .../event/report/report_event_registration.py | 4 +- .../report/report_event_registration_view.xml | 26 ++-- addons/fleet/fleet_board_view.xml | 22 ++-- addons/fleet/fleet_view.xml | 102 ++++++++------- addons/hr_attendance/hr_attendance_view.xml | 13 +- .../report/hr_evaluation_report.py | 15 +-- .../report/hr_evaluation_report_view.xml | 21 +-- addons/hr_expense/report/hr_expense_report.py | 6 +- .../report/hr_expense_report_view.xml | 27 ++-- addons/hr_holidays/hr_holidays_view.xml | 51 +++++--- .../report/hr_recruitment_report_view.xml | 22 ++-- .../report/hr_timesheet_report.py | 6 +- .../report/hr_timesheet_report_view.xml | 20 ++- .../report/hr_timesheet_report.py | 20 +-- .../report/hr_timesheet_report_view.xml | 38 ++++-- .../report/payment_advice_report_view.xml | 18 ++- .../report/payslip_report_view.xml | 17 +-- .../report/campaign_analysis_view.xml | 37 ++++-- addons/membership/report/report_membership.py | 4 +- .../report/report_membership_view.xml | 32 +++-- .../report/mrp_workorder_analysis.py | 4 +- .../report/mrp_workorder_analysis_view.xml | 43 ++++-- .../point_of_sale/report/pos_order_report.py | 13 +- .../report/pos_order_report_view.xml | 26 ++-- addons/project/project.py | 10 +- addons/project/project_view.xml | 37 +++--- addons/project/report/project_cumulative.xml | 13 +- addons/project/report/project_report.py | 18 +-- addons/project/report/project_report_view.xml | 32 +++-- addons/project_issue/project_issue_menu.xml | 9 +- addons/project_issue/project_issue_view.xml | 42 ++++-- .../report/project_issue_report.py | 23 ++-- .../report/project_issue_report_view.xml | 34 ++--- addons/purchase/report/purchase_report.py | 14 +- .../purchase/report/purchase_report_view.xml | 58 ++++++--- addons/sale/report/sale_report.py | 14 +- addons/sale/report/sale_report_view.xml | 43 +++--- addons/sale/sale_view.xml | 10 +- addons/sale_stock/report/sale_report_view.xml | 4 +- 70 files changed, 1104 insertions(+), 732 deletions(-) create mode 100644 addons/crm/report/crm_opportunity_report.py create mode 100644 addons/crm/report/crm_opportunity_report_view.xml diff --git a/addons/account/account_invoice_view.xml b/addons/account/account_invoice_view.xml index 93dd7bf2e41..250c8e26fdf 100644 --- a/addons/account/account_invoice_view.xml +++ b/addons/account/account_invoice_view.xml @@ -446,6 +446,14 @@ + + + By Salespersons + account.invoice + + {'group_by': ['date_invoice:month', 'user_id']} + + account.invoice.select account.invoice @@ -463,14 +471,13 @@ - - - - - - - - + + + + + + + @@ -582,7 +589,7 @@

- Click to create a customer refund. + Click to create a customer refund.

A refund is a document that credits an invoice completely or partially. diff --git a/addons/account/report/account_analytic_entries_report.py b/addons/account/report/account_analytic_entries_report.py index 1cd0f4c9026..b527193bd10 100644 --- a/addons/account/report/account_analytic_entries_report.py +++ b/addons/account/report/account_analytic_entries_report.py @@ -40,8 +40,8 @@ class analytic_entries_report(osv.osv): 'product_id': fields.many2one('product.product', 'Product', required=True), 'product_uom_id': fields.many2one('product.uom', 'Product Unit of Measure', required=True), 'amount': fields.float('Amount', readonly=True), - 'unit_amount': fields.float('Quantity', readonly=True), - 'nbr': fields.integer('#Entries', readonly=True), + 'unit_amount': fields.integer('Unit Amount', readonly=True), + 'nbr_entries': fields.integer('# Entries', readonly=True, oldname='nbr'), } def init(self, cr): tools.drop_view_if_exists(cr, 'analytic_entries_report') @@ -49,7 +49,7 @@ class analytic_entries_report(osv.osv): create or replace view analytic_entries_report as ( select min(a.id) as id, - count(distinct a.id) as nbr, + count(distinct a.id) as nbr_entries, a.date as date, a.user_id as user_id, a.name as name, diff --git a/addons/account/report/account_analytic_entries_report_view.xml b/addons/account/report/account_analytic_entries_report_view.xml index 2020b56d1fe..e0d963f5496 100644 --- a/addons/account/report/account_analytic_entries_report_view.xml +++ b/addons/account/report/account_analytic_entries_report_view.xml @@ -7,20 +7,18 @@ - + - - - - - - - - - + + + + + + + @@ -30,8 +28,9 @@ analytic.entries.report - - + + + @@ -42,8 +41,8 @@ analytic.entries.report form graph - {'search_default_year':1,'search_default_month':1, 'group_by_no_leaf':1, 'search_default_Account':1, 'search_default_Month':1, 'group_by':[]} + {'group_by_no_leaf':1, 'search_default_Account':1, 'group_by':[]} From this view, have an analysis of your different analytic entries following the analytic account you defined matching your business need. Use the tool search to analyse information about analytic entries generated in the system. diff --git a/addons/account/report/account_entries_report.py b/addons/account/report/account_entries_report.py index 2a8049ba403..c6135bd2d0d 100644 --- a/addons/account/report/account_entries_report.py +++ b/addons/account/report/account_entries_report.py @@ -27,9 +27,9 @@ class account_entries_report(osv.osv): _name = "account.entries.report" _description = "Journal Items Analysis" _auto = False - _rec_name = 'date' + _rec_name = 'date_effective' _columns = { - 'date': fields.date('Effective Date', readonly=True), + 'date_effective': fields.date('Effective Date', readonly=True, oldname='date'), 'date_created': fields.date('Date Created', readonly=True), 'date_maturity': fields.date('Date Maturity', readonly=True), 'ref': fields.char('Reference', readonly=True), @@ -50,7 +50,7 @@ class account_entries_report(osv.osv): 'reconcile_id': fields.many2one('account.move.reconcile', 'Reconciliation number', readonly=True), 'partner_id': fields.many2one('res.partner','Partner', readonly=True), 'analytic_account_id': fields.many2one('account.analytic.account', 'Analytic Account', readonly=True), - 'quantity': fields.float('Products Quantity', digits=(16,2), readonly=True), + 'product_quantity': fields.float('Products Quantity', digits=(16,2), readonly=True, oldname='quantity'), 'user_type': fields.many2one('account.account.type', 'Account Type', readonly=True), 'type': fields.selection([ ('receivable', 'Receivable'), @@ -67,7 +67,7 @@ class account_entries_report(osv.osv): 'company_id': fields.many2one('res.company', 'Company', readonly=True), } - _order = 'date desc' + _order = 'date_effective desc' def search(self, cr, uid, args, offset=0, limit=None, order=None, context=None, count=False): @@ -110,7 +110,7 @@ class account_entries_report(osv.osv): create or replace view account_entries_report as ( select l.id as id, - am.date as date, + am.date as date_effective, l.date_maturity as date_maturity, l.date_created as date_created, am.ref as ref, @@ -129,7 +129,7 @@ class account_entries_report(osv.osv): a.type as type, a.user_type as user_type, 1 as nbr, - l.quantity as quantity, + l.quantity as product_quantity, l.currency_id as currency_id, l.amount_currency as amount_currency, l.debit as debit, diff --git a/addons/account/report/account_entries_report_view.xml b/addons/account/report/account_entries_report_view.xml index f52717d5c73..3f82a96cd77 100644 --- a/addons/account/report/account_entries_report_view.xml +++ b/addons/account/report/account_entries_report_view.xml @@ -6,12 +6,12 @@ account.entries.report - + - + @@ -36,10 +36,11 @@ account.entries.report - - - - + + + + + @@ -60,17 +61,17 @@ account.entries.report - + - - + + - - + + - - + + @@ -81,17 +82,13 @@ - - - - - - - - - - - + + + + + + + diff --git a/addons/account/report/account_invoice_report.py b/addons/account/report/account_invoice_report.py index 7a5ce9c0fb1..4c5189d617f 100644 --- a/addons/account/report/account_invoice_report.py +++ b/addons/account/report/account_invoice_report.py @@ -56,7 +56,7 @@ class account_invoice_report(osv.osv): _columns = { 'date': fields.date('Date', readonly=True), 'product_id': fields.many2one('product.product', 'Product', readonly=True), - 'product_qty':fields.float('Qty', readonly=True), + 'product_qty':fields.float('Product Quantity', readonly=True), 'uom_name': fields.char('Reference Unit of Measure', size=128, readonly=True), 'payment_term': fields.many2one('account.payment.term', 'Payment Term', readonly=True), 'period_id': fields.many2one('account.period', 'Force Period', domain=[('state','<>','done')], readonly=True), @@ -73,7 +73,7 @@ class account_invoice_report(osv.osv): 'price_average': fields.float('Average Price', readonly=True, group_operator="avg"), 'user_currency_price_average': fields.function(_compute_amounts_in_user_currency, string="Average Price", type='float', digits_compute=dp.get_precision('Account'), multi="_compute_amounts"), 'currency_rate': fields.float('Currency Rate', readonly=True), - 'nbr':fields.integer('# of Lines', readonly=True), + 'nbr_invoices':fields.integer('# of Invoices', readonly=True, oldname='nbr'), 'type': fields.selection([ ('out_invoice','Customer Invoice'), ('in_invoice','Supplier Invoice'), @@ -120,7 +120,7 @@ class account_invoice_report(osv.osv): select_str = """ 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.fiscal_position, sub.user_id, sub.company_id, sub.nbr_invoices, sub.type, sub.state, sub.categ_id, sub.date_due, sub.account_id, sub.account_line_id, sub.partner_bank_id, sub.product_qty, sub.price_total / cr.rate as price_total, sub.price_average /cr.rate as price_average, cr.rate as currency_rate, sub.residual / cr.rate as residual, sub.commercial_partner_id as commercial_partner_id @@ -142,7 +142,7 @@ class account_invoice_report(osv.osv): ELSE u.name END AS uom_name, ai.currency_id, ai.journal_id, ai.fiscal_position, ai.user_id, ai.company_id, - count(ail.*) AS nbr, + count(ail.*) AS nbr_invoices, ai.type, ai.state, pt.categ_id, ai.date_due, ai.account_id, ail.account_id AS account_line_id, ai.partner_bank_id, SUM(CASE @@ -226,7 +226,7 @@ class account_invoice_report(osv.osv): OR (sub.date IS NULL AND cr2.name <= NOW())) ORDER BY name DESC LIMIT 1) )""" % ( - self._table, + self._table, self._select(), self._sub_select(), self._from(), self._group_by())) diff --git a/addons/account/report/account_invoice_report_view.xml b/addons/account/report/account_invoice_report_view.xml index 1983d7ec9fc..6818d075e7f 100644 --- a/addons/account/report/account_invoice_report_view.xml +++ b/addons/account/report/account_invoice_report_view.xml @@ -6,10 +6,8 @@ account.invoice.report - - - + @@ -58,7 +56,7 @@ - + @@ -74,19 +72,14 @@ - - - - - - - - - - - - - + + + + + + + + @@ -97,7 +90,7 @@ account.invoice.report form graph - {'search_default_current':1, 'search_default_year': 1, 'search_default_customer':1, 'group_by':[], 'group_by_no_leaf':1,} + {'search_default_current':1, 'search_default_customer':1, 'group_by':[], 'group_by_no_leaf':1,} From this report, you can have an overview of the amount invoiced to your customer. The tool search can also be used to personalise your Invoices reports and so, match this analysis to your needs. diff --git a/addons/account/report/account_treasury_report_view.xml b/addons/account/report/account_treasury_report_view.xml index f1c84849831..91357c01b8b 100644 --- a/addons/account/report/account_treasury_report_view.xml +++ b/addons/account/report/account_treasury_report_view.xml @@ -38,6 +38,9 @@ + + + diff --git a/addons/account_asset/report/account_asset_report_view.xml b/addons/account_asset/report/account_asset_report_view.xml index ff6f0b0d52d..c3b22f7374d 100644 --- a/addons/account_asset/report/account_asset_report_view.xml +++ b/addons/account_asset/report/account_asset_report_view.xml @@ -7,15 +7,15 @@ asset.asset.report - - + + + - - + asset.asset.report.search asset.asset.report @@ -23,10 +23,10 @@ - - + + - + @@ -35,24 +35,25 @@ - - - - + + + + + - + - - + + Assets Analysis asset.asset.report form graph - {'search_default_year':1,'search_default_this_month':1,'search_default_asset_category':1, 'search_default_posted':1, 'group_by':[], 'group_by_no_leaf':1} + {'group_by':[], 'group_by_no_leaf':1}

From this report, you can have an overview on all depreciation. The @@ -61,7 +62,7 @@

- + diff --git a/addons/account_followup/report/account_followup_report.xml b/addons/account_followup/report/account_followup_report.xml index e3f4ec6f8e9..e7d7aba14a8 100644 --- a/addons/account_followup/report/account_followup_report.xml +++ b/addons/account_followup/report/account_followup_report.xml @@ -7,7 +7,8 @@ account_followup.stat - + + @@ -19,19 +20,20 @@ - - - - - - - + + + + + + diff --git a/addons/account_voucher/report/account_voucher_sales_receipt_view.xml b/addons/account_voucher/report/account_voucher_sales_receipt_view.xml index 78af9d28fc5..5621da68d05 100644 --- a/addons/account_voucher/report/account_voucher_sales_receipt_view.xml +++ b/addons/account_voucher/report/account_voucher_sales_receipt_view.xml @@ -1,13 +1,13 @@ - - + sale.receipt.report.graph sale.receipt.report - + + @@ -20,9 +20,9 @@ - - - + + + @@ -31,14 +31,13 @@ - - - - - - - - + + + + + + + @@ -49,7 +48,7 @@ sale.receipt.report form graph - {'search_default_year':1,'search_default_month':1,'search_default_current':1, 'search_default_partner':1, 'search_default_customer':1, 'group_by':[], 'group_by_no_leaf':1,} + {'search_default_year':1,'search_default_month':1,'search_default_partner':1, 'search_default_customer':1, 'group_by':[], 'group_by_no_leaf':1,}

@@ -63,6 +62,6 @@ - + diff --git a/addons/crm/__openerp__.py b/addons/crm/__openerp__.py index 15544dc3dff..f5b5240cea6 100644 --- a/addons/crm/__openerp__.py +++ b/addons/crm/__openerp__.py @@ -74,7 +74,7 @@ Dashboard for CRM will include: 'wizard/crm_merge_opportunities_view.xml', 'crm_view.xml', - + 'crm_phonecall_view.xml', 'crm_phonecall_menu.xml', @@ -84,6 +84,7 @@ Dashboard for CRM will include: 'calendar_event_menu.xml', 'report/crm_lead_report_view.xml', + 'report/crm_opportunity_report_view.xml', 'report/crm_phonecall_report_view.xml', 'res_partner_view.xml', diff --git a/addons/crm/crm_lead_demo.xml b/addons/crm/crm_lead_demo.xml index f5b38f8078b..48b62a7b0bf 100644 --- a/addons/crm/crm_lead_demo.xml +++ b/addons/crm/crm_lead_demo.xml @@ -552,6 +552,28 @@ Andrew + + opportunity + Interest in your products + + + Agrolait + info@agrolait.com + + 69 rue de Chimay + + Wavre + 1300 + + 2 + + + Send Catalogue by Email + + + + + bWlncmF0aW9uIHRlc3Q= diff --git a/addons/crm/crm_lead_menu.xml b/addons/crm/crm_lead_menu.xml index f02f9305c4b..2569b85972d 100644 --- a/addons/crm/crm_lead_menu.xml +++ b/addons/crm/crm_lead_menu.xml @@ -36,8 +36,8 @@ kanban,tree,graph,form,calendar [('type','=','opportunity')] { - 'stage_type': 'opportunity', - 'default_type': 'opportunity', + 'stage_type': 'opportunity', + 'default_type': 'opportunity', 'default_user_id': uid } diff --git a/addons/crm/crm_lead_view.xml b/addons/crm/crm_lead_view.xml index a567be10619..e1a7d8443c7 100644 --- a/addons/crm/crm_lead_view.xml +++ b/addons/crm/crm_lead_view.xml @@ -101,7 +101,7 @@

- - - - - - -
+ @@ -355,7 +355,7 @@ - +
@@ -384,7 +384,7 @@ - +
  • @@ -392,7 +392,7 @@
  • - +
@@ -403,7 +403,7 @@ - + Vehicles @@ -412,7 +412,7 @@ kanban,tree,form

- Click to create a new vehicle. + Click to create a new vehicle.

You will be able to manage your fleet by keeping track of the contracts, services, fixed and recurring costs, odometers and @@ -507,7 +507,7 @@ tree,form,graph

- Click to create a new contract. + Click to create a new contract.

Manage all your contracts (leasing, insurances, etc.) with their related services, costs. Odoo will automatically warn @@ -600,7 +600,7 @@ - + fleet.vehicle.odometer.search fleet.vehicle.odometer @@ -622,7 +622,7 @@ fleet.vehicle.odometer - + @@ -636,7 +636,7 @@ {"search_default_groupby_vehicle" : True}

- Click to create a new odometer log. + Click to create a new odometer log.

Here you can add various odometer entries for all vehicles. @@ -692,11 +692,11 @@ fleet.vehicle.log.fuel - + - + @@ -705,7 +705,7 @@ - + fleet.vehicle.log.fuel.search fleet.vehicle.log.fuel @@ -742,7 +742,7 @@ {"search_default_groupby_vehicle" : True}

- Click to create a new fuel log. + Click to create a new fuel log.

Here you can add refuelling entries for all vehicles. You can also filter logs of a particular vehicle using the search @@ -821,7 +821,7 @@ - + @@ -845,7 +845,7 @@ tree,form,graph

- Click to create a new service entry. + Click to create a new service entry.

Odoo helps you keeping track of all the services done on your vehicle. Services can be of many type: occasional @@ -898,15 +898,26 @@ - + fleet.vehicle.cost.graph fleet.vehicle.cost - + + + + + + + + + fleet.vehicle.cost.graph + fleet.vehicle.cost + + + - @@ -924,12 +935,13 @@ - - - - - - + + + + + + + diff --git a/addons/hr_attendance/hr_attendance_view.xml b/addons/hr_attendance/hr_attendance_view.xml index 5075cc13501..50040c718a7 100644 --- a/addons/hr_attendance/hr_attendance_view.xml +++ b/addons/hr_attendance/hr_attendance_view.xml @@ -51,14 +51,15 @@ - + - + - - + + + @@ -152,7 +153,7 @@

- - + -
@@ -162,5 +163,3 @@ - - diff --git a/addons/hr_evaluation/report/hr_evaluation_report.py b/addons/hr_evaluation/report/hr_evaluation_report.py index 163562bfc72..9c3d04d02cd 100644 --- a/addons/hr_evaluation/report/hr_evaluation_report.py +++ b/addons/hr_evaluation/report/hr_evaluation_report.py @@ -28,12 +28,12 @@ class hr_evaluation_report(osv.Model): _description = "Evaluations Statistics" _auto = False _columns = { - 'create_date': fields.date('Create Date', readonly=True), + 'create_date': fields.datetime('Create Date', readonly=True), 'delay_date': fields.float('Delay to Start', digits=(16, 2), readonly=True), 'overpass_delay': fields.float('Overpassed Deadline', digits=(16, 2), readonly=True), 'deadline': fields.date("Deadline", readonly=True), - 'request_id': fields.many2one('survey.user_input', 'Request_id', readonly=True), - 'closed': fields.date("closed", readonly=True), + 'request_id': fields.many2one('survey.user_input', 'Request ID', readonly=True), + 'close_date': fields.date("Close Date", readonly=True, oldname='closed'), 'plan_id': fields.many2one('hr_evaluation.plan', 'Plan', readonly=True), 'employee_id': fields.many2one('hr.employee', "Employee", readonly=True), 'rating': fields.selection([ @@ -43,7 +43,7 @@ class hr_evaluation_report(osv.Model): ('3', 'Exceeds expectations'), ('4', 'Significantly exceeds expectations'), ], "Overall Rating", readonly=True), - 'nbr': fields.integer('# of Requests', readonly=True), + 'nbr_requests': fields.integer('# of Requests', readonly=True, oldname='nbr'), 'state': fields.selection([ ('draft', 'Draft'), ('wait', 'Plan In Progress'), @@ -68,14 +68,14 @@ class hr_evaluation_report(osv.Model): create or replace view hr_evaluation_report as ( select min(l.id) as id, - date(s.create_date) as create_date, + s.create_date as create_date, s.employee_id, l.request_id, s.plan_id, s.rating, s.date as deadline, - s.date_close as closed, - count(l.*) as nbr, + s.date_close as close_date, + count(l.*) as nbr_requests, s.state, avg(extract('epoch' from age(s.create_date,CURRENT_DATE)))/(3600*24) as delay_date, avg(extract('epoch' from age(s.date,CURRENT_DATE)))/(3600*24) as overpass_delay @@ -97,4 +97,3 @@ class hr_evaluation_report(osv.Model): # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: - diff --git a/addons/hr_evaluation/report/hr_evaluation_report_view.xml b/addons/hr_evaluation/report/hr_evaluation_report_view.xml index 5793aa6d206..3450f47fc3d 100644 --- a/addons/hr_evaluation/report/hr_evaluation_report_view.xml +++ b/addons/hr_evaluation/report/hr_evaluation_report_view.xml @@ -8,8 +8,8 @@ - - + +
@@ -19,9 +19,9 @@ hr.evaluation.report - - - + + + @@ -31,11 +31,12 @@ - - - - - + + + + + + diff --git a/addons/hr_expense/report/hr_expense_report.py b/addons/hr_expense/report/hr_expense_report.py index 531f5348357..5b925a32391 100644 --- a/addons/hr_expense/report/hr_expense_report.py +++ b/addons/hr_expense/report/hr_expense_report.py @@ -35,7 +35,7 @@ class hr_expense_report(osv.osv): 'create_date': fields.datetime('Creation Date', readonly=True), 'product_id':fields.many2one('product.product', 'Product', readonly=True), 'journal_id': fields.many2one('account.journal', 'Force Journal', readonly=True), - 'product_qty':fields.float('Qty', readonly=True), + 'product_qty':fields.float('Product Quantity', readonly=True), 'employee_id': fields.many2one('hr.employee', "Employee's Name", readonly=True), 'date_confirm': fields.date('Confirmation Date', readonly=True), 'date_valid': fields.date('Validation Date', readonly=True), @@ -48,7 +48,7 @@ class hr_expense_report(osv.osv): 'delay_confirm':fields.float('Delay to Confirm', readonly=True), 'analytic_account': fields.many2one('account.analytic.account','Analytic account',readonly=True), 'price_average':fields.float('Average Price', readonly=True, digits_compute=dp.get_precision('Account')), - 'nbr':fields.integer('# of Lines', readonly=True), + 'nbr_lines':fields.integer('# of Lines', readonly=True, oldname='nbr'), 'no_of_products':fields.integer('# of Products', readonly=True), 'no_of_account':fields.integer('# of Accounts', readonly=True), 'state': fields.selection([ @@ -83,7 +83,7 @@ class hr_expense_report(osv.osv): s.company_id as company_id, sum(l.unit_quantity*l.unit_amount) as price_total, (sum(l.unit_quantity*l.unit_amount)/sum(case when l.unit_quantity=0 or u.factor=0 then 1 else l.unit_quantity * u.factor end))::decimal(16,2) as price_average, - count(*) as nbr, + count(*) as nbr_lines, (select unit_quantity from hr_expense_line where id=l.id and product_id is not null) as no_of_products, (select analytic_account from hr_expense_line where id=l.id and analytic_account is not null) as no_of_account, s.state diff --git a/addons/hr_expense/report/hr_expense_report_view.xml b/addons/hr_expense/report/hr_expense_report_view.xml index bf44d5e27a2..aaade0fa274 100644 --- a/addons/hr_expense/report/hr_expense_report_view.xml +++ b/addons/hr_expense/report/hr_expense_report_view.xml @@ -8,11 +8,9 @@ - - - - + + @@ -22,9 +20,9 @@ hr.expense.report - - - + + + @@ -36,14 +34,13 @@ - - - - - - - - + + + + + + + diff --git a/addons/hr_holidays/hr_holidays_view.xml b/addons/hr_holidays/hr_holidays_view.xml index 5ee1ec8f7c2..f871bf8207d 100644 --- a/addons/hr_holidays/hr_holidays_view.xml +++ b/addons/hr_holidays/hr_holidays_view.xml @@ -1,6 +1,20 @@ + + + hr.holidays.graph + hr.holidays + + + + + + + + + + hr.holidays.filter hr.holidays @@ -8,27 +22,26 @@ - - - + + + - + - + - + - - - - - - - - + + + + + + + @@ -40,9 +53,9 @@ Leave Request hr.holidays - + @@ -483,10 +496,10 @@ - diff --git a/addons/hr_recruitment/report/hr_recruitment_report_view.xml b/addons/hr_recruitment/report/hr_recruitment_report_view.xml index 633d53c3728..9a396531446 100644 --- a/addons/hr_recruitment/report/hr_recruitment_report_view.xml +++ b/addons/hr_recruitment/report/hr_recruitment_report_view.xml @@ -7,7 +7,7 @@ - + @@ -16,23 +16,20 @@ By Recruiter hr.recruitment.report - [] - {'group_by': ['date_create:month', 'user_id']} + {'group_by': ['date_create:month', 'user_id'], 'col_group_by': ['date_create:month']} By Job hr.recruitment.report - [] - {'group_by': ['date_create:month', 'job_id']} + {'group_by': ['date_create:month', 'job_id'], 'col_group_by': ['date_create:month']} By Department hr.recruitment.report - [] - {'group_by': ['date_create:month', 'department_id']} + {'group_by': ['date_create:month', 'department_id'], 'col_group_by': ['date_create:month']} @@ -48,7 +45,7 @@ - + @@ -60,14 +57,11 @@ - - - - - + + @@ -78,7 +72,7 @@ hr.recruitment.report form graph - {'search_default_year': 1, 'group_by_no_leaf':1,'group_by':[]} + {'group_by_no_leaf':1,'group_by':[]} diff --git a/addons/hr_timesheet/report/hr_timesheet_report.py b/addons/hr_timesheet/report/hr_timesheet_report.py index 9b20f6978e7..1b049cece13 100644 --- a/addons/hr_timesheet/report/hr_timesheet_report.py +++ b/addons/hr_timesheet/report/hr_timesheet_report.py @@ -16,8 +16,8 @@ class hr_timesheet_report(osv.osv): 'user_id': fields.many2one('res.users', 'User',readonly=True), 'account_id': fields.many2one('account.analytic.account', 'Analytic Account',readonly=True), 'company_id': fields.many2one('res.company', 'Company',readonly=True), - 'cost': fields.float('#Cost',readonly=True, digits_compute=dp.get_precision('Account')), - 'quantity': fields.float('Time',readonly=True), + 'cost': fields.float('Cost', readonly=True, digits_compute=dp.get_precision('Account')), + 'time': fields.float('Time', readonly=True, oldname='quantity'), } def _select(self): @@ -25,7 +25,7 @@ class hr_timesheet_report(osv.osv): SELECT min(hat.id) as id, aal.date as date, sum(aal.amount) as cost, - sum(aal.unit_amount) as quantity, + sum(aal.unit_amount) as time, aal.account_id as account_id, aal.journal_id as journal_id, aal.product_id as product_id, diff --git a/addons/hr_timesheet/report/hr_timesheet_report_view.xml b/addons/hr_timesheet/report/hr_timesheet_report_view.xml index 0c9b5560ca4..8c606613ad8 100644 --- a/addons/hr_timesheet/report/hr_timesheet_report_view.xml +++ b/addons/hr_timesheet/report/hr_timesheet_report_view.xml @@ -7,13 +7,13 @@ - - - + + + hr.timesheet.report.search hr.timesheet.report @@ -21,7 +21,7 @@ - + @@ -30,12 +30,10 @@ - - - - - - + + + + @@ -46,7 +44,7 @@ hr.timesheet.report form graph - {'search_default_group_user_id':1,'group_by_no_leaf':1,'group_by':[]} + {'group_by_no_leaf':1,'group_by':[]} - + - + @@ -17,15 +17,31 @@ + + + Internal Timesheet + hr.timesheet.report + [('state','=','done'), ('date','<=', time.strftime('%Y-%m-%d')),('date','>=',time.strftime('%Y-%m-01'))] + + {'group_by': ['user_id'], 'col_group_by': ['department_id'], 'measures': ['time']} + + + External Timesheet + hr.timesheet.report + [('state','=','done'), ('date','<=', time.strftime('%Y-%m-%d')),('date','>=',time.strftime('%Y-%m-01'))] + + {'group_by': ['company_id', 'to_invoice'], 'col_group_by': ['user_id'], 'measures': ['time','cost']} + + timesheet.report.search hr.timesheet.report - - - + + + @@ -33,14 +49,10 @@ - - - - - - - - + + + + diff --git a/addons/l10n_in_hr_payroll/report/payment_advice_report_view.xml b/addons/l10n_in_hr_payroll/report/payment_advice_report_view.xml index 300d7932bc3..78b1d2e26ad 100644 --- a/addons/l10n_in_hr_payroll/report/payment_advice_report_view.xml +++ b/addons/l10n_in_hr_payroll/report/payment_advice_report_view.xml @@ -33,10 +33,10 @@ - - + + - + @@ -55,16 +55,14 @@ - - + + - + - + - - - + diff --git a/addons/l10n_in_hr_payroll/report/payslip_report_view.xml b/addons/l10n_in_hr_payroll/report/payslip_report_view.xml index 8293b26a7f3..f2bbfdb3e5b 100644 --- a/addons/l10n_in_hr_payroll/report/payslip_report_view.xml +++ b/addons/l10n_in_hr_payroll/report/payslip_report_view.xml @@ -32,10 +32,10 @@ - - + + - + @@ -51,19 +51,16 @@ - + - + - + - - - - + diff --git a/addons/marketing_campaign/report/campaign_analysis_view.xml b/addons/marketing_campaign/report/campaign_analysis_view.xml index be12935b27d..1ee0eacb5ca 100644 --- a/addons/marketing_campaign/report/campaign_analysis_view.xml +++ b/addons/marketing_campaign/report/campaign_analysis_view.xml @@ -1,6 +1,18 @@ + + + campaign.analysis.graph + campaign.analysis + + + + + + + + campaign.analysis.tree campaign.analysis @@ -30,24 +42,21 @@ - - - + + + - - - - - - - - - + + + + + + @@ -57,8 +66,8 @@ Campaign Analysis campaign.analysis form - tree - {'search_default_year': 1,"search_default_This Month":1,'group_by': [], 'search_default_Campaign': 1, 'search_default_Segment': 1, 'group_by_no_leaf':1} + graph,tree + {'group_by': [], 'group_by_no_leaf':1} diff --git a/addons/membership/report/report_membership.py b/addons/membership/report/report_membership.py index 536edde0903..6867feaa952 100644 --- a/addons/membership/report/report_membership.py +++ b/addons/membership/report/report_membership.py @@ -53,7 +53,8 @@ class report_membership(osv.osv): 'membership_id': fields.many2one('product.product', 'Membership Product', readonly=True), 'membership_state': fields.selection(STATE, 'Current Membership State', readonly=True), 'user_id': fields.many2one('res.users', 'Salesperson', readonly=True), - 'company_id': fields.many2one('res.company', 'Company', readonly=True) + 'company_id': fields.many2one('res.company', 'Company', readonly=True), + 'quantity': fields.integer("Quantity", readonly=True), } def init(self, cr): @@ -64,6 +65,7 @@ class report_membership(osv.osv): SELECT MIN(id) AS id, partner_id, + count(membership_id) as quantity, user_id, membership_state, associate_member_id, diff --git a/addons/membership/report/report_membership_view.xml b/addons/membership/report/report_membership_view.xml index 625693c455c..ca4f786e11c 100644 --- a/addons/membership/report/report_membership_view.xml +++ b/addons/membership/report/report_membership_view.xml @@ -7,24 +7,24 @@ report.membership - - + + - - - - - - + + + + + + @@ -35,7 +35,11 @@ report.membership + + + + diff --git a/addons/mrp_operations/report/mrp_workorder_analysis.py b/addons/mrp_operations/report/mrp_workorder_analysis.py index 37699ad0d47..7a6a88800e1 100644 --- a/addons/mrp_operations/report/mrp_workorder_analysis.py +++ b/addons/mrp_operations/report/mrp_workorder_analysis.py @@ -28,7 +28,7 @@ class mrp_workorder(osv.osv): _description = "Work Order Report" _auto = False _columns = { - 'nbr': fields.integer('# of Lines', readonly=True), + 'nbr_lines': fields.integer('# of Lines', readonly=True, oldname='nbr'), 'date': fields.date('Date', readonly=True), 'product_id': fields.many2one('product.product', 'Product', readonly=True), 'product_qty': fields.float('Product Qty', digits_compute=dp.get_precision('Product Unit of Measure'), readonly=True), @@ -54,7 +54,7 @@ class mrp_workorder(osv.osv): wl.production_id as production_id, wl.workcenter_id as workcenter_id, sum(wl.cycle) as total_cycles, - count(*) as nbr, + count(*) as nbr_lines, sum(mp.product_qty) as product_qty, wl.state as state from mrp_production_workcenter_line wl diff --git a/addons/mrp_operations/report/mrp_workorder_analysis_view.xml b/addons/mrp_operations/report/mrp_workorder_analysis_view.xml index 13b4e794283..0d469524e9e 100644 --- a/addons/mrp_operations/report/mrp_workorder_analysis_view.xml +++ b/addons/mrp_operations/report/mrp_workorder_analysis_view.xml @@ -9,32 +9,55 @@ mrp.workorder - + + - + + + Workload + mrp.workorder + + {'group_by': ['workcenter_id'], 'col_group_by': ['date:month'], 'measures': ['total_hours', 'total_cycles']} + + + Quantity Produced + mrp.workorder + [('state','=','done')] + + {'group_by': ['workcenter_id'], 'col_group_by': ['date:month'], 'measures': ['total_hours', 'total_cycles']} + + + Current Production + mrp.workorder + [('state','=','startworking')] + + {'group_by': ['workcenter_id'], 'col_group_by': ['product_id'], 'measures': ['product_qty', 'total_hours']} + + mrp.workorder.select mrp.workorder - - - + + + - - - - - + + + + + + diff --git a/addons/point_of_sale/report/pos_order_report.py b/addons/point_of_sale/report/pos_order_report.py index 4ffe19bd23b..93ac1ea0608 100644 --- a/addons/point_of_sale/report/pos_order_report.py +++ b/addons/point_of_sale/report/pos_order_report.py @@ -26,6 +26,7 @@ class pos_order_report(osv.osv): _name = "report.pos.order" _description = "Point of Sale Orders Statistics" _auto = False + _columns = { 'date': fields.datetime('Date Order', readonly=True), 'partner_id':fields.many2one('res.partner', 'Partner', readonly=True), @@ -38,10 +39,11 @@ class pos_order_report(osv.osv): 'average_price': fields.float('Average Price', readonly=True,group_operator="avg"), 'location_id':fields.many2one('stock.location', 'Location', readonly=True), 'company_id':fields.many2one('res.company', 'Company', readonly=True), - 'nbr':fields.integer('# of Lines', readonly=True), - 'product_qty':fields.integer('# of Qty', readonly=True), + 'nbr_lines':fields.integer('# of Lines', readonly=True, oldname='nbr'), + 'product_qty':fields.integer('Product Quantity', readonly=True), 'journal_id': fields.many2one('account.journal', 'Journal'), 'delay_validation': fields.integer('Delay Validation'), + 'product_categ_id': fields.many2one('product.category', 'Product Category', readonly=True), } _order = 'date desc' @@ -51,7 +53,7 @@ class pos_order_report(osv.osv): create or replace view report_pos_order as ( select min(l.id) as id, - count(*) as nbr, + count(*) as nbr_lines, s.date_order as date, sum(l.qty * u.factor) as product_qty, sum(l.qty * l.price_unit) as price_total, @@ -64,14 +66,15 @@ class pos_order_report(osv.osv): s.location_id as location_id, s.company_id as company_id, s.sale_journal as journal_id, - l.product_id as product_id + l.product_id as product_id, + pt.categ_id as product_categ_id from pos_order_line as l left join pos_order s on (s.id=l.order_id) left join product_product p on (p.id=l.product_id) left join product_template pt on (pt.id=p.product_tmpl_id) left join product_uom u on (u.id=pt.uom_id) group by - s.date_order, s.partner_id,s.state, + s.date_order, s.partner_id,s.state, pt.categ_id, s.user_id,s.location_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 281c39f8fbc..d184971cf3b 100644 --- a/addons/point_of_sale/report/pos_order_report_view.xml +++ b/addons/point_of_sale/report/pos_order_report_view.xml @@ -6,11 +6,9 @@ report.pos.order - - + + - - @@ -22,22 +20,22 @@ - - + + - + - + - - - - - + + + + + @@ -49,7 +47,7 @@ form graph - {'search_default_year':1, 'group_by_no_leaf':1,'group_by':['product_id']} + {'group_by_no_leaf':1,'group_by':[]} diff --git a/addons/project/project.py b/addons/project/project.py index 209431ac02b..3a9ac105186 100644 --- a/addons/project/project.py +++ b/addons/project/project.py @@ -699,10 +699,10 @@ class task(osv.osv): if default is None: default = {} if not default.get('name'): - current = self.browse(cr, uid, id, context=context) + current = self.browse(cr, uid, id, context=context) default['name'] = _("%s (copy)") % current.name return super(task, self).copy_data(cr, uid, id, default, context) - + def _is_template(self, cr, uid, ids, field_name, arg, context=None): res = {} for task in self.browse(cr, uid, ids, context=context): @@ -1313,6 +1313,7 @@ class project_task_history_cumulative(osv.osv): _columns = { 'end_date': fields.date('End Date'), + 'nbr_tasks': fields.integer('# of Tasks', readonly=True), 'project_id': fields.many2one('project.project', 'Project'), } @@ -1329,11 +1330,16 @@ class project_task_history_cumulative(osv.osv): h.id AS history_id, h.date+generate_series(0, CAST((coalesce(h.end_date, DATE 'tomorrow')::date - h.date) AS integer)-1) AS date, h.task_id, h.type_id, h.user_id, h.kanban_state, + count(h.task_id) as nbr_tasks, greatest(h.remaining_hours, 1) AS remaining_hours, greatest(h.planned_hours, 1) AS planned_hours, t.project_id FROM project_task_history AS h JOIN project_task AS t ON (h.task_id = t.id) + GROUP BY + h.id, + h.task_id, + t.project_id ) AS history ) diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index 5823f2cab05..c35954d251d 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -30,7 +30,7 @@ - + @@ -38,12 +38,14 @@ - - - - - - + + + + + + + + @@ -54,7 +56,7 @@ project.task kanban,tree,form,calendar,gantt,graph { - 'search_default_project_id': [active_id], + 'search_default_project_id': [active_id], 'default_project_id': active_id, 'active_test': False, } @@ -98,7 +100,7 @@
- @@ -108,8 +110,8 @@
- @@ -204,9 +206,9 @@ - - - + + + @@ -383,7 +385,7 @@ options="{'fold_field': 'fold'}"/> -
+

@@ -558,7 +560,7 @@ - + @@ -602,7 +604,6 @@ - @@ -680,7 +681,7 @@ - + diff --git a/addons/project/report/project_cumulative.xml b/addons/project/report/project_cumulative.xml index e85d9d80138..c9d77deee92 100644 --- a/addons/project/report/project_cumulative.xml +++ b/addons/project/report/project_cumulative.xml @@ -7,8 +7,10 @@ project.task.history.cumulative - + + + @@ -32,6 +34,15 @@ + + + + + + + + + diff --git a/addons/project/report/project_report.py b/addons/project/report/project_report.py index 1356a1ed007..0b8c93505c0 100644 --- a/addons/project/report/project_report.py +++ b/addons/project/report/project_report.py @@ -31,11 +31,11 @@ class report_project_task_user(osv.osv): 'name': fields.char('Task Summary', readonly=True), 'user_id': fields.many2one('res.users', 'Assigned To', readonly=True), 'reviewer_id': fields.many2one('res.users', 'Reviewer', readonly=True), - 'date_start': fields.date('Assignation Date', readonly=True), + 'date_start': fields.datetime('Assignation Date', readonly=True), 'no_of_days': fields.integer('# of Days', size=128, readonly=True), - 'date_end': fields.date('Ending Date', readonly=True), + 'date_end': fields.datetime('Ending Date', readonly=True), 'date_deadline': fields.date('Deadline', readonly=True), - 'date_last_stage_update': fields.date('Last Stage Update', readonly=True), + 'date_last_stage_update': fields.datetime('Last Stage Update', readonly=True), 'project_id': fields.many2one('project.project', 'Project', readonly=True), 'hours_planned': fields.float('Planned Hours', readonly=True), 'hours_effective': fields.float('Effective Hours', readonly=True), @@ -48,12 +48,13 @@ class report_project_task_user(osv.osv): 'opening_days': fields.float('Days to Assign', digits=(16,2), readonly=True, group_operator="avg", help="Number of Days to Open the task"), 'delay_endings_days': fields.float('Overpassed Deadline', digits=(16,2), readonly=True), - 'nbr': fields.integer('# of tasks', readonly=True), 'priority': fields.selection([('0','Low'), ('1','Normal'), ('2','High')], string='Priority', size=1, readonly=True), + 'state': fields.selection([('normal', 'In Progress'),('blocked', 'Blocked'),('done', 'Ready for next stage')],'Status', readonly=True), 'company_id': fields.many2one('res.company', 'Company', readonly=True), 'partner_id': fields.many2one('res.partner', 'Contact', readonly=True), 'stage_id': fields.many2one('project.task.type', 'Stage'), + 'nbr_tasks': fields.integer('# of Tasks', readonly=True, oldname='nbr'), } _order = 'name desc, project_id' @@ -62,11 +63,11 @@ class report_project_task_user(osv.osv): cr.execute(""" CREATE view report_project_task_user as SELECT - (select 1 ) AS nbr, + (select 1 ) AS nbr_tasks, t.id as id, - date(t.date_start) as date_start, - date(t.date_end) as date_end, - date(t.date_last_stage_update) as date_last_stage_update, + t.date_start as date_start, + t.date_end as date_end, + t.date_last_stage_update as date_last_stage_update, t.date_deadline as date_deadline, abs((extract('epoch' from (t.write_date-t.date_start)))/(3600*24)) as no_of_days, t.user_id, @@ -79,6 +80,7 @@ class report_project_task_user(osv.osv): t.company_id, t.partner_id, t.stage_id as stage_id, + t.kanban_state as state, remaining_hours as remaining_hours, total_hours as total_hours, t.delay_hours as hours_delay, diff --git a/addons/project/report/project_report_view.xml b/addons/project/report/project_report_view.xml index 408d0001482..6caf294326c 100644 --- a/addons/project/report/project_report_view.xml +++ b/addons/project/report/project_report_view.xml @@ -12,27 +12,33 @@ - - - - - + + + Task Pipe + report.project.task.user + + {'group_by': ['project_id'], 'col_group_by': ['stage_id'], 'measures': ['nbr_tasks']} + + + Workload + report.project.task.user + + {'group_by': ['project_id'], 'measures': ['total_hours','hours_planned','remaining_hours']} + By Responsible report.project.task.user - [] {'group_by': ['project_id', 'user_id']} By Reviewer report.project.task.user - [] {'group_by': ['project_id', 'reviewer_id']} @@ -50,7 +56,7 @@ - + @@ -60,12 +66,12 @@ - - - + + + - - + + diff --git a/addons/project_issue/project_issue_menu.xml b/addons/project_issue/project_issue_menu.xml index 26981256c7f..18acc21b74e 100644 --- a/addons/project_issue/project_issue_menu.xml +++ b/addons/project_issue/project_issue_menu.xml @@ -9,7 +9,7 @@ Issues project.issue form - kanban,tree,calendar + kanban,tree,calendar,form,graph @@ -50,6 +50,13 @@ + + + graph + + + + diff --git a/addons/project_issue/project_issue_view.xml b/addons/project_issue/project_issue_view.xml index 620c612ecf1..de81db8dfaf 100644 --- a/addons/project_issue/project_issue_view.xml +++ b/addons/project_issue/project_issue_view.xml @@ -52,7 +52,7 @@ options="{'fold_field': 'fold'}"/> -
+