<?xml version="1.0" encoding="utf-8"?>
<odoo>

    <record model="ir.ui.view" id="invoice_margin_form">
        <field name="name">account.invoice.margin.view.form</field>
        <field name="model">account.move</field>
        <field name="inherit_id" ref="account.view_move_form"/>
        <field name="arch" type="xml">
            <xpath expr="//field[@name='amount_residual']" position="after">
                <field name="margin" groups="base.group_user"/>
            </xpath>
            <xpath expr="//field[@name='invoice_line_ids']//field[@name='price_unit']" position="after">
                <field name="purchase_price" groups="base.group_user"/>
            </xpath>
        </field>
    </record>

</odoo>
