diff --git a/addons/account/report/account_invoice_report.py b/addons/account/report/account_invoice_report.py index b56e6170fdd..7572abf7352 100644 --- a/addons/account/report/account_invoice_report.py +++ b/addons/account/report/account_invoice_report.py @@ -27,8 +27,8 @@ class AccountInvoiceReport(models.Model): record.user_currency_price_average = base_currency_id._convert(record.price_average, user_currency_id, company, date) record.user_currency_residual = base_currency_id._convert(record.residual, user_currency_id, company, date) - number = fields.Char('Invoice Number', readonly=True) - date = fields.Date(readonly=True) + number = fields.Char('Invoice #', readonly=True) + date = fields.Date(readonly=True, string="Invoice Date") product_id = fields.Many2one('product.product', string='Product', readonly=True) product_qty = fields.Float(string='Product Quantity', readonly=True) uom_name = fields.Char(string='Reference Unit of Measure', readonly=True) @@ -41,7 +41,7 @@ class AccountInvoiceReport(models.Model): commercial_partner_id = fields.Many2one('res.partner', string='Partner Company', help="Commercial Entity") company_id = fields.Many2one('res.company', string='Company', readonly=True) user_id = fields.Many2one('res.users', string='Salesperson', readonly=True) - price_total = fields.Float(string='Total Without Tax', readonly=True) + price_total = fields.Float(string='Untaxed Total', readonly=True) user_currency_price_total = fields.Float(string="Total Without Tax in Currency", compute='_compute_amounts_in_user_currency', digits=0) price_average = fields.Float(string='Average Price', readonly=True, group_operator="avg") user_currency_price_average = fields.Float(string="Average Price in Currency", compute='_compute_amounts_in_user_currency', digits=0) @@ -61,13 +61,14 @@ class AccountInvoiceReport(models.Model): ('cancel', 'Cancelled') ], string='Invoice Status', readonly=True) date_due = fields.Date(string='Due Date', readonly=True) - account_id = fields.Many2one('account.account', string='Account', readonly=True, domain=[('deprecated', '=', False)]) - account_line_id = fields.Many2one('account.account', string='Account Line', readonly=True, domain=[('deprecated', '=', False)]) + account_id = fields.Many2one('account.account', string='Receivable/Payable Account', readonly=True, domain=[('deprecated', '=', False)]) + account_line_id = fields.Many2one('account.account', string='Revenue/Expense Account', readonly=True, domain=[('deprecated', '=', False)]) partner_bank_id = fields.Many2one('res.partner.bank', string='Bank Account', readonly=True) 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') + country_id = fields.Many2one('res.country', string="Partner Company's Country") account_analytic_id = fields.Many2one('account.analytic.account', string='Analytic Account', groups="analytic.group_analytic_accounting") + amount_total = fields.Float(string='Total', readonly=True) _order = 'date desc' @@ -95,7 +96,7 @@ class AccountInvoiceReport(models.Model): sub.payment_term_id, sub.uom_name, sub.currency_id, sub.journal_id, sub.fiscal_position_id, sub.user_id, sub.company_id, sub.nbr, sub.invoice_id, 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 as price_total, sub.price_average as price_average, + sub.product_qty, sub.price_total as price_total, sub.price_average as price_average, sub.amount_total as amount_total, COALESCE(cr.rate, 1) as currency_rate, sub.residual as residual, sub.commercial_partner_id as commercial_partner_id """ return select_str @@ -113,6 +114,7 @@ class AccountInvoiceReport(models.Model): ai.partner_bank_id, SUM ((invoice_type.sign_qty * ail.quantity) / u.factor * u2.factor) AS product_qty, SUM(ail.price_subtotal_signed * invoice_type.sign) AS price_total, + SUM(ai.amount_total * invoice_type.sign) AS amount_total, SUM(ABS(ail.price_subtotal_signed)) / CASE WHEN SUM(ail.quantity / u.factor * u2.factor) <> 0::numeric THEN SUM(ail.quantity / u.factor * u2.factor) diff --git a/addons/account/report/account_invoice_report_view.xml b/addons/account/report/account_invoice_report_view.xml index 5c539b396fc..fceb9ed526e 100644 --- a/addons/account/report/account_invoice_report_view.xml +++ b/addons/account/report/account_invoice_report_view.xml @@ -69,31 +69,29 @@ - - - - + + - - + + + - - + + - @@ -118,7 +116,7 @@ From this report, you can have an overview of the amount invoiced to your customers. The search tool can also be used to personalise your Invoices reports and so, match this analysis to your needs. - + diff --git a/addons/account/views/account_invoice_view.xml b/addons/account/views/account_invoice_view.xml index 1775ec45dbc..d85ce5d7e62 100644 --- a/addons/account/views/account_invoice_view.xml +++ b/addons/account/views/account_invoice_view.xml @@ -632,7 +632,8 @@ - + + @@ -643,8 +644,6 @@ - - diff --git a/addons/point_of_sale/views/account_journal_view.xml b/addons/point_of_sale/views/account_journal_view.xml index 5d79164a30b..94c80cbacef 100644 --- a/addons/point_of_sale/views/account_journal_view.xml +++ b/addons/point_of_sale/views/account_journal_view.xml @@ -29,9 +29,9 @@ account.journal - + - +