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 make menu item a hyperlink?

By
Xia Sun
on 4/7/16, 8:43 AM 400 views

Hi all, I am doing one of my own module.

I have several menu item in my view. I want to make one of the menu item a hyperlink point to a specific URL.

I have no idea how to do this... Currently all menu items views are done with something like tree, form, kanban...

What I want is when click a menu item, it will jump to another page.

Thank you all!

3

Axel Mendoza

--Axel Mendoza--
10308
| 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 4/8/16, 12:33 AM

You could assign an action of type ir.actions.act_url, like:

<record model="ir.actions.act_url" id="action_google_url">

<field name="name">Open google.com</field>

<field name="url">https://google.com</field>

<field name="target">new</field>

</record>

use it normally in a menuitem like:

<menuitem parent="menu_parent" id="menu_google_url" action="action_google_url"/>

@Axel Mendoza, Thank you! This is exactly what i want. Sorry i don't have enough karma to comment your answer. BTW, could you tell me where may I find those APIs or methods like your answer? I did't find any Odoo document that is convenient to check.

Xia Sun
on 4/8/16, 12:43 AM

I use source code review and examples as my primary source of documentation. Also those are stuffs learned through years of using OpenERP and Odoo

Axel Mendoza
on 4/8/16, 1:07 AM

Strangely, the string "Open google.com" inside field "name" is not shown in the menu... instead it shows the id of menuitem without "_". Do you have any idea?

Xia Sun
on 4/10/16, 3:43 AM

No clue but you could set the string attribute for the menuitem

Axel Mendoza
on 4/10/16, 4:52 AM

string attribute doesn't work as well...

Xia Sun
on 4/10/16, 10:09 PM

finally i set a name attribute for menuitem and it works! Thanks bro!

Xia Sun
on 4/10/16, 10:36 PM
0
Xia Sun
On 4/8/16, 12:42 AM

@Axel Mendoza, Thank you! This is exactly what i want. Sorry i don't have enough karma to comment your answer.

BTW, could you tell me where may I find those APIs or methods like your answer? I did't find any Odoo document that is convenient to check.

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: 4/7/16, 8:43 AM
Seen: 400 times
Last updated: 4/8/16, 12:42 AM