Odoo Help

0

How to write client action in odoo 9 js ?

By
sambath
on 10/14/16, 4:17 AM 902 views

in odoo 8 

instance.web.client_actions.add( 'petstore.homepage', 'instance.oepetstore.HomePage');

how to write the same client action in odoo 9  

2
Axel Mendoza
On 10/16/16, 10:02 PM

In Odoo 9 you could do it like this

var core = require('web.core');
var Widget = require('web.Widget');
var petstore_homepage = Widget.extend({});
core.action_registry.add("petstore.homepage", petstore_homepage);

Thanks Axel .....!

shameem@iWesabe
on 4/13/17, 1:43 AM
0
Damon
On 12/8/16, 7:29 PM

Did you get this to work in Odoo v9? Care to share the petstore.js file?

I've tried lots of things and still get the:

Could not find client action
'petstore.homepage'

error

Thank you

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.

Register

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)

Stats

Asked: 10/14/16, 4:17 AM
Seen: 902 times
Last updated: 12/8/16, 7:29 PM