Skip to Content
Menu
This question has been flagged
1 Reply
1930 Views

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

Avatar
Discard
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
Discard
Related Posts Replies Views Activity
1
Jun 21
2668
3
Dec 23
755
0
Nov 23
467
2
Sep 23
7136
2
Nov 20
10280