From 0327b35b5e25dd60217a9265ddbb94f6a4b98157 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Wed, 7 Dec 2016 18:32:36 +0530 Subject: [PATCH] [fix] timesheet datetime issue --- erpnext/projects/doctype/timesheet/timesheet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/projects/doctype/timesheet/timesheet.py b/erpnext/projects/doctype/timesheet/timesheet.py index 548332091e..f853692c57 100644 --- a/erpnext/projects/doctype/timesheet/timesheet.py +++ b/erpnext/projects/doctype/timesheet/timesheet.py @@ -79,7 +79,7 @@ class Timesheet(Document): self.status = "Completed" def set_dates(self): - if self.docstatus < 2: + if self.docstatus < 2 and self.time_logs: start_date = min([d.from_time for d in self.time_logs]) end_date = max([d.to_time for d in self.time_logs])