Skip to Content
Menú
This question has been flagged
2 Respostes
5884 Vistes

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



Avatar
Descartar

better to make the default view as list,

Best Answer

Hi,

add 1 param in tree_view_action,

'view_id': self.env.ref('module_name.xml_view_id').id
Avatar
Descartar
Autor

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

could you find a solution?

Related Posts Respostes Vistes Activitat
2
de maig 22
3509
1
d’ag. 21
6609
1
d’oct. 15
3428
0
de febr. 23
3731
1
de febr. 23
3136