Fixes in time log batch
diff --git a/projects/doctype/time_log_batch/time_log_batch.py b/projects/doctype/time_log_batch/time_log_batch.py
index ccb0a25..593dc22 100644
--- a/projects/doctype/time_log_batch/time_log_batch.py
+++ b/projects/doctype/time_log_batch/time_log_batch.py
@@ -28,7 +28,7 @@
})
def validate_time_log_is_submitted(self, tl):
- if tl.status != "Submitted":
+ if tl.status != "Submitted" and self.doc.docstatus == 0:
webnotes.msgprint(_("Time Log must have status 'Submitted'") + \
" :" + tl.name + " (" + _(tl.status) + ")", raise_exception=True)
@@ -57,7 +57,4 @@
tl = webnotes.bean("Time Log", d.time_log)
tl.doc.time_log_batch = time_log_batch
tl.doc.sales_invoice = self.doc.sales_invoice
- tl.update_after_submit()
-
-
-
\ No newline at end of file
+ tl.update_after_submit()
\ No newline at end of file