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.

1

What is the use of ir.ui.menu in openerp 7.0 ?

By
Karthik Arumugam
on 8/17/15, 12:02 PM 585 views

Hi, I am new to  openerp and i wish to know about that what is model="ir.ui.menu" in openerp

1

Axel Mendoza

--Axel Mendoza--
10273
| 7 7 8
Camaguey, Cuba
--Axel Mendoza--

DevOps - Full stack - Software Architect - Developer - Technology Integrator

I could help you to develop anything and solve complex problems based on technologies, integrations and tricky stuffs mostly in Python with OpenERP/Odoo, Zato, Django and many others frameworks programming languages and technologies.

I offers consulting services to anyone with an unanswered questions or needs for customizations. Think about it, maybe it's better to have an expert to solve your issues and projects than having a full time employee trying to understand what to do an how

Reach me at aekroft@gmail.com

Axel Mendoza
On 8/17/15, 11:20 PM

That model is used for define a visible menu structure that can have top menus and their childrens that are related to the left vertical menus. Asociated to menus you can attach actions that are the responsibles of show views like tree, form, calendar, graphs...

#complete example menus are the final declared:

    <record id="solt_redis_store_form_view" model="ir.ui.view">
        <field name="name">solt.redis.store.form</field>
        <field name="model">solt.redis.store</field>
        <field name="arch" type="xml">
            <form string="Redis Profile" version="7.0">
               	<header>
               	    <button name="ping_service" string="Ping service" type="object" icon="gtk-go-forward"/>
                </header>
                <sheet layout="auto">
	             <group colspan="6">
	                <field name="name"/>
	                <field name="host"/>
	                <field name="port"/>
	                <field name="dbindex"/>
	                <field name="password" password="1"/>
	             </group>
	             <group colspan="6">
	                <field name="value_ids">
	                    <form string="Redis Key-Value">
	                	<group colspan="6">
		                    <field name="name"/>
		                    <field name="onlyread"/>
		                    <field name="value"/>
		                    <field name="real_value" readonly='1'/>
		                </group>
	                    </form>
	                    <tree string="Redis Key-Value">
	                	<field name="name"/>
	                        <field name="value"/>
	                	<field name="real_value" readonly='1'/>
	                    </tree>
	                </field>
	            </group>
	        </sheet>
            </form>
        </field>
    </record>
        
    <record id="solt_redis_store_tree_view" model="ir.ui.view">
        <field name="name">solt.redis.store.model.tree</field>
        <field name="model">solt.redis.store</field>
        <field name="arch" type="xml">
            <tree string="Redis Profiles" version="7.0">
               	<field name="name"/>
               	<field name="host"/>
            </tree>
        </field>
   </record>
        
        <record id="solt_redis_store_action" model="ir.actions.act_window">
            <field name="name">Redis Profiles</field>
            <field name="res_model">solt.redis.store</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree,form</field>
        </record>
        
   <menuitem name="Service Connection" id="solt_redis_store_profile_menu" parent="base.menu_administration" sequence="5"/>
   <menuitem name="Redis Profiles" id="solt_redis_store_profile_submenu" parent="solt_redis_store_profile_menu" action="solt_redis_store_action" sequence="1"/>
        	

Thank you Axel Mendoza, Will you please explain me with an example code.

Karthik Arumugam
on 8/18/15, 12:45 AM

I edit the answer to include an example

Axel Mendoza
on 8/18/15, 1:02 AM

Thank you very much Axel Mendoza

Karthik Arumugam
on 8/19/15, 2:44 AM

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

2 follower(s)

Stats

Asked: 8/17/15, 12:02 PM
Seen: 585 times
Last updated: 8/21/15, 5:20 AM