<?xml version="1.0" encoding="UTF-8" ?>
<!--

    Copyright 2017-2019 MuK IT GmbH
    Copyright 2024 Subteno - Timothée Vannier (https://www.subteno.com).
    License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).

  -->
<odoo>
    <record id="res_config_settings_view_form" model="ir.ui.view">
        <field name="name">res.config.settings.view.form.inherit.dms</field>
        <field name="model">res.config.settings</field>
        <field name="priority" eval="20" />
        <field name="inherit_id" ref="base.res_config_settings_view_form" />
        <field name="arch" type="xml">
            <xpath expr="//form" position="inside">
                <app string="Documents" groups="base.group_system" name="dms">
                    <block title="File Upload">
                        <setting
                            string="File Size"
                            help="Define the maximum upload size of a file in MB"
                        >
                            <field name="documents_binary_max_size" />
                        </setting>
                        <setting
                            string="File Extensions"
                            help="Define forbidden file extensions"
                        >
                            <field
                                name="documents_forbidden_extensions"
                                placeholder="exe,msi"
                            />
                        </setting>
                        <setting string="Storages" help="Show storages">
                            <button
                                name="%(dms.action_dms_storage)d"
                                string="Storages"
                                type="action"
                                class="oe_link"
                                icon="fa-arrow-right"
                            />
                        </setting>
                    </block>
                </app>
            </xpath>
        </field>
    </record>
    <record id="action_dms_settings_general" model="ir.actions.act_window">
        <field name="name">General 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': 'dms'}</field>
    </record>
</odoo>
