<?xml version="1.0"?>
<!-- This file is part of Tryton.  The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<tryton>
    <data>
        <menuitem name="Fiscal Years" parent="menu_account_configuration"
            id="menu_fiscalyear_configuration"/>
        <record model="ir.ui.view" id="fiscalyear_view_form">
            <field name="model">account.fiscalyear</field>
            <field name="type">form</field>
            <field name="name">fiscalyear_form</field>
        </record>
        <record model="ir.ui.view" id="fiscalyear_view_tree">
            <field name="model">account.fiscalyear</field>
            <field name="type">tree</field>
            <field name="name">fiscalyear_tree</field>
        </record>
        <record model="ir.action.act_window" id="act_fiscalyear_form">
            <field name="name">Fiscal Years</field>
            <field name="res_model">account.fiscalyear</field>
        </record>
        <record model="ir.action.act_window.view" id="act_fiscalyear_form_view1">
            <field name="sequence" eval="10"/>
            <field name="view" ref="fiscalyear_view_tree"/>
            <field name="act_window" ref="act_fiscalyear_form"/>
        </record>
        <record model="ir.action.act_window.view" id="act_fiscalyear_form_view2">
            <field name="sequence" eval="20"/>
            <field name="view" ref="fiscalyear_view_form"/>
            <field name="act_window" ref="act_fiscalyear_form"/>
        </record>
        <menuitem parent="menu_fiscalyear_configuration"
            action="act_fiscalyear_form" id="menu_fiscalyear_form"/>

        <record model="ir.model.access" id="access_fiscalyear">
            <field name="model" search="[('model', '=', 'account.fiscalyear')]"/>
            <field name="perm_read" eval="True"/>
            <field name="perm_write" eval="False"/>
            <field name="perm_create" eval="False"/>
            <field name="perm_delete" eval="False"/>
        </record>
        <record model="ir.model.access" id="access_fiscalyear_account_admin">
            <field name="model" search="[('model', '=', 'account.fiscalyear')]"/>
            <field name="group" ref="group_account_admin"/>
            <field name="perm_read" eval="True"/>
            <field name="perm_write" eval="True"/>
            <field name="perm_create" eval="True"/>
            <field name="perm_delete" eval="True"/>
        </record>

        <record model="ir.rule.group" id="rule_group_fiscalyear">
            <field name="model" search="[('model', '=', 'account.fiscalyear')]"/>
            <field name="global_p" eval="True"/>
        </record>
        <record model="ir.rule" id="rule_fiscalyear1">
            <field name="domain">[('company', '=', user.company.id if user.company else None)]</field>
            <field name="rule_group" ref="rule_group_fiscalyear"/>
        </record>

        <record model="ir.ui.view"
            id="fiscalyear_balance_non_deferral_start_view_form">
            <field
                name="model">account.fiscalyear.balance_non_deferral.start</field>
            <field name="type">form</field>
            <field
                name="name">fiscalyear_balance_non_deferral_start_form</field>
        </record>

        <record model="ir.action.wizard" id="act_balance_non_deferral">
            <field name="name">Balance Non-Deferral</field>
            <field
                name="wiz_name">account.fiscalyear.balance_non_deferral</field>
        </record>
        <menuitem parent="menu_processing" sequence="10"
            action="act_balance_non_deferral"
            id="menu_balance_non_deferral"/>

        <record model="ir.ui.view" id="fiscalyear_close_start_view_form">
            <field name="model">account.fiscalyear.close.start</field>
            <field name="type">form</field>
            <field name="name">fiscalyear_close_start_form</field>
        </record>

        <record model="ir.action.wizard" id="act_close_fiscalyear">
            <field name="name">Close Fiscal Year</field>
            <field name="wiz_name">account.fiscalyear.close</field>
        </record>
        <menuitem parent="menu_processing" sequence="20"
            action="act_close_fiscalyear" id="menu_close_fiscalyear"/>
    </data>
</tryton>
