Skip to Content
Menú
This question has been flagged
1 Respondre
2760 Vistes

i have a custom view and i need return a custom view from javascript ! how to do it !

Avatar
Descartar
Best Answer

Hi,

Try like below code.

$("#your button id").click(function(){
        self.do_action({
            name:'view name',
            type: 'ir.actions.act_window',
            res_model: 'model.name',
            view_mode: 'kanban',
            views: [[view_id, 'kanban']],
            domain: [['state', '=', 'pending']],
        })
        })

in view_id, refer your corresponding models view id

Regards

Avatar
Descartar
Related Posts Respostes Vistes Activitat
1
de juny 21
3560
3
de des. 23
1975
0
de nov. 23
1174
2
de set. 23
8151
2
de nov. 20
11091