Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
2 Risposte
5881 Visualizzazioni

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
Abbandona

better to make the default view as list,

Risposta migliore

Hi,

add 1 param in tree_view_action,

'view_id': self.env.ref('module_name.xml_view_id').id
Avatar
Abbandona
Autore

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

could you find a solution?

Post correlati Risposte Visualizzazioni Attività
2
mag 22
3506
1
ago 21
6605
1
ott 15
3428
0
feb 23
3728
1
feb 23
3134