<?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>

        <record id="view_account_use_model" model="ir.ui.view">
            <field name="name">account.use.model.form</field>
            <field name="model">account.use.model</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
            <form string="Create Entries From Models">
                    <separator string="This wizard will create recurring accounting entries" colspan="4"/>
                    <label string="Create manual recurring entries in a chosen journal." width="400"/>
                    <field name="model" colspan="4" nolabel="1"/>
                    <separator colspan="4"/>
                    <group colspan="4" col="2">
                        <button icon="gtk-cancel" special="cancel" string="Cancel"/>
                        <button icon="gtk-execute" string="Create Entries" name="create_entries" type="object"/>
                    </group>
            </form>
            </field>
        </record>

        <record id="action_view_account_use_model" model="ir.actions.act_window">
            <field name="name">Manual Recurring</field>
            <field name="res_model">account.use.model</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree,form</field>
               <field name="view_id" ref="view_account_use_model"/>
               <field name="target">new</field>
               <field name="context">{'model_line':'model_line'}</field>
        </record>

        <menuitem name="Manual Recurring" action="action_view_account_use_model" id="menu_action_manual_recurring" sequence="10" parent="account.menu_finance_recurrent_entries"/>

        <record id="view_account_use_model_create_entry" model="ir.ui.view">
            <field name="name">account.use.model.create.entry.form</field>
            <field name="model">account.use.model</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <form string="Use Model">
                    <label string = "Are you sure you want to create entries?" colspan="2"/>
                    <newline/>
                    <button icon="gtk-cancel" special="cancel" string="Cancel"/>
                    <button icon="gtk-execute" string="Ok" name="create_entries" type="object" default_focus='1'/>
               </form>
            </field>
        </record>

        <record id="action_account_use_model_create_entry" model="ir.actions.act_window">
            <field name="name">Manual Recurring</field>
            <field name="res_model">account.use.model</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree,form</field>
            <field name="view_id" ref="view_account_use_model_create_entry"/>
            <field name="target">new</field>
        </record>

    </data>
</openerp>
