diff --git a/addons/account/i18n/account.pot b/addons/account/i18n/account.pot index f5aea3f85f1..845e6b290a1 100644 --- a/addons/account/i18n/account.pot +++ b/addons/account/i18n/account.pot @@ -4600,6 +4600,7 @@ msgstr "" #: model:ir.model,name:account.model_res_currency #: model:ir.model.fields,field_description:account.field_account_automatic_entry_wizard__company_currency_id #: model:ir.model.fields,field_description:account.field_account_bank_statement__currency_id +#: model:ir.model.fields,field_description:account.field_account_invoice_report__currency_id #: model:ir.model.fields,field_description:account.field_account_journal__currency_id #: model:ir.model.fields,field_description:account.field_account_move__currency_id #: model:ir.model.fields,field_description:account.field_account_move_line__currency_id @@ -14472,7 +14473,6 @@ msgstr "" #. odoo-javascript #: code:addons/account/static/src/components/tax_totals/tax_totals.xml:0 #: model:ir.model.fields,field_description:account.field_account_bank_statement_line__amount_total -#: model:ir.model.fields,field_description:account.field_account_invoice_report__price_total #: model:ir.model.fields,field_description:account.field_account_move__amount_total #: model:ir.model.fields,field_description:account.field_account_move_line__price_total #: model:ir.model.fields,field_description:account.field_account_payment__amount_total @@ -14619,6 +14619,7 @@ msgid "Total amount you have to pay to this vendor." msgstr "" #. module: account +#: model:ir.model.fields,field_description:account.field_account_invoice_report__price_total #: model_terms:ir.ui.view,arch_db:account.view_invoice_tree msgid "Total in Currency" msgstr "" diff --git a/addons/account/report/account_invoice_report.py b/addons/account/report/account_invoice_report.py index a4f5ee9ba3a..c76b60856fc 100644 --- a/addons/account/report/account_invoice_report.py +++ b/addons/account/report/account_invoice_report.py @@ -45,8 +45,9 @@ class AccountInvoiceReport(models.Model): invoice_date_due = fields.Date(string='Due Date', readonly=True) account_id = fields.Many2one('account.account', string='Revenue/Expense Account', readonly=True, domain=[('deprecated', '=', False)]) price_subtotal = fields.Float(string='Untaxed Total', readonly=True) - price_total = fields.Float(string='Total', readonly=True) + price_total = fields.Float(string='Total in Currency', readonly=True) price_average = fields.Float(string='Average Price', readonly=True, group_operator="avg") + currency_id = fields.Many2one('res.currency', string='Currency', readonly=True) _depends = { 'account.move': [ @@ -103,7 +104,8 @@ class AccountInvoiceReport(models.Model): -- convert to template uom * (NULLIF(COALESCE(uom_line.factor, 1), 0.0) / NULLIF(COALESCE(uom_template.factor, 1), 0.0)), 0.0) * currency_table.rate AS price_average, - COALESCE(partner.country_id, commercial_partner.country_id) AS country_id + COALESCE(partner.country_id, commercial_partner.country_id) AS country_id, + line.currency_id AS currency_id ''' @api.model