From 66df5d18069395234e7db84a2a4ad4aa613d21ce Mon Sep 17 00:00:00 2001 From: projectsodoo Date: Thu, 22 Apr 2021 12:29:17 +0530 Subject: [PATCH] Report active field added --- project_report/report/project_timesheet_report.py | 6 ++++-- project_report/report/project_timesheet_report_views.xml | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/project_report/report/project_timesheet_report.py b/project_report/report/project_timesheet_report.py index 6a551fb..09d7495 100755 --- a/project_report/report/project_timesheet_report.py +++ b/project_report/report/project_timesheet_report.py @@ -20,6 +20,7 @@ class ProjectTimelineReport(models.Model): timestamp = fields.Char('Timestamp', readonly=True) task_id = fields.Many2one('project.task', string='Task', readonly=True) description = fields.Char('Description', readonly=True) + active = fields.Boolean(string="Active", readonly=True) #sub_project = fields.Many2many('project.project', compute='_compute_related_subproject') """@api.depends('project_id') @@ -79,11 +80,12 @@ class ProjectTimelineReport(models.Model): to_char((end_datetime at time zone 'utc') at time zone 'Asia/Jerusalem', 'HH24:MI')) as timestamp, --CONCAT(to_char(start_datetime at time zone 'utc', 'HH24:MI'), '-', to_char(end_datetime at time zone 'utc', 'HH24:MI')) as timestamp, task_id, - aal.name as description + aal.name as description, + pro.active as active from account_analytic_line aal left join project_project pro on pro.id = aal.project_id --left join hr_employee emp on emp.id = aal.employee_id - where pro.active = True + --where pro.active = True )""" % (self._table,)) diff --git a/project_report/report/project_timesheet_report_views.xml b/project_report/report/project_timesheet_report_views.xml index 288edb9..dc9450f 100755 --- a/project_report/report/project_timesheet_report_views.xml +++ b/project_report/report/project_timesheet_report_views.xml @@ -35,6 +35,8 @@ + +