500 (INTERNAL SERVER ERROR) while adding field to doctype (version 4)

Hi guys,
I need help for adding field to Doctype attendance.
This is what i have done:

I tried to add two fields in hr>attendance doctype.
The fields are of type time
When i save it the error in my console is 500 (INTERNAL SERVER ERROR)
But these seems to be added to the on the form but the changes are not reflected on the database.
and i found following error in terminal window.

File "/home/prashant/frappe-bench/frappe-bench/apps/frappe/frappe/middlewares.py", line 15, in call
return super(StaticDataMiddleware, self).call(environ, start_response)
File "/home/prashant/frappe-bench/frappe-bench/env/lib/python2.7/site-packages/werkzeug/wsgi.py", line 579, in call
return self.app(environ, start_response)
File "/home/prashant/frappe-bench/frappe-bench/env/lib/python2.7/site-packages/werkzeug/wsgi.py", line 579, in call
return self.app(environ, start_response)
File "/home/prashant/frappe-bench/frappe-bench/env/lib/python2.7/site-packages/werkzeug/local.py", line 224, in application
return ClosingIterator(app(environ, start_response), self.cleanup)
File "/home/prashant/frappe-bench/frappe-bench/env/lib/python2.7/site-packages/werkzeug/wrappers.py", line 285, in application
return f(*args[:-2] + (request,))(*args[-2:])
File "/home/prashant/frappe-bench/frappe-bench/apps/frappe/frappe/app.py", line 42, in application
response = frappe.handler.handle()
File "/home/prashant/frappe-bench/frappe-bench/apps/frappe/frappe/handler.py", line 67, in handle
execute_cmd(cmd)
File "/home/prashant/frappe-bench/frappe-bench/apps/frappe/frappe/handler.py", line 84, in execute_cmd
ret = frappe.call(method, **frappe.form_dict)
File "/home/prashant/frappe-bench/frappe-bench/apps/frappe/frappe/init.py", line 496, in call
return fn(*args, **newargs)
File "/home/prashant/frappe-bench/frappe-bench/apps/frappe/frappe/widgets/form/save.py", line 18, in savedocs
getattr(wrapper, action.lower())()
File "/home/prashant/frappe-bench/frappe-bench/apps/frappe/frappe/model/bean.py", line 321, in save
self.run_method('on_update')
File "/home/prashant/frappe-bench/frappe-bench/apps/frappe/frappe/model/bean.py", line 238, in run_method
frappe.call(getattr(self.controller, method), *args, **kwargs))
File "/home/prashant/frappe-bench/frappe-bench/apps/frappe/frappe/init.py", line 496, in call
return fn(*args, **newargs)
File "/home/prashant/frappe-bench/frappe-bench/apps/frappe/frappe/core/doctype/doctype/doctype.py", line 76, in on_update
updatedb(self.doc.name)
File "/home/prashant/frappe-bench/frappe-bench/apps/frappe/frappe/model/db_schema.py", line 403, in updatedb
tab.sync()
File "/home/prashant/frappe-bench/frappe-bench/apps/frappe/frappe/model/db_schema.py", line 173, in sync
self.alter()
File "/home/prashant/frappe-bench/frappe-bench/apps/frappe/frappe/model/db_schema.py", line 181, in alter
frappe.db.sql("alter table %s add column %s %s" % (self.name, col.fieldname, col.get_definition()))
File "/home/prashant/frappe-bench/frappe-bench/apps/frappe/frappe/database.py", line 114, in sql
self._cursor.execute(query)
File "/home/prashant/frappe-bench/frappe-bench/env/lib/python2.7/site-packages/MySQLdb/cursors.py", line 205, in execute
self.errorhandler(self, exc, value)
File "/home/prashant/frappe-bench/frappe-bench/env/lib/python2.7/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
raise errorclass, errorvalue
OperationalError: (1067, "Invalid default value for 'out_time'")

please help me to move on.

Thanks and Regards,
Anand Pawar.



Note:

 

If you are posting an issue,

  1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/fa46c66c-d22a-461e-8c22-ec70ac9a27b2%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.