Ir al contenido
Menú
Se marcó esta pregunta
2 Respuestas
6719 Vistas

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
Descartar
Autor Mejor respuesta

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
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
3
dic 22
19870
2
dic 19
7990
2
may 24
2102
0
jul 19
4279
0
jul 19
8216