Merge pull request #7107 from RobertSchouten/timesheetdates

calc timesheet dates on validate not just submit
This commit is contained in:
Nabin Hait 2016-12-05 14:23:21 +05:30 committed by GitHub
commit 12a396ef25

View File

@ -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()