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

Ignorant Q, but: 

Is there any way to link to a task, just like you link to a project / partner in a calendar view? 

Currently have the same setup as www [dot] cybrosys [dot] com/blog/how-to-create-a-calendar-view-in-menus-of-the-odoo-15 

(excuse the [dots], no idea why links break the post and throws a 403)

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

Yes, you can link to a task in a calendar view in Odoo by creating a button that opens a form view for the selected task. You can do this by defining an action that opens the form view for the selected task. Here's an example code snippet in Python:


python

Copy code

action = {

    'type': 'ir.actions.act_window',

    'res_model': 'project.task',

    'view_mode': 'form',

    'target': 'current',

    'res_id': task.id,

}

return action

This code defines an action that opens the form view for the selected task with id task.id. You can then attach this action to a button in the calendar view and make the button visible when a task is selected.

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
0
ก.ย. 20
3749
2
ส.ค. 25
1067
0
ต.ค. 20
2964
0
เม.ย. 24
1270
1
มิ.ย. 23
3399