Error customizing form - Production Order

Hi,

I’m trying to customise Production Order form:

So, I’ve inputed all the fields. Had some errors, and, after delete and recreate adjusted_ph, I’m getting this error:

Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/app.py”, line 62, in application
response = frappe.handler.handle()
File “/home/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 22, in handle
data = execute_cmd(cmd)
File “/home/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 53, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 939, in call
return fn(*args, **newargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 81, in runserverobj
frappe.desk.form.run_method.runserverobj(method, docs=docs, dt=dt, dn=dn, arg=arg, args=args)
File “/home/frappe/frappe-bench/apps/frappe/frappe/desk/form/run_method.py”, line 36, in runserverobj
r = doc.run_method(method)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 758, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 1027, in composer
return composed(self, method, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 1010, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 752, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/custom/doctype/customize_form/customize_form.py”, line 150, in save_customization
updatedb(self.doc_type)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/db_schema.py”, line 77, in updatedb
tab.sync()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/db_schema.py”, line 159, in sync
self.alter()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/db_schema.py”, line 359, in alter
raise e
DataError: (1265, u"Data truncated for column ‘adjusted_ph’ at row 1")

Anybody can help me?

Thanks!

This tells there are Production Orders where adjusted_ph has some value that was truncated i.e. set to zero. What was this field’s type before you changed it to Float ? Was it string ?

I believe I did some changes in the type of this field, and, some values should be in the x, x format, but are in xx format.

I will try to change all of them before submit this custom field.

Thanks!