From fdc13474e76494e4e6995cb15b7491ade1d9b15c Mon Sep 17 00:00:00 2001 From: Pragnesh Mistry Date: Wed, 17 May 2017 12:32:00 +0530 Subject: [PATCH] [IMP] account: Add the possiblity to filter and group by analytic accounts PURPOSE ======= Add the possibility to filter on analytic accounting in the invoices report SPECIFICATION ============= Accounting > Reporting > Invoices (Business Intelligence) - Add filter / group by analytic account - If possible, filter/group by visible only if "Analytic Account" group enabled in configuration --- addons/account/report/account_invoice_report.py | 1 + addons/account/report/account_invoice_report_view.xml | 2 ++ 2 files changed, 3 insertions(+) diff --git a/addons/account/report/account_invoice_report.py b/addons/account/report/account_invoice_report.py index b028301af6f..1bcfab43b06 100644 --- a/addons/account/report/account_invoice_report.py +++ b/addons/account/report/account_invoice_report.py @@ -66,6 +66,7 @@ class AccountInvoiceReport(models.Model): residual = fields.Float(string='Due Amount', readonly=True) user_currency_residual = fields.Float(string="Total Residual", compute='_compute_amounts_in_user_currency', digits=0) country_id = fields.Many2one('res.country', string='Country of the Partner Company') + account_analytic_id = fields.Many2one('account.analytic.account', string='Analytic Account', groups="analytic.group_analytic_accounting") _order = 'date desc' diff --git a/addons/account/report/account_invoice_report_view.xml b/addons/account/report/account_invoice_report_view.xml index 14df1502065..6942297c73f 100644 --- a/addons/account/report/account_invoice_report_view.xml +++ b/addons/account/report/account_invoice_report_view.xml @@ -85,6 +85,7 @@ + @@ -94,6 +95,7 @@ +