Hi,
I am trying to migrate from v12 to v13 but i am getting error as frappe.exceptions.ValidatioExecuting erpnext.patches.v13_0.setup_fields_for_80g_certificate_and_donation in (_42ecbef9f7de5751)
Traceback (most recent call last):
File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/opt/bench/erpnext/apps/frappe/frappe/utils/bench_helper.py", line 104, in <module>
main()
File "/opt/bench/erpnext/apps/frappe/frappe/utils/bench_helper.py", line 18, in main
click.Group(commands=commands)(prog_name='bench')
File "/opt/bench/erpnext/env/lib/python3.8/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/opt/bench/erpnext/env/lib/python3.8/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/opt/bench/erpnext/env/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/opt/bench/erpnext/env/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/opt/bench/erpnext/env/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/opt/bench/erpnext/env/lib/python3.8/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/opt/bench/erpnext/env/lib/python3.8/site-packages/click/decorators.py", line 21, in new_func
return f(get_current_context(), *args, **kwargs)
File "/opt/bench/erpnext/apps/frappe/frappe/commands/__init__.py", line 26, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
File "/opt/bench/erpnext/apps/frappe/frappe/commands/site.py", line 457, in migrate
migrate(
File "/opt/bench/erpnext/apps/frappe/frappe/migrate.py", line 68, in migrate
frappe.modules.patch_handler.run_all(skip_failing)
File "/opt/bench/erpnext/apps/frappe/frappe/modules/patch_handler.py", line 36, in run_all
run_patch(patch)
File "/opt/bench/erpnext/apps/frappe/frappe/modules/patch_handler.py", line 25, in run_patch
if not run_single(patchmodule = patch):
File "/opt/bench/erpnext/apps/frappe/frappe/modules/patch_handler.py", line 66, in run_single
return execute_patch(patchmodule, method, methodargs)
File "/opt/bench/erpnext/apps/frappe/frappe/modules/patch_handler.py", line 86, in execute_patch
frappe.get_attr(patchmodule.split()[0] + ".execute")()
File "/opt/bench/erpnext/apps/erpnext/erpnext/patches/v13_0/setup_fields_for_80g_certificate_and_donation.py", line 8, in execute
make_custom_fields()
File "/opt/bench/erpnext/apps/erpnext/erpnext/regional/india/setup.py", line 135, in make_custom_fields
create_custom_fields(custom_fields, update=update)
File "/opt/bench/erpnext/apps/frappe/frappe/custom/doctype/custom_field/custom_field.py", line 170, in create_custom_fields
custom_field.save()
File "/opt/bench/erpnext/apps/frappe/frappe/model/document.py", line 284, in save
return self._save(*args, **kwargs)
File "/opt/bench/erpnext/apps/frappe/frappe/model/document.py", line 338, in _save
self.run_post_save_methods()
File "/opt/bench/erpnext/apps/frappe/frappe/model/document.py", line 1010, in run_post_save_methods
self.run_method("on_update")
File "/opt/bench/erpnext/apps/frappe/frappe/model/document.py", line 874, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File "/opt/bench/erpnext/apps/frappe/frappe/model/document.py", line 1171, in composer
return composed(self, method, *args, **kwargs)
File "/opt/bench/erpnext/apps/frappe/frappe/model/document.py", line 1154, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File "/opt/bench/erpnext/apps/frappe/frappe/model/document.py", line 868, in <lambda>
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File "/opt/bench/erpnext/apps/frappe/frappe/custom/doctype/custom_field/custom_field.py", line 76, in on_update
validate_fields_for_doctype(self.dt)
File "/opt/bench/erpnext/apps/frappe/frappe/core/doctype/doctype/doctype.py", line 784, in validate_fields_for_doctype
validate_fields(meta)
File "/opt/bench/erpnext/apps/frappe/frappe/core/doctype/doctype/doctype.py", line 1113, in validate_fields
validate_data_field_type(d)
File "/opt/bench/erpnext/apps/frappe/frappe/core/doctype/doctype/doctype.py", line 1059, in validate_data_field_type
frappe.msgprint(text_str + df_options_str, title="Invalid Data Field", raise_exception=True)
File "/opt/bench/erpnext/apps/frappe/frappe/__init__.py", line 425, in msgprint
_raise_exception()
File "/opt/bench/erpnext/apps/frappe/frappe/__init__.py", line 381, in _raise_exception
raise ValidationError(msg)
frappe.exceptions.ValidationError: <strong>Employee Number</strong> is an invalid Data field.<br><br>Only Options allowed for Data field are:<br><ul><li>Email</li><li>Name</li><li>Phone</li><li>URL</li><li>Barcode</ul>
nError: <strong>Employee Number</strong> is an invalid Data field.
Tried
- bench update --build
Getting database or site-config.json corrupted error - Removed Employee number as not mandatory from v12 instance and restored DB in v13 - still error is the same
Please help on how to resolve this issue ?
During bench migrate, i am getting error as