跳至内容
菜单
此问题已终结
1 回复
12429 查看

Any help please..?


形象
丢弃
最佳答案

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',
}
形象
丢弃
相关帖文 回复 查看 活动
0
12月 24
1349
1
3月 24
2413
0
1月 23
3131
2
9月 20
4068
6
9月 20
29512