<?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="type">form</field>
            <field name="arch" type="xml">
	            <form string="Generate Fiscal Year Opening Entries">
	                <separator string="Generate Fiscal Year Opening Entries" colspan="4"/>
	                <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." colspan="4"/>
	                <newline/>
	                <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" colspan="4"/>
	                <separator colspan="4"/>
	                <group colspan="4" col="6">
	                   <label string="" colspan="2"/>
	                   <button icon="gtk-cancel" special="cancel" string="Cancel"/>
	                   <button icon="gtk-execute" string="Create" name="data_save" type="object"/>
	                </group>
				</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>
