<?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</field>
        <field name="model">res.config.settings</field>
        <field name="inherit_id" ref="point_of_sale.res_config_settings_view_form" />
        <field name="arch" type="xml">
            <xpath expr="//div[@id='pos_inventory_section']" position="after">
                <h2>Product Quantity</h2>
                <div class="row mt16 o_settings_container" id="pos_product_quantity">
                    <div class="col-12 col-lg-6 o_setting_box">
                        <div class="o_setting_left_pane">
                            <field name="pos_display_product_quantity" />
                        </div>
                        <div class="o_setting_right_pane">
                            <label
                                for="pos_display_product_quantity"
                                string="Display Product Quantity"
                            />
                            <div class="text-muted">
                                Display the quantity of available products in the POS for <bold
                                ><field
                                        name="pos_main_warehouse_id"
                                        class="oe_inline"
                                        nolabel="1"
                                    /> warehouse</bold>.
                            </div>
                        </div>
                    </div>
                    <div
                        class="col-12 col-lg-6 o_setting_box"
                        attrs="{'invisible': [('pos_display_product_quantity', '=', False)]}"
                    >
                        <div class="o_setting_right_pane">
                            <label
                                for="pos_additional_warehouse_ids"
                                string="Additional Warehouses"
                            />
                            <div class="text-muted">
                                Show quantity in the following warehouses in additional to <bold
                                ><field
                                        name="pos_main_warehouse_id"
                                        class="oe_inline"
                                        nolabel="1"
                                    /> warehouse</bold>.
                            </div>
                            <div class="alert alert-warning" role="alert">
                                Warehouses must belong to the same company as POS.
                            </div>
                            <div class="content-group mt16">
                                <field
                                    name="pos_additional_warehouse_ids"
                                    domain="[('id', '!=', pos_main_warehouse_id)]"
                                    widget="many2many_tags"
                                />
                            </div>
                        </div>
                    </div>
                    <div
                        class="col-12 col-lg-6 o_setting_box"
                        attrs="{'invisible': [('pos_display_product_quantity', '=', False)]}"
                    >
                        <div class="o_setting_right_pane">
                            <label
                                for="pos_minimum_product_quantity_alert"
                                string="Minimum Product Quantity Alert"
                            />
                            <div class="text-muted">
                                Mark quantity red if below or equal this value.
                            </div>
                            <div class="content-group mt16">
                                <field name="pos_minimum_product_quantity_alert" />
                            </div>
                        </div>
                    </div>
                </div>
            </xpath>
        </field>
    </record>

</odoo>
