diff --git a/cor_custom/controllers/__init__.py b/cor_custom/controllers/__init__.py index 457bae2..12bcb5b 100755 --- a/cor_custom/controllers/__init__.py +++ b/cor_custom/controllers/__init__.py @@ -1,3 +1,3 @@ # -*- coding: utf-8 -*- -from . import controllers \ No newline at end of file +#from . import controllers \ No newline at end of file diff --git a/project_report/report/project_revenue_custom_report3.py b/project_report/report/project_revenue_custom_report3.py index 536be08..1daa9e3 100644 --- a/project_report/report/project_revenue_custom_report3.py +++ b/project_report/report/project_revenue_custom_report3.py @@ -102,8 +102,8 @@ cons_data1 as ( date_trunc('month', min(PRO_EMP.start_date)) AS min, date_trunc('month', coalesce(max(PRO_EMP.end_date), current_date AT TIME ZONE 'UTC')) AS max, PRO_EMP.start_date as start_date, - PRO_EMP.end_date as end_date, - --coalesce(PRO_EMP.end_date, current_date AT TIME ZONE 'UTC') as end_date, + --PRO_EMP.end_date as end_date, + coalesce(PRO_EMP.end_date, current_date AT TIME ZONE 'UTC') as end_date, PRO_EMP.project_id, PRO_EMP.employee_id, PRO_EMP.role, @@ -443,11 +443,11 @@ SELECT FROM pro_data left join account_analytic_line AAL on AAL.project_id=pro_data.pproject_id left join cons_data1 on cons_data1.project_id=AAL.project_id and cons_data1.employee_id=AAL.employee_id - and (AAL.start_datetime, AAL.end_datetime) OVERLAPS (cons_data1.start_date::date, cons_data1.end_date::date) - --and AAL.start_datetime --at time zone 'utc' at time zone (select tz from res_partner where id=3) - -- >= cons_data1.start_date::date + '00:00:00'::time AT TIME ZONE 'UTC' - --and AAL.end_datetime --at time zone 'utc' at time zone (select tz from res_partner where id=3) - -- <= cons_data1.end_date::date + '23:59:59'::time AT TIME ZONE 'UTC' + --and (AAL.start_datetime, AAL.end_datetime) OVERLAPS (cons_data1.start_date::date, cons_data1.end_date::date) + and AAL.start_datetime --at time zone 'utc' at time zone (select tz from res_partner where id=3) + >= cons_data1.start_date::date + '00:00:00'::time AT TIME ZONE 'UTC' + and AAL.end_datetime --at time zone 'utc' at time zone (select tz from res_partner where id=3) + <= cons_data1.end_date::date + '23:59:59'::time AT TIME ZONE 'UTC' where pro_data.pricing_type='employee_rate' and pro_data.project_type='hours_in_consultant' and COALESCE(pro_data.is_sub_project, FALSE) = False group by