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

Hi everyone,

I have an Account model which has a one2many relationship with a Project model.

In the Account form view, we can see all the projects, and we can click "Add a Line" to create a new project. This opens the Project form view.

In the project form view, we have an Account many2one field. I would like this field to be pre-filled if the form view was opened from the account form view.

I have tried several approaches but none seems to have worked. I am trying to pass the context from the account form view using the context="{'default_account': active_id}" attribute (the field name is account in the project form view).


Any insights would be greatly appreciated. Thanks.

อวตาร
ละทิ้ง
ผู้เขียน
Related Posts ตอบกลับ มุมมอง กิจกรรม
0
เม.ย. 24
44
0
มี.ค. 24
2077
2
มี.ค. 24
3785
1
เม.ย. 23
112
1
ธ.ค. 22
2933