Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
2846 มุมมอง

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

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

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

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
มิ.ย. 21
3680
3
ธ.ค. 23
2219
0
พ.ย. 23
1312
2
ก.ย. 23
8250
2
พ.ย. 20
11241