added code to update timestamps in Task, Customer Issue and Support Ticket

This commit is contained in:
Rushabh Mehta
2013-01-14 15:48:00 +05:30
parent 0c42dc4c22
commit be9ef4ac89
13 changed files with 152 additions and 101 deletions

View File

@@ -100,7 +100,7 @@ class DocType:
def validate_posting_time(self):
""" Validate posting time format"""
if self.doc.posting_time and len(self.doc.posting_time.split(':')) > 2:
if self.doc.posting_time and len(self.doc.posting_time.split(':')) > 3:
msgprint("Wrong format of posting time, can not complete the transaction. If you think \
you entered posting time correctly, please contact ERPNext support team.")
raise Exception
@@ -108,6 +108,4 @@ class DocType:
def scrub_posting_time(self):
if not self.doc.posting_time or self.doc.posting_time == '00:0':
self.doc.posting_time = '00:00'
if len(self.doc.posting_time.split(':')) > 2:
self.doc.posting_time = '00:00'