Fixes in time log batch

This commit is contained in:
Nabin Hait 2013-12-27 17:36:17 +05:30
parent e761fe89e2
commit a4f99428d7

View File

@ -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()
tl.update_after_submit()