コンテンツへスキップ
メニュー
この質問にフラグが付けられました
2 返信
5876 ビュー

i filled everything in form view after that i am clicking on save button to save the record ,after saving the record view mode should be list view or tree view not form view how to do it?

i tried like this-

 

@api.multi

def tree_view_action(self):

return {

"name": _("Dummy Name"),

'view_mode': 'tree,form',

'view_type': 'form',

"res_model": 'assets.creation',

"type": 'ir.actions.act_window',

"target": "current",

}

----------and this method i called in create method

@api.model

def create(self,vals):

res = super(Equipment,self).create(vals)

res.tree_view_action()

return res



アバター
破棄

better to make the default view as list,

最善の回答

Hi,

add 1 param in tree_view_action,

'view_id': self.env.ref('module_name.xml_view_id').id
アバター
破棄
著作者

Thanku @Sunny ....I tried this but still same problem is there...

could you find a solution?

関連投稿 返信 ビュー 活動
2
5月 22
3502
1
8月 21
6597
1
10月 15
3425
0
2月 23
3724
1
2月 23
3130