<?xml version="1.0" encoding="utf-8" ?>
<!--
  Copyright 2016-2022 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
  License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->
<odoo>

<record id="view_order_form" model="ir.ui.view">
    <field name="name">account_banking_mandate_sale.sale_order.form</field>
    <field name="model">sale.order</field>
    <field name="inherit_id" ref="account_payment_sale.view_order_form" />
    <field name="arch" type="xml">
        <xpath expr="//field[@name='fiscal_position_id']/parent::div" position="after">
            <field
                    name="mandate_id"
                    attrs="{'invisible': [('mandate_required', '=', False)]}"
                />
            <field name="mandate_required" invisible="1" />
            <field name="commercial_invoice_partner_id" invisible="1" />
        </xpath>
    </field>
</record>

</odoo>
