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

    <record id="view_stock_config_settings" model="ir.ui.view">
        <field name="name">Ventor/mERP Picking Wave - Stock Settings</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[@data-key='ventor_base']" position="inside" >
                <h2>Picking Strategy</h2>
                <div class="row mt16 o_settings_container">
                    <div class="col-xs-12 col-md-4 o_setting_box">
                        <div class="" attrs="{'invisible': [('module_outgoing_routing','=',False)]}">
                            Please, select parameters to calculate route through warehouse(s):
                        </div>
                        <div class="text-muted" attrs="{'invisible': [('module_outgoing_routing','=',False)]}">
                            <br/>Your current settings:
                        </div>
                        <div class="text-muted" attrs="{'invisible': ['|', ('module_outgoing_routing','=',False),
                            '!', '&amp;', ('outgoing_routing_strategy', '=', 'location_id.name'), ('outgoing_routing_order', '=', '0')]}">
                            - the route is calculated from <b>location</b> '<b>A</b>' to '<b>Z</b>'
                        </div>
                        <div class="text-muted" attrs="{'invisible': ['|', ('module_outgoing_routing','=',False),
                            '!', '&amp;', ('outgoing_routing_strategy', '=', 'location_id.name'), ('outgoing_routing_order', '=', '1')]}">
                            - the route is calculated from <b>location</b> '<b>Z</b>' to '<b>A</b>'
                        </div>
                        <div class="text-muted" attrs="{'invisible': ['|', ('module_outgoing_routing','=',False),
                            '!', '&amp;', ('outgoing_routing_strategy', '=', 'location_id.removal_prio'), ('outgoing_routing_order', '=', '0')]}">
                            - the route is calculated from location with <b>removal priority</b> '<b>0</b>' to '<b>∞</b>'
                        </div>
                        <div class="text-muted" attrs="{'invisible': ['|', ('module_outgoing_routing','=',False),
                            '!', '&amp;', ('outgoing_routing_strategy', '=', 'location_id.removal_prio'), ('outgoing_routing_order', '=', '1')]}">
                            - the route is calculated from location with <b>removal priority</b> '<b>∞</b>' to '<b>0</b>'
                        </div>
                        <div class="text-muted" attrs="{'invisible': ['|', ('module_outgoing_routing','=',False),
                            '!', '&amp;', ('outgoing_routing_strategy', '=', 'product_id.name'), ('outgoing_routing_order', '=', '0')]}">
                            - the route is calculated from location contains <b>product</b> '<b>A</b>' to '<b>Z</b>'
                        </div>
                        <div class="text-muted" attrs="{'invisible': ['|', ('module_outgoing_routing','=',False),
                            '!', '&amp;', ('outgoing_routing_strategy', '=', 'product_id.name'), ('outgoing_routing_order', '=', '1')]}">
                            - the route is calculated from location contains <b>product</b> '<b>Z</b>' to '<b>A</b>'
                        </div>
                    </div>
                    <div class="col-xs-12 col-md-4 o_setting_box">
                        <div class="o_setting_left_pane"/>
                        <div class="o_setting_right_pane">
                            <label for="outgoing_routing_strategy"/>
                            <div class="text-muted"></div>
                            <field name="outgoing_routing_strategy"
                                class="o_light_label"
                                widget="radio"
                                attrs="{'invisible': [('module_outgoing_routing','=',False)]}"/>
                        </div>
                    </div>
                    <div class="col-xs-12 col-md-4 o_setting_box">
                        <div class="o_setting_left_pane"/>
                        <div class="o_setting_right_pane">
                            <label for="outgoing_routing_order"/>
                            <div class="text-muted"></div>
                            <field name="outgoing_routing_order"
                                class="o_light_label"
                                widget="radio"
                                attrs="{'invisible': [('module_outgoing_routing','=',False)]}"/>
                        </div>
                    </div>
                </div>
                <div class="row mt16 o_settings_container">
                </div>
                <h2>Reservation Strategy</h2>
                <div class="row mt16 o_settings_container">
                    <div class="col-xs-12 col-md-4 o_setting_box">
                        <div class="" attrs="{'invisible': [('module_outgoing_routing','=',False)]}">
                            Please, select parameters to reorder quants during reservation:
                        </div>
                        <div class="text-muted" attrs="{'invisible': [('module_outgoing_routing','=',False)]}">
                            <br/>Your current settings:
                        </div>
                        <div class="text-muted" attrs="{'invisible': ['|', ('module_outgoing_routing','=',False),
                            '!', ('stock_reservation_strategy', '=', 'none')]}">
                            - quants are reserved in Odoo standard way (FIFO/LIFO)
                        </div>
                        <div class="text-muted" attrs="{'invisible': ['|', ('module_outgoing_routing','=',False),
                            '!', ('stock_reservation_strategy', '=', 'base')]}">
                            - quants are reserved according to Picking strategy (see above)
                        </div>
                        <div class="text-muted" attrs="{'invisible': ['|', '|', ('module_outgoing_routing','=',False), ('outgoing_routing_strategy', '=', 'location_id.removal_prio'),
                            '!', '&amp;', ('stock_reservation_strategy', '=', 'quantity'), ('outgoing_routing_order', '=', '0')]}">
                            - quants are reserved first in locations that contain a sufficient amount of product and have higher priority (i.e. from location name 'A' and beyond)
                        </div>
                        <div class="text-muted" attrs="{'invisible': ['|', '|', ('module_outgoing_routing','=',False), ('outgoing_routing_strategy', '=', 'location_id.removal_prio'),
                            '!', '&amp;', ('stock_reservation_strategy', '=', 'quantity'), ('outgoing_routing_order', '=', '1')]}">
                            - quants are reserved first in locations that contain a sufficient amount of product and have higher priority (i.e. from location name 'Z' to 'A')
                        </div>
                        <div class="text-muted" attrs="{'invisible': ['|', '|', ('module_outgoing_routing','=',False), ('outgoing_routing_strategy', '!=', 'location_id.removal_prio'),
                            '!', '&amp;', ('stock_reservation_strategy', '=', 'quantity'), ('outgoing_routing_order', '=', '0')]}">
                            - quants are reserved first in locations that contain a sufficient amount of product and have higher priority (i.e. from location with removal priority '0' to '∞')
                        </div>
                        <div class="text-muted" attrs="{'invisible': ['|', '|', ('module_outgoing_routing','=',False), ('outgoing_routing_strategy', '!=', 'location_id.removal_prio'),
                            '!', '&amp;', ('stock_reservation_strategy', '=', 'quantity'), ('outgoing_routing_order', '=', '1')]}">
                            - quants are reserved first in locations that contain a sufficient amount of product and have higher priority (i.e. from location with removal priority '∞' to '0')
                        </div>
                    </div>
                    <div class="col-xs-12 col-md-8 o_setting_box">
                        <div class="o_setting_left_pane"/>
                        <div class="o_setting_right_pane">
                            <label for="stock_reservation_strategy"/>
                            <div class="text-muted"></div>
                            <field name="stock_reservation_strategy"
                                class="o_light_label"
                                widget="radio"
                                attrs="{'invisible': [('module_outgoing_routing','=',False)]}"/>
                        </div>
                    </div>
                    <div class="col-xs-12 col-md-4 o_setting_box">
                    </div>
                </div>
            </xpath>
        </field>
    </record>

</odoo>
