<?xml version="1.0"?>
<openerp>
    <data>
    <!--  Need to merge this action in associations -->

        <record model ="ir.ui.view" id="view_report_event_reg_graph">
            <field name="name">Registration Event report</field>
            <field name="model">report.event.registration</field>
            <field name="type">graph</field>
            <field name="arch" type="xml">
                <graph string="Event on Registration"  type="bar" >
                    <field name="event_id"/>
                    <field name="draft_state" operator="+"/>
                    <field name="confirm_state" operator="+"/>
                    <field name="register_max" operator="+"/>
                </graph>
            </field>
        </record>

        <record  model="ir.actions.act_window" id="act_event_reg">
            <field name="name">Events On Registrations</field>
            <field name="res_model">report.event.registration</field>
            <field name="view_type">form</field>
            <field name="view_mode">graph,tree</field>
            <field name="view_id" ref="view_report_event_reg_graph"/>
        </record>

       <record model="ir.actions.act_window" id="act_event_view">
           <field name="name">Next Events</field>
           <field name="type">ir.actions.act_window</field>
           <field name="res_model">event.event</field>
           <field name="view_type">form</field>
           <field name="view_mode">tree,form</field>
       </record>

        <record model="board.note.type" id="note_association_type">
            <field name="name">associations</field>
        </record>

        <record model="ir.ui.view" id="board_associations_manager_form">
            <field name="name">board.associations.manager.form</field>
            <field name="model">board.board</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <form string="Association Dashboard">
                    <hpaned position="100">
                        <child1>
                            <action string="Next Events"
                                name="%(act_event_view)d"
                                colspan="4"/>
                            <action
                                string="Unpaid Invoices"
                                name="%(account.action_invoice_tree)d"
                                colspan="4"
                                domain="[('state','not in',['draft','cancel']),('reconciled','=',False),('type','=','out_invoice')]"/>
                        </child1>
                        <child2>
                            <action string="Register Events"
                                name="%(act_event_reg)d"
                                colspan="4"/>

                        </child2>

                    </hpaned>
                </form>
            </field>
        </record>

        <record model="ir.actions.act_window" id="open_board_associations_manager">
            <field name="name">Event Dashboard</field>
            <field name="res_model">board.board</field>
            <field name="view_type">form</field>
            <field name="view_mode">form</field>
            <field name="view_id" ref="board_associations_manager_form"/>
        </record>
        <menuitem id="board_associations" name="Dashboard" parent="base.menu_report_association" sequence="0"/>
        <menuitem
            name="Events" parent="board_associations"
            action="open_board_associations_manager"
            sequence="1"
            id="menu_board_associations_manager"
            icon="terp-graph"/>
         <menuitem name="Marketing" icon="terp-crm" id="base.marketing_menu" sequence="17" action="open_board_associations_manager"/>

    </data>
</openerp>
