Skip to Content
Menu
This question has been flagged
1 Atsakyti
3041 Rodiniai

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

Portretas
Atmesti
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

Portretas
Atmesti
Related Posts Replies Rodiniai Veikla
1
birž. 21
3873
3
gruod. 23
2546
0
lapkr. 23
1551
2
rugs. 23
8462
2
lapkr. 20
11523