-
-
Notifications
You must be signed in to change notification settings - Fork 785
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIX] project_timeline: add fields in report.project.task.user to pre…
…vent errors on timeline view complementary to commit 42bd28c
- Loading branch information
1 parent
d2f518b
commit 591d129
Showing
3 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
|
||
from . import models | ||
from . import report |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import project_report |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Copyright 2024 Tecnativa - Carlos López | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
|
||
from odoo import fields, models | ||
|
||
|
||
class ReportProjectTaskUser(models.Model): | ||
_inherit = "report.project.task.user" | ||
|
||
planned_date_start = fields.Datetime(readonly=True) | ||
planned_date_end = fields.Datetime(readonly=True) | ||
|
||
def _select(self): | ||
return ( | ||
super()._select() | ||
+ """, | ||
t.planned_date_start, | ||
t.planned_date_end""" | ||
) | ||
|
||
def _group_by(self): | ||
return ( | ||
super()._group_by() | ||
+ """, | ||
t.planned_date_start, | ||
t.planned_date_end | ||
""" | ||
) |