تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
2 الردود
4784 أدوات العرض

    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

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
1
يونيو 23
3407
1
نوفمبر 22
3703
Cannot create task تم الحل
2
يونيو 20
3902
2
يوليو 18
7427
4
يوليو 18
8260