跳至內容
選單
此問題已被標幟
1 回覆
2764 瀏覽次數

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

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
1
6月 21
3567
3
12月 23
1987
0
11月 23
1174
2
9月 23
8154
2
11月 20
11095