Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odgovori
12400 Prikazi

Any help please..?


Avatar
Opusti
Best Answer

1. Define your form view with the specific fields that you want to show.

2. Then return a form view in your model, like this:

@api.model
def my_action(self):
try:
form_view_id = self.env.ref("my_module.my_form_view_external_id").id
except Exception as e:
form_view_id = False
return {
'type': 'ir.actions.act_window',
'name': 'My Action Name',
'view_type': 'form',
'view_mode': 'form',
'res_model': 'my.model',
'views': [(form_view_id, 'form')],
'target': 'current',
}
Avatar
Opusti
Related Posts Odgovori Prikazi Aktivnost
0
dec. 24
1325
1
mar. 24
2380
0
jan. 23
3100
2
sep. 20
4040
6
sep. 20
29486