<?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>
        <record id="view_account_fiscalyear_close" model="ir.ui.view">
            <field name="name">account.fiscalyear.close.form</field>
            <field name="model">account.fiscalyear.close</field>
            <field name="arch" type="xml">
                <form string="Generate Fiscal Year Opening Entries" version="7.0">
                    <separator string="Generate Fiscal Year Opening Entries"/>
                    <label string="This wizard will generate the end of year journal entries of selected fiscal year. Note that you can run this wizard many times for the same fiscal year: it will simply replace the old opening entries with the new ones."/>
                    <newline/>
                    <group col="4">
                        <field name="fy_id" domain = "[('state','=','draft')]"/>
                        <field name="fy2_id" domain = "[('state','=','draft')]"/>
                        <field name="journal_id"/>
                        <field name="period_id" domain ="[('fiscalyear_id','=',fy2_id),('special','=', True)]" />
                        <field name="report_name"/>
                    </group>
                    <footer>
                        <button string="Create" name="data_save" type="object" class="oe_highlight"/>
                        or
                        <button string="Cancel" class="oe_link" special="cancel"/>
                    </footer>
                </form>
            </field>
        </record>

        <record id="action_account_fiscalyear_close" model="ir.actions.act_window">
            <field name="name">Generate Opening Entries</field>
            <field name="res_model">account.fiscalyear.close</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree,form</field>
            <field name="view_id" ref="view_account_fiscalyear_close"/>
            <field name="target">new</field>
        </record>

        <menuitem action="action_account_fiscalyear_close"
            id="menu_wizard_fy_close"
            parent="menu_account_end_year_treatments" />

    </data>
</openerp>
