Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
2 Odpowiedzi
5811 Widoki

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



Awatar
Odrzuć

better to make the default view as list,

Najlepsza odpowiedź

Hi,

add 1 param in tree_view_action,

'view_id': self.env.ref('module_name.xml_view_id').id
Awatar
Odrzuć
Autor

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

could you find a solution?

Powiązane posty Odpowiedzi Widoki Czynność
2
maj 22
3446
1
sie 21
6530
1
paź 15
3378
0
lut 23
3667
1
lut 23
3062