<?xml version="1.0" encoding="utf-8" ?>
<odoo>
    <record id="res_config_settings_view_form" model="ir.ui.view">
        <field name="name">res.config.settings.view.form.inherit.total.margin</field>
        <field name="model">res.config.settings</field>
        <field name="priority" eval="90" />
        <field name="inherit_id" ref="sale.res_config_settings_view_form" />
        <field name="arch" type="xml">
            <xpath expr="//setting[@id='pricelist_configuration']" position="after">
                <setting id="total_margin_limits" string="Total Margin Limits" help="Set minimum and maximum margin percentages for Total Margin Mode">
                    <div class="content-group">
                        <div class="row mt16">
                            <label
                                string="Minimum Margin (%)"
                                for="total_margin_min_percent"
                                class="col-lg-3 o_light_label"
                            />
                            <field name="total_margin_min_percent" class="oe_inline" />
                        </div>
                        <div class="row">
                            <label
                                string="Maximum Margin (%)"
                                for="total_margin_max_percent"
                                class="col-lg-3 o_light_label"
                            />
                            <field name="total_margin_max_percent" class="oe_inline" />
                        </div>
                        <div class="row">
                            <label
                                string="Calculation Method"
                                for="global_margin_type"
                                class="col-lg-3 o_light_label"
                            />
                            <field name="global_margin_type" class="oe_inline" />
                        </div>
                    </div>
                </setting>
            </xpath>
        </field>
    </record>
</odoo>
