From 0beb5bdea643e940f21b6055badf5fc3de2a2003 Mon Sep 17 00:00:00 2001 From: robert schouten Date: Thu, 1 Dec 2016 08:51:03 +0800 Subject: [PATCH] calc timesheet dates on validate not just submit --- erpnext/projects/doctype/timesheet/timesheet.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/erpnext/projects/doctype/timesheet/timesheet.py b/erpnext/projects/doctype/timesheet/timesheet.py index 02e5f18f84..548332091e 100644 --- a/erpnext/projects/doctype/timesheet/timesheet.py +++ b/erpnext/projects/doctype/timesheet/timesheet.py @@ -28,6 +28,7 @@ class Timesheet(Document): self.update_cost() self.calculate_total_amounts() self.calculate_percentage_billed() + self.set_dates() def set_employee_name(self): if self.employee and not self.employee_name: @@ -86,9 +87,6 @@ class Timesheet(Document): self.start_date = getdate(start_date) self.end_date = getdate(end_date) - def before_submit(self): - self.set_dates() - def before_cancel(self): self.set_status()