Hello everyone,
I’m getting the error below when submiting a production order with operations, somehow my “planned end date” is not being filled correctly. I’ve already tried to “reset do defaults” but nothing happened.
Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/desk/form/save.py”, line 19, in savedocs
doc.submit()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 683, in submit
self._submit()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 672, in _submit
self.save()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 242, in save
return self._save(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 269, in _save
self.run_before_save_methods()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 714, in run_before_save_methods
self.run_method(“before_submit”)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 661, in run_method
return Document.hook(fn)(self, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 839, in composer
return composed(self, method, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 822, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 655, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/manufacturing/doctype/production_order/production_order.py”, line 168, in before_submit
self.make_time_logs()
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/manufacturing/doctype/production_order/production_order.py”, line 271, in make_time_logs
timesheet.validate_time_logs()
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/projects/doctype/timesheet/timesheet.py”, line 155, in validate_time_logs
self.check_workstation_timings(data)
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/projects/doctype/timesheet/timesheet.py”, line 198, in check_workstation_timings
check_if_within_operating_hours(args.workstation, args.operation, args.from_time, args.to_time)
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/manufacturing/doctype/workstation/workstation.py”, line 56, in check_if_within_operating_hours
is_within_operating_hours(workstation, operation, from_datetime, to_datetime)
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/manufacturing/doctype/workstation/workstation.py”, line 63, in is_within_operating_hours
slot_length = (to_timedelta(working_hour.end_time or “”) - to_timedelta(working_hour.start_time or “”)).total_seconds()
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/data.py”, line 62, in to_timedelta
t = parser.parse(time_str)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/dateutil/parser.py”, line 1164, in parse
return DEFAULTPARSER.parse(timestr, **kwargs)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/dateutil/parser.py”, line 558, in parse
raise ValueError(“String does not contain a date.”)
ValueError: String does not contain a date.
Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/app.py”, line 55, in application
response = frappe.handler.handle()
File “/home/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 19, in handle
execute_cmd(cmd)
File “/home/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 36, in execute_cmd
ret = frappe.call(method, **frappe.form_dict)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 882, in call
return fn(*args, **newargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/desk/form/save.py”, line 19, in savedocs
doc.submit()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 683, in submit
self._submit()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 672, in _submit
self.save()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 242, in save
return self._save(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 269, in _save
self.run_before_save_methods()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 714, in run_before_save_methods
self.run_method(“before_submit”)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 661, in run_method
return Document.hook(fn)(self, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 839, in composer
return composed(self, method, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 822, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 655, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/manufacturing/doctype/production_order/production_order.py”, line 168, in before_submit
self.make_time_logs()
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/manufacturing/doctype/production_order/production_order.py”, line 271, in make_time_logs
timesheet.validate_time_logs()
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/projects/doctype/timesheet/timesheet.py”, line 155, in validate_time_logs
self.check_workstation_timings(data)
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/projects/doctype/timesheet/timesheet.py”, line 198, in check_workstation_timings
check_if_within_operating_hours(args.workstation, args.operation, args.from_time, args.to_time)
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/manufacturing/doctype/workstation/workstation.py”, line 56, in check_if_within_operating_hours
is_within_operating_hours(workstation, operation, from_datetime, to_datetime)
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/manufacturing/doctype/workstation/workstation.py”, line 63, in is_within_operating_hours
slot_length = (to_timedelta(working_hour.end_time or “”) - to_timedelta(working_hour.start_time or “”)).total_seconds()
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/data.py”, line 62, in to_timedelta
t = parser.parse(time_str)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/dateutil/parser.py”, line 1164, in parse
return DEFAULTPARSER.parse(timestr, **kwargs)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/dateutil/parser.py”, line 558, in parse
raise ValueError(“String does not contain a date.”)
ValueError: String does not contain a date.
any ideas?