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

    project_field = fields.Many2one('project.project', 'name', select=True)

task_field = fields.Many2one('project.task', 'task_id', required=True, select=True)


I want that my field "task_field" shows me the project of the selected project in project_field.



อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hi wizardz and livenow

In the field definition on the view you could restrict it like:

<field name="project_field"/>
<field name="task_field" domain="[('project_id', '=', project_field)]"/>
อวตาร
ละทิ้ง
ผู้เขียน

It works perfectly, thank you Axel ! You are the best

happy to help you!

คำตอบที่ดีที่สุด

try to know my self

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
มิ.ย. 23
3459
1
พ.ย. 22
3760
Cannot create task แก้ไขแล้ว
2
มิ.ย. 20
3965
2
ก.ค. 18
7493
4
ก.ค. 18
8342