From a4f99428d78cc22b616a980f57003d751c816e68 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 27 Dec 2013 17:36:17 +0530 Subject: [PATCH] Fixes in time log batch --- projects/doctype/time_log_batch/time_log_batch.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/projects/doctype/time_log_batch/time_log_batch.py b/projects/doctype/time_log_batch/time_log_batch.py index ccb0a25624..593dc222f1 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 @@ class DocType: }) 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 @@ class DocType: 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