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

I have a simple module that is used to create a custom confirmation. On my custom modules form I would like to create a Task for a specific Project. Odoo handled the Create, Import, Print, etc buttons for me so I am not entirely sure how to link a specific Project's Create button to my custom app.

Theoretically, you hit Create and it opens a new Task with the customer tied to it.

الصورة الرمزية
إهمال

Hi C S, as far as, I can understand,whenever you are creating a new task, it should link to a specific project....is it ur requirement?

الكاتب

Yep. So when they click "Create Task" (or whatever I call the button), it would open a new Task for a specific Project. My main issue is figuring out how to add the button to create the task.

Then in that case you need to override the create method of task object and there you can search for the required project with name which will result in the id for that project,then assign the values of project_id with that id.

الكاتب

Awesome, i'll look into that. Thanks!

الكاتب أفضل إجابة

I overlooked the simplest thing. I added a many2one field linking project.task. From there the user can select any project and assign the information as needed. That was all I needed to satisfy this requirement.

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
1
مارس 15
3962
0
مارس 17
3073
0
فبراير 25
751
13
نوفمبر 19
19536
1
يونيو 23
3373