Skip to content

Commit

Permalink
[FIX] project_timeline: add fields in report.project.task.user to pre…
Browse files Browse the repository at this point in the history
…vent errors on timeline view

complementary to commit 42bd28c
  • Loading branch information
carlos-lopez-tecnativa committed Oct 23, 2024
1 parent d2f518b commit 591d129
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 0 deletions.
1 change: 1 addition & 0 deletions project_timeline/__init__.py
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
1 change: 1 addition & 0 deletions project_timeline/report/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import project_report
28 changes: 28 additions & 0 deletions project_timeline/report/project_report.py
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
"""
)

0 comments on commit 591d129

Please sign in to comment.