跳至内容
菜单
此问题已终结
2 回复
5855 查看

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
3484
1
8月 21
6565
1
10月 15
3416
0
2月 23
3681
1
2月 23
3110