跳至内容
菜单
此问题已终结
2 回复
6662 查看

HI,

How can I call and do menu action from front-end js ?

ie , if I click on a button it should perform job like when we click on a menu in back-end

形象
丢弃
编写者 最佳答案

Hi I got the solution..


One option is through like this, just create a link like

<a class="btn btn-primary" t-att-href="'/web#menu_id=%s&amp;action=%s&amp;id=%s&amp;view_type=form&amp;model=your_model' % (%(addon.menu_id)d, %(addon.action_id)d, your_res_id, )">Go to backend</a>

This will redirect to back- end

or use do_action() in odoo js

形象
丢弃
相关帖文 回复 查看 活动
3
12月 22
19854
2
12月 19
7981
2
5月 24
2091
0
7月 19
4252
0
7月 19
8201