<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2014 Numérigraphe
     Copyright 2016 Sodexis
     License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -->

<odoo>
    <record id="view_stock_configuration" model="ir.ui.view">
        <field name="name">Stock settings: quantity available to promise</field>
        <field name="model">res.config.settings</field>
        <field name="inherit_id" ref="stock.res_config_settings_view_form" />
        <field name="arch" type="xml">
            <xpath expr="//div[@data-key='stock']" position="inside">
                <h2 id="available_info">Stock available to promise</h2>
                <div class="row mt16 o_settings_container">
                    <div class="col-xs-12 col-md-6 o_setting_box">
                        <div class="o_setting_left_pane">
                            <field name="module_stock_available_immediately"/>
                        </div>
                        <div class="o_setting_right_pane">
                            <label for="module_stock_available_immediately"/>
                        </div>
                    </div>
                    <div class="col-xs-12 col-md-6 o_setting_box">
                        <div class="o_setting_left_pane">
                            <field name="module_stock_available_mrp"/>
                        </div>
                        <div class="o_setting_right_pane">
                            <label for="module_stock_available_mrp"/>
                            <div class="content-group">
                                <div class="mt16" attrs="{'invisible': [('module_stock_available_mrp', '=', False)]}">
                                    <field name="stock_available_mrp_based_on" class="oe_inline" attrs="{'required':[('module_stock_available_mrp','=',True)]}"/>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </xpath>
        </field>
    </record>
</odoo>
