<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
    <record id="view_order_tree" model="ir.ui.view">
        <field name="name">sale.order.tree</field>
        <field name="model">sale.order</field>
        <field name="inherit_id" ref="sale.view_order_tree" />
        <field name="arch" type="xml">
            <field name="amount_total" position="after">
                <field name='company_currency_id' column_invisible="1" />
                <field
                    name="amount_total_curr"
                    sum="Total"
                    string="Total (Company Currency)"
                    widget="monetary"
                    options="{'currency_field': 'company_currency_id'}"
                    optional="show"
                />
            </field>
        </field>
    </record>
    <record id="view_order_form" model="ir.ui.view">
        <field name="name">sale.order.form</field>
        <field name="model">sale.order</field>
        <field name="inherit_id" ref="sale.view_order_form" />
        <field name="arch" type="xml">
            <field name="tax_totals" position="after">
                <div class="d-flex">
                    <field name="company_currency_id" invisible="1" />
                    <label for="amount_total_curr" string="Total (Company Currency)" />
                    <field
                        name="amount_total_curr"
                        widget="monetary"
                        options="{'currency_field': 'company_currency_id'}"
                    />
                </div>
            </field>
        </field>
    </record>
    <record id="view_quotation_tree" model="ir.ui.view">
        <field name="name">sale.quotation.tree</field>
        <field name="model">sale.order</field>
        <field name="inherit_id" ref="sale.view_quotation_tree" />
        <field name="arch" type="xml">
            <field name="amount_total" position="after">
                <field name='company_currency_id' column_invisible="1" />
                <field
                    name="amount_total_curr"
                    sum="Total"
                    string="Total (Company Currency)"
                    widget="monetary"
                    options="{'currency_field': 'company_currency_id'}"
                    optional="show"
                />
            </field>
        </field>
    </record>
</odoo>
