<?xml version="1.0" encoding="utf-8"?>
<odoo auto_sequence="1">
    <record id="multicurrency_revaluation_report" model="account.report">
        <field name="name">Unrealized Currency Gains/Losses</field>
        <field name="filter_date_range" eval="False"/>
        <field name="filter_show_draft" eval="True"/>
        <field name="default_opening_date_filter">previous_month</field>
        <field name="custom_handler_model_id" ref="model_account_multicurrency_revaluation_report_handler"/>
        <field name="column_ids">
            <record id="multicurrency_revaluation_report_balance_currency" model="account.report.column">
                <field name="name">Balance in Foreign Currency</field>
                <field name="expression_label">balance_currency</field>
            </record>
            <record id="multicurrency_revaluation_report_balance_operation" model="account.report.column">
                <field name="name">Balance at Operation Rate</field>
                <field name="expression_label">balance_operation</field>
            </record>
            <record id="multicurrency_revaluation_report_balance_current" model="account.report.column">
                <field name="name">Balance at Current Rate</field>
                <field name="expression_label">balance_current</field>
            </record>
            <record id="multicurrency_revaluation_report_adjustment" model="account.report.column">
                <field name="name">Adjustment</field>
                <field name="expression_label">adjustment</field>
            </record>
        </field>
        <field name="line_ids">
            <record id="multicurrency_revaluation_to_adjust" model="account.report.line">
                <field name="name">Accounts To Adjust</field>
                <field name="code">multicurrency_included</field>
                <field name="groupby">currency_id, account_id, id</field>
                <field name="expression_ids">
                    <record id="multicurrency_revaluation_to_adjust_balance_currency" model="account.report.expression">
                        <field name="label">balance_currency</field>
                        <field name="engine">custom</field>
                        <field name="formula">_report_custom_engine_multi_currency_revaluation_to_adjust</field>
                        <field name="subformula">balance_currency</field>
                    </record>
                    <record id="multicurrency_revaluation_to_adjust_balance_currency_forced_currency" model="account.report.expression">
                        <field name="label">_currency_balance_currency</field>
                        <field name="engine">custom</field>
                        <field name="formula">_report_custom_engine_multi_currency_revaluation_to_adjust</field>
                        <field name="subformula">currency_id</field>
                    </record>
                    <record id="multicurrency_revaluation_to_adjust_balance_operation" model="account.report.expression">
                        <field name="label">balance_operation</field>
                        <field name="engine">custom</field>
                        <field name="formula">_report_custom_engine_multi_currency_revaluation_to_adjust</field>
                        <field name="subformula">balance_operation</field>
                        <field name="auditable" eval="False"/>
                    </record>
                    <record id="multicurrency_revaluation_to_adjust_balance_current" model="account.report.expression">
                        <field name="label">balance_current</field>
                        <field name="engine">custom</field>
                        <field name="formula">_report_custom_engine_multi_currency_revaluation_to_adjust</field>
                        <field name="subformula">balance_current</field>
                        <field name="auditable" eval="False"/>
                    </record>
                    <record id="multicurrency_revaluation_to_adjust_adjustment" model="account.report.expression">
                        <field name="label">adjustment</field>
                        <field name="engine">custom</field>
                        <field name="formula">_report_custom_engine_multi_currency_revaluation_to_adjust</field>
                        <field name="subformula">adjustment</field>
                        <field name="auditable" eval="False"/>
                    </record>
                </field>
            </record>

            <record id="multicurrency_revaluation_excluded" model="account.report.line">
                <field name="name">Excluded Accounts</field>
                <field name="groupby">currency_id, account_id, id</field>
                <field name="expression_ids">
                    <record id="multicurrency_revaluation_excluded_balance_currency" model="account.report.expression">
                        <field name="label">balance_currency</field>
                        <field name="engine">custom</field>
                        <field name="formula">_report_custom_engine_multi_currency_revaluation_excluded</field>
                        <field name="subformula">balance_currency</field>
                    </record>
                    <record id="multicurrency_revaluation_excluded_balance_currency_forced_currency" model="account.report.expression">
                        <field name="label">_currency_balance_currency</field>
                        <field name="engine">custom</field>
                        <field name="formula">_report_custom_engine_multi_currency_revaluation_excluded</field>
                        <field name="subformula">currency_id</field>
                    </record>
                    <record id="multicurrency_revaluation_excluded_balance_operation" model="account.report.expression">
                        <field name="label">balance_operation</field>
                        <field name="engine">custom</field>
                        <field name="formula">_report_custom_engine_multi_currency_revaluation_excluded</field>
                        <field name="subformula">balance_operation</field>
                    </record>
                    <record id="multicurrency_revaluation_excluded_balance_current" model="account.report.expression">
                        <field name="label">balance_current</field>
                        <field name="engine">custom</field>
                        <field name="formula">_report_custom_engine_multi_currency_revaluation_excluded</field>
                        <field name="subformula">balance_current</field>
                    </record>
                    <record id="multicurrency_revaluation_excluded_adjustment" model="account.report.expression">
                        <field name="label">adjustment</field>
                        <field name="engine">custom</field>
                        <field name="formula">_report_custom_engine_multi_currency_revaluation_excluded</field>
                        <field name="subformula">adjustment</field>
                    </record>
                </field>
            </record>
        </field>
    </record>
</odoo>
