<?xml version="1.0" encoding="UTF-8" ?>
<!--
    Copyright 2018 Creu Blanca
    License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
-->
<odoo>
    <record id="res_config_settings_view_form" model="ir.ui.view">
        <field name="name">res.config.settings.view.form.inherit.stock_request</field>
        <field name="model">res.config.settings</field>
        <field name="inherit_id" ref="base.res_config_settings_view_form" />
        <field name="arch" type="xml">
            <xpath expr="//div[hasclass('settings')]" position="inside">
                <div
                    class="app_settings_block"
                    data-string="Stock Request"
                    data-key="stock_request"
                    groups="stock_request.group_stock_request_manager"
                >
                    <h2>Orders &amp; Configuration</h2>
                    <div class="row mt16 o_settings_container" id="stock_request">
                        <div class="col-xs-12 col-md-6 o_setting_box">
                            <div class="o_setting_left_pane">
                                <field name="group_stock_request_order" />
                            </div>
                            <div class="o_setting_right_pane">
                                <label
                                    string="Enable Orders"
                                    for="group_stock_request_order"
                                />
                                <div class="text-muted">
                                    Activates Stock Request Orders
                                </div>
                            </div>
                        </div>
                        <div class="col-xs-12 col-md-6 o_setting_box">
                            <div class="o_setting_left_pane">
                                <field name="stock_request_allow_virtual_loc" />
                            </div>
                            <div class="o_setting_right_pane">
                                <label
                                    string="Allow All Locations Types"
                                    for="stock_request_allow_virtual_loc"
                                />
                                <div class="text-muted">
                                    By default only internal and transit locations are allowed in Stock Request and Orders.
                                </div>
                            </div>
                        </div>
                        <div class="col-xs-12 col-md-6 o_setting_box">
                            <div class="o_setting_left_pane">
                                <field name="module_stock_request_submit" />
                            </div>
                            <div class="o_setting_right_pane">
                                <label
                                    string="Enable Submitted State"
                                    for="module_stock_request_purchase"
                                />
                                <div class="text-muted">
                                    Add State to Stock Request and Stock Request Orders if activated.
                                </div>
                            </div>
                        </div>
                    </div>
                    <h2>Purchases</h2>
                    <div
                        class="row mt16 o_settings_container"
                        id="stock_request_purchase"
                    >
                        <div class="col-xs-12 col-md-6 o_setting_box">
                            <div class="o_setting_left_pane">
                                <field name="module_stock_request_purchase" />
                            </div>
                            <div class="o_setting_right_pane">
                                <label
                                    string="Enable Stock Requests for Purchases"
                                    for="module_stock_request_purchase"
                                />
                                <div class="text-muted">
                                    Use Purchases with Stock Requests
                                </div>
                            </div>
                        </div>
                    </div>
                    <h2>Manufacturing</h2>
                    <div class="row mt16 o_settings_container" id="stock_request_mrp">
                        <div class="col-xs-12 col-md-6 o_setting_box">
                            <div class="o_setting_left_pane">
                                <field name="module_stock_request_mrp" />
                            </div>
                            <div class="o_setting_right_pane">
                                <label
                                    string="Enable Stock Requests for Manufacturing"
                                    for="module_stock_request_mrp"
                                />
                                <div class="text-muted">
                                    Use Manufacturing Orders with Stock Requests
                                </div>
                            </div>
                        </div>
                    </div>
                    <h2>Kanban</h2>
                    <div
                        class="row mt16 o_settings_container"
                        id="stock_request_purchase"
                    >
                        <div class="col-xs-12 col-md-6 o_setting_box">
                            <div class="o_setting_left_pane">
                                <field name="module_stock_request_kanban" />
                            </div>
                            <div class="o_setting_right_pane">
                                <label
                                    string="Enable Stock Requests Kanban cards"
                                    for="module_stock_request_purchase"
                                />
                                <div class="text-muted">
                                    Use Kanban cards for consumable products
                                </div>
                            </div>
                        </div>
                    </div>
                    <h2>Analytic</h2>
                    <div
                        class="row mt16 o_settings_container"
                        id="stock_request_analytic"
                    >
                        <div class="col-xs-12 col-md-6 o_setting_box">
                            <div class="o_setting_left_pane">
                                <field name="module_stock_request_analytic" />
                            </div>
                            <div class="o_setting_right_pane">
                                <label
                                    string="Enable Analytic Accounting in Stock Requests"
                                    for="module_stock_request_analytic"
                                />
                                <div class="text-muted">
                                    Analytic accounting in Stock Requests
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </xpath>
        </field>
    </record>
    <record id="action_stock_request_config" model="ir.actions.act_window">
        <field name="name">Settings</field>
        <field name="type">ir.actions.act_window</field>
        <field name="res_model">res.config.settings</field>
        <field name="view_mode">form</field>
        <field name="target">inline</field>
        <field name="context">{'module' : 'stock_request'}</field>
    </record>
</odoo>
