diff --git a/cor_custom/models/project_hours.py b/cor_custom/models/project_hours.py
index 6f88ee3..62ea634 100755
--- a/cor_custom/models/project_hours.py
+++ b/cor_custom/models/project_hours.py
@@ -85,8 +85,8 @@ class ProjectConsultantHrs(models.Model):
domain = [
('project_id','=',val.project_id.id),
('employee_id', '=', val.employee_id.id),
- ('date', '>=', val.start_date),
- ('date', '<=', val.end_date)
+ ('start_datetime', '>=', val.start_date),
+ ('end_datetime', '<=', val.end_date)
]
timesheets = Timesheet.search(domain)
val.actual_hours = sum(timesheet.unit_amount for timesheet in timesheets)
diff --git a/project_report/report/project_budget_hrs_analysis.py b/project_report/report/project_budget_hrs_analysis.py
index 1628951..b415a04 100755
--- a/project_report/report/project_budget_hrs_analysis.py
+++ b/project_report/report/project_budget_hrs_analysis.py
@@ -21,7 +21,7 @@ class BudgetHrsAnalysis(models.Model):
partner_id = fields.Many2one('res.partner', string='Client', readonly=True)
employee_id = fields.Many2one('hr.employee', string='Consultant', readonly=True)
hours_type = fields.Char(string="Hours Type", readonly=True)
- hours = fields.Float("Hours", digits=(16, 2), readonly=True, group_operator="sum")
+ hours = fields.Float("Timeline", digits=(16, 2), readonly=True, group_operator="sum")
pricing_type = fields.Selection([
('fixed_rate', 'Fixed rate'),
('employee_rate', 'Consultant rate')
@@ -50,10 +50,12 @@ class BudgetHrsAnalysis(models.Model):
ROW_NUMBER() OVER() as id,
project_id,
parent_project,
+ startdate as start_date,
+ enddate as end_date,
--is_sub_project,
--sub_project,
- date_start AS start_date,
- date AS end_date,
+ --date_start AS start_date,
+ --date AS end_date,
timesheet_date,
pricing_type as pricing_type,
project_type as project_type,
@@ -65,6 +67,8 @@ class BudgetHrsAnalysis(models.Model):
pro.id AS project_id,
(select project_id from project_subproject_rel as par where pro.id=par.id limit 1) as parent_project,
pro_emp.employee_id AS employee_id,
+ date_start AS startdate,
+ date AS enddate,
'Budgeted Hours' as hours_type,
null::date AS timesheet_date,
pro_emp.budgeted_qty as hours,
@@ -80,6 +84,8 @@ class BudgetHrsAnalysis(models.Model):
pro.id AS project_id,
(select project_id from project_subproject_rel as par where pro.id=par.id limit 1) as parent_project,
null::int AS employee_id,
+ date_start AS startdate,
+ date AS enddate,
'Budgeted Hours' as hours_type,
null::date AS timesheet_date,
pro.budgeted_hours2 as hours,
@@ -95,6 +101,8 @@ class BudgetHrsAnalysis(models.Model):
pro.id AS project_id,
(select project_id from project_subproject_rel as par where pro.id=par.id limit 1) as parent_project,
AAL.employee_id AS employee_id,
+ start_datetime AS startdate,
+ end_datetime AS enddate,
'Actual Hours' as hours_type,
AAL.date AS timesheet_date,
unit_amount as hours,
@@ -111,6 +119,8 @@ class BudgetHrsAnalysis(models.Model):
pro.id AS project_id,
(select project_id from project_subproject_rel as par where pro.id=par.id limit 1) as parent_project,
AAL.employee_id AS employee_id,
+ start_datetime::DATE AS startdate,
+ end_datetime::DATE AS enddate,
'Actual Hours' as hours_type,
AAL.date AS timesheet_date,
unit_amount as hours,
diff --git a/project_report/report/project_budget_hrs_analysis_views.xml b/project_report/report/project_budget_hrs_analysis_views.xml
index eb2e92a..2928930 100755
--- a/project_report/report/project_budget_hrs_analysis_views.xml
+++ b/project_report/report/project_budget_hrs_analysis_views.xml
@@ -62,9 +62,9 @@
-
-
-
+
+
+
@@ -77,7 +77,7 @@
project.budget.hrs.report
graph,tree,pivot
- {'search_default_group_by_project': 1,'search_default_group_by_hours_type': 1, 'default_res_model': 'project.budget.hrs.report'}
+ {'search_default_group_by_project': 1,'search_default_sdate': 1,'search_default_edate': 1,'search_default_group_by_hours_type': 1, 'default_res_model': 'project.budget.hrs.report'}