Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
12407 มุมมอง

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',
}
อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
0
ธ.ค. 24
1328
Import Data From Another Model แก้ไขแล้ว
1
มี.ค. 24
2381
0
ม.ค. 23
3105
2
ก.ย. 20
4041
6
ก.ย. 20
29488