Odoo Help


How do I call a client action in return of a model function ?

PJ Soule
on 3/28/14, 8:03 AM 4,120 views

Hello everyone,

In my project, I had to create a web module (initally following the openerp tutorial) to show some specific information, from several different models (like a kanban view with trees inside).

For now, I display this "web view" using a menu, which calls the client action I created for my module, like this :

<menuitem id="main_results_menu" name="Results" />

<menuitem id="result_menu" name="Results"
    parent="main_results_menu" />

<record id="action_results_show" model="ir.actions.client">
    <field name="name">Results</field>
    <field name="tag">results.result</field>

<menuitem id="result_menu_show" name="Show results" parent="result_menu"

In my client code, I add the client action like this :

instance.web.client_actions.add('results.result', 'instance.rip.ResultsView');

Everything works fine, but the final goal is to present my "web view" after I execute some python code from a button in a classic form view.

The button executes some searches, then should show my view. I tried this, but I get an error ("Action manager can't handle action of type ir.action.client")

res = {
    'type': 'ir.action.client',
return res

Is there any way to achieve this ?

Thank you !

Any success with this yet? I'm running across the same problem.

Ryan Casey
on 4/2/14, 1:28 PM
Ryan Casey
On 4/2/14, 2:47 PM

I was having the same issue as you, and I just figured it out. There is no such type as "ir.action.client". It's "ir.actions.client".

So your code should be:

res = {
    'type': 'ir.actions.client',
return res

And this illustrates why using class properties and constants instead of "magic strings" is generally a good thing to do.

Hope this helps you!

Thank you for this answer. Finally, I changed my web module for a form widget, and I don't have any issues now,, Hope this answer can help anyone else !

PJ Soule
on 4/8/14, 8:00 AM

About This Community

This platform 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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 3/28/14, 8:03 AM
Seen: 4120 times
Last updated: 3/16/15, 8:10 AM