Skip to Content
Menu
Dette spørgsmål er blevet anmeldt
2 Besvarelser
6711 Visninger

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

Avatar
Kassér
Forfatter Bedste svar

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

Avatar
Kassér
Related Posts Besvarelser Visninger Aktivitet
3
dec. 22
19863
2
dec. 19
7984
2
maj 24
2094
0
jul. 19
4257
0
jul. 19
8210