diff --git a/cor_custom/models/analytic.py b/cor_custom/models/analytic.py
index dc79a27..458a670 100755
--- a/cor_custom/models/analytic.py
+++ b/cor_custom/models/analytic.py
@@ -133,38 +133,46 @@ class AccountAnalyticLine(models.Model):
res = super(AccountAnalyticLine, self).export_data(fields)
for index, val in enumerate(res['datas']):
#print("task_id", fields_name)
- if fields_name.get('date') and fields_name.get('date') >= 0:
+ #if fields_name.get('date') and fields_name.get('date') >= 0:
+ if fields_name.get('date') is not None:
tdateindex = fields_name.get('date')
tdate = res['datas'][index][tdateindex]
if tdate:
res['datas'][index][tdateindex] = datetime.strftime(tdate, "%d/%m/%Y")
- if fields_name.get('start_datetime') and fields_name.get('start_datetime') >= 0:
+ #if fields_name.get('start_datetime') and fields_name.get('start_datetime') >= 0:
+ if fields_name.get('start_datetime') is not None:
start_datetime_index = fields_name.get('start_datetime')
start_datetime = res['datas'][index][start_datetime_index]
if start_datetime:
res['datas'][index][start_datetime_index] = datetime.strftime(start_datetime, "%d/%m/%Y %H:%M")
- if fields_name.get('end_datetime') and fields_name.get('end_datetime') >= 0:
+ if fields_name.get('end_datetime') is not None:
end_datetime_index = fields_name.get('end_datetime')
end_datetime= res['datas'][index][end_datetime_index]
if end_datetime:
res['datas'][index][end_datetime_index] = datetime.strftime(end_datetime, "%d/%m/%Y %H:%M")
- if fields_name.get('task_id') and fields_name.get('task_id') >= 0:
+ if fields_name.get('task_id') is not None:
taskindex = fields_name.get('task_id')
ttask = res['datas'][index][taskindex]
if type(ttask) == bool:
res['datas'][index][taskindex] = ''
- if fields_name.get('start_time') and fields_name.get('start_time') >= 0:
+ if fields_name.get('start_time') is not None:
starttimeindex = fields_name.get('start_time')
starttime = float(res['datas'][index][starttimeindex])
if starttime:
start_time = tools.format_duration(starttime)
res['datas'][index][starttimeindex] = start_time
- if fields_name.get('end_time') and fields_name.get('end_time') >= 0:
+ if fields_name.get('end_time') is not None:
endtimeindex = fields_name.get('end_time')
endtime = float(res['datas'][index][endtimeindex])
if endtime:
end_time = tools.format_duration(endtime)
res['datas'][index][endtimeindex] = end_time
+ if fields_name.get('unit_amount') is not None:
+ durationindex = fields_name.get('unit_amount')
+ duration = res['datas'][index][durationindex] and float(res['datas'][index][durationindex])
+ if duration:
+ duration_time = tools.format_duration(duration)
+ res['datas'][index][durationindex] = duration_time
return res
@api.model
diff --git a/project_report/__manifest__.py b/project_report/__manifest__.py
index 549e4b3..8cae31e 100755
--- a/project_report/__manifest__.py
+++ b/project_report/__manifest__.py
@@ -20,6 +20,7 @@
'report/project_budget_hrs_analysis_views.xml',
'report/project_budget_amt_analysis_views.xml',
'report/project_timeline_report_views.xml',
+ 'report/project_timesheet_report_views.xml',
],
'qweb': [
"static/src/xml/base.xml",
diff --git a/project_report/report/__init__.py b/project_report/report/__init__.py
index 643d4d2..d635724 100755
--- a/project_report/report/__init__.py
+++ b/project_report/report/__init__.py
@@ -4,3 +4,4 @@
from . import project_budget_hrs_analysis
from . import project_budget_amt_analysis
from . import project_timeline_report
+from . import project_timesheet_report
diff --git a/project_report/report/project_budget_amt_analysis_views.xml b/project_report/report/project_budget_amt_analysis_views.xml
index 885ccf3..5ea81f6 100755
--- a/project_report/report/project_budget_amt_analysis_views.xml
+++ b/project_report/report/project_budget_amt_analysis_views.xml
@@ -59,6 +59,7 @@
+
@@ -78,7 +79,7 @@
project.budget.amt.report
graph,tree,pivot
- {'search_default_group_by_project': 1,'search_default_group_by_amount_type': 1, 'default_res_model': 'project.budget.amt.report'}
+ {'search_default_group_by_project': 1,'search_default_group_by_amount_type': 1, 'default_res_model': 'project.budget.amt.report', 'search_default_notfixed':1}
-->
-
+
@@ -58,6 +58,7 @@
+
@@ -78,7 +79,7 @@
project.budget.hrs.report
graph,tree,pivot
- {'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'}
+ {'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','search_default_notfixed':1}
+
@@ -77,7 +78,7 @@
project.timeline.report
graph,tree,pivot
- {'search_default_group_by_project': 1,'search_default_sdate': 1,'search_default_edate': 1,'search_default_group_by_timeline_type': 1, 'default_res_model':'project.timeline.report'}
+ {'search_default_group_by_project': 1, 'search_default_group_by_timeline_type': 1, 'search_default_notfixed':1, 'search_default_sdate': 1,'search_default_edate': 1, 'default_res_model':'project.timeline.report'}