Merge branch 'development' into 'master'

Report active field added

See merge request prakash.jain/cor-odoo!174
This commit is contained in:
prakash.jain 2021-04-22 00:00:20 -07:00
commit 065a918c23
2 changed files with 6 additions and 2 deletions

View File

@ -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,))

View File

@ -35,6 +35,8 @@
<filter string="Employee" name="employee" context="{'group_by':'employee_id'}"/>
<filter string="Start Time" name="sdate" domain="[]" context="{'group_by':'start_date:month'}"/>
<filter string="Task" name="task" context="{'group_by':'task_id'}"/>
<filter string="Archived" name="inactive" domain="[('active', '=', False)]"/>
<filter string="Active" name="active" domain="[('active', '=', True)]"/>
</group>
</search>
</field>