<?xml version="1.0"?>
<data><xpath expr="//sheet" position="before">
                    <div class="alert alert-warning" role="alert" invisible="not duplicate_bank_partner_ids">
                        <span>The Bank Account could be a duplicate of</span>
                        <field name="duplicate_bank_partner_ids" widget="x2many_buttons" string="Partners with same bank"/>
                    </div>
                </xpath>

                <xpath expr="//form[@name='bank_account_form']/sheet[1]" position="after">
                    <chatter/>
                </xpath>

                <xpath expr="//field[@name='acc_number']" position="attributes">
                    <attribute name="readonly">lock_trust_fields</attribute>
                    <attribute name="force_save">1</attribute>
                </xpath>

                <xpath expr="//field[@name='partner_id']" position="attributes">
                    <attribute name="readonly">lock_trust_fields</attribute>
                    <attribute name="force_save">1</attribute>
                </xpath>

                <xpath expr="//field[@name='allow_out_payment']" position="replace">
                    <field name="user_has_group_validate_bank_account" invisible="1"/>
                    <field name="lock_trust_fields" invisible="1"/>
                    <label for="allow_out_payment"/>
                    <div class="d-flex gap-2">
                        <field name="allow_out_payment" widget="boolean_toggle" options="{'autosave': False}" readonly="not user_has_group_validate_bank_account" class="w-25"/>
                        <span class="d-flex gap-2 w-100">
                            <span invisible="allow_out_payment" class="text-muted">Untrusted</span>
                            <span invisible="not allow_out_payment" class="text-success">Trusted</span>
                        </span>
                    </div>
                    <div invisible="allow_out_payment" colspan="2">
                        <field name="has_money_transfer_warning" invisible="1"/>
                        <div invisible="not has_money_transfer_warning" class="mb-1">
                            <span class="text-danger">High risk</span>: <field name="money_transfer_service" nolabel="1" class="oe_inline"/> is a money transfer service and not a bank.
                            Double check if the account can be trusted by calling the vendor.<br/>
                            <widget name="documentation_link" path="/applications/finance/accounting/payables/pay/trusted_accounts.html" label="Check why."/>
                        </div>
                        <field name="has_iban_warning" invisible="1"/>
                        <div invisible="not has_iban_warning">
                            <span class="text-warning">Medium risk</span>: Iban <field name="sanitized_acc_number" nolabel="1" class="oe_inline fw-bold"/>
                            is not from the same country as the partner (<field name="partner_country_name" nolabel="1" class="oe_inline"/>).<br/>
                            <widget name="documentation_link" path="/applications/finance/accounting/payables/pay/trusted_accounts.html" label="Check why it's risky."/>
                        </div>
                    </div>
                </xpath>
            </data>