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,