Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
4861 Lượt xem

in odoo 8 

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

how to write the same client action in odoo 9  

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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);
Ảnh đại diện
Huỷ bỏ

Thanks Axel .....!

Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 8 22
4257
3
thg 2 25
4618
1
thg 6 23
1945
1
thg 5 23
1899
1
thg 10 22
4062