Se rendre au contenu
Menu
Cette question a été signalée
2 Réponses
5785 Vues

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
Ignorer

better to make the default view as list,

Meilleure réponse

Hi,

add 1 param in tree_view_action,

'view_id': self.env.ref('module_name.xml_view_id').id
Avatar
Ignorer
Auteur

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

could you find a solution?

Publications associées Réponses Vues Activité
2
mai 22
3409
1
août 21
6508
1
oct. 15
3350
0
févr. 23
3650
1
févr. 23
3019