This question has been flagged
3508 Views

Hi, I need to call an action on a menuitem "Customer Invoices" from the "account_invoice" module to my custom module "test" how do i do that?if i click on my new menu then the Invoice form that shown on the account_invoice module been shown on my  module!!help please!I've tried this but it doesn't works!

<record model="ir.actions.act_window" id="action_invoice_tree1">
        <field name="name">Customer Invoices</field>
        <field name="res_model">test.test</field>
        <field name="view_type">form</field>
        <field name="view_mode">tree,form</field>
 </record>

<menuitem name="Test" id="menu_formation_root"/>
<menuitem name="test" id="menu_formation_formation" parent="menu_formation_root"/>
<menuitem name="Customer Invoices" id="menu_formation_formation2" action="action_invoice_tree1" parent="account_invoice.menu_action_invoice_tree1"/>
<record model="ir.actions.act_window.view" id="action_test_tree">
        <field name="sequence" eval="1"/>
        <field name="view_mode">tree</field>
<field name="act_window_id" ref="action_invoice_tree1"/> </record>

<record model="ir.actions.act_window.view" id="action_test_form">
        <field name="sequence" eval="1"/>
        <field name="view_mode">form</field>
<field name="act_window_id" ref="action_invoice_tree1"/> </record>

Xml:

from openerp.osv import fields, osv
from bsddb.dbtables import _columns
class test_test(osv.osv):
	_name = 'test.test'

any suggestion?

Avatar
Discard