<?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.lunch</field>
        <field name="model">res.config.settings</field>
        <field name="priority" eval="90"/>
        <field name="inherit_id" ref="base.res_config_settings_view_form"/>
        <field name="arch" type="xml">
            <xpath expr="//form" position="inside">
                <app data-string="Lunch" string="Lunch" name="lunch" groups="lunch.group_lunch_manager">
                    <field name="currency_id" invisible="1"/>
                    <block title="Lunch" name="lunch_overdraft_setting_container">
                        <setting id="lunch_minimum_threshold" string="Lunch Overdraft" help="Maximum overdraft that your employees can reach" company_dependent="1">
                            <div class="content-group">
                                <div class="mt16 row">
                                    <label for="company_lunch_minimum_threshold" string="Overdraft" class="col-3 col-lg-3 o_light_label"/>
                                    <field name="company_lunch_minimum_threshold" widget="monetary"/>
                                </div>
                            </div>
                        </setting>
                    </block>
                    <block name="lunch_notification_setting_container">
                        <setting string="Reception notification" company_dependent="1" help="Send this message to your users when their order has been delivered." id="lunch_notification">
                            <field name="company_lunch_notify_message" widget="html" class="col col-lg w-100"/>
                        </setting>
                    </block>
                </app>
            </xpath>
        </field>
    </record>

    <record id="lunch_config_settings_action" model="ir.actions.act_window">
        <field name="name">Settings</field>
        <field name="res_model">res.config.settings</field>
        <field name="view_id" ref="res_config_settings_view_form"/>
        <field name="view_mode">form</field>
        <field name="context">{'module' : 'lunch', 'bin_size': False}</field>
    </record>
</odoo>
