Merge pull request #7107 from RobertSchouten/timesheetdates
calc timesheet dates on validate not just submit
This commit is contained in:
commit
12a396ef25
@ -28,6 +28,7 @@ class Timesheet(Document):
|
|||||||
self.update_cost()
|
self.update_cost()
|
||||||
self.calculate_total_amounts()
|
self.calculate_total_amounts()
|
||||||
self.calculate_percentage_billed()
|
self.calculate_percentage_billed()
|
||||||
|
self.set_dates()
|
||||||
|
|
||||||
def set_employee_name(self):
|
def set_employee_name(self):
|
||||||
if self.employee and not self.employee_name:
|
if self.employee and not self.employee_name:
|
||||||
@ -86,9 +87,6 @@ class Timesheet(Document):
|
|||||||
self.start_date = getdate(start_date)
|
self.start_date = getdate(start_date)
|
||||||
self.end_date = getdate(end_date)
|
self.end_date = getdate(end_date)
|
||||||
|
|
||||||
def before_submit(self):
|
|
||||||
self.set_dates()
|
|
||||||
|
|
||||||
def before_cancel(self):
|
def before_cancel(self):
|
||||||
self.set_status()
|
self.set_status()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user