Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odgovori
3038 Prikazi

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

Avatar
Opusti
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
Opusti
Related Posts Odgovori Prikazi Aktivnost
1
jun. 21
3873
3
dec. 23
2544
0
nov. 23
1550
2
sep. 23
8461
2
nov. 20
11523