timesheet patch update

This commit is contained in:
Rushabh Mehta 2013-03-04 16:29:48 +05:30
parent 3e712f212a
commit 986d48b424

View File

@ -12,7 +12,11 @@ def execute():
custom_field.doctype = "Custom Field"
custom_field.dt = "Time Log"
custom_field.insert_after = None
cf = webnotes.bean(custom_field).insert()
try:
cf = webnotes.bean(custom_field).insert()
except Exception, e:
# duplicate custom field
pass
for name in webnotes.conn.sql_list("""select name from tabTimesheet"""):
ts = webnotes.bean("Timesheet", name)