Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

How to add an existing action on a menu-item to my new menu-item?

By
Takwa
on 6/8/15, 11:09 AM 389 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?

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 6/8/15, 11:09 AM
Seen: 389 times
Last updated: 6/8/15, 11:32 AM