コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
3384 ビュー

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.

アバター
破棄
関連投稿 返信 ビュー 活動
0
9月 20
3759
2
8月 25
1111
0
10月 20
2985
0
4月 24
1293
1
6月 23
3420