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

        <record id="action_company_analysis_tree" model="ir.actions.act_window">
            <field name="name">Company Analysis</field>
            <field name="res_model">account.entries.report</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree,graph</field>
            <field name="context">{'group_by':['user_type'], 'group_by_no_leaf':1}</field>
            <field name="view_id" ref="account.view_account_entries_report_tree"/>
            <field name="domain">[('year','=',time.strftime('%Y'))]</field>
        </record>

        <record id="board_account_form" model="ir.ui.view">
            <field name="name">board.account.form</field>
            <field name="model">board.board</field>
            <field name="arch" type="xml">
                <form string="Account Board" version="7.0">
                    <board style="2-1">
                        <column>
                            <action name="%(action_company_analysis_tree)d" string="Company Analysis"/>
                        </column>
                    </board>
                </form>
            </field>
        </record>

        <record id="open_board_account" model="ir.actions.act_window">
            <field name="name">Accounting</field>
            <field name="res_model">board.board</field>
            <field name="view_type">form</field>
            <field name="view_mode">form</field>
            <field name="usage">menu</field>
            <field name="view_id" ref="board_account_form"/>
        </record>

        <menuitem id="menu_board_account"
                  action="open_board_account" 
                  icon="terp-graph"  
                  parent="base.menu_reporting_dashboard" 
                  groups="group_account_user,group_account_manager" 
                  sequence="45"/>

    </data>
</openerp>
