calc timesheet dates on validate not just submit
This commit is contained in:
parent
de932911b5
commit
0beb5bdea6
@ -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()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user