V12 bench update error

Updating DocTypes for frappe : [========================================]
Updating DocTypes for erpnext : [========================================]
Updating DocTypes for sanath_so : [========================================]
Traceback (most recent call last):
File “/usr/lib/python3.5/runpy.py”, line 193, in _run_module_as_main
main”, mod_spec)
File “/usr/lib/python3.5/runpy.py”, line 85, in _run_code
exec(code, run_globals)
File “/home/sanath/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 97, in
main()
File “/home/sanath/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 18, in main
click.Group(commands=commands)(prog_name=‘bench’)
File “/home/sanath/frappe-bench/env/lib/python3.5/site-packages/click/core.py”, line 764, in call
return self.main(*args, **kwargs)
File “/home/sanath/frappe-bench/env/lib/python3.5/site-packages/click/core.py”, line 717, in main
rv = self.invoke(ctx)
File “/home/sanath/frappe-bench/env/lib/python3.5/site-packages/click/core.py”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/sanath/frappe-bench/env/lib/python3.5/site-packages/click/core.py”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/sanath/frappe-bench/env/lib/python3.5/site-packages/click/core.py”, line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/sanath/frappe-bench/env/lib/python3.5/site-packages/click/core.py”, line 555, in invoke
return callback(*args, **kwargs)
File “/home/sanath/frappe-bench/env/lib/python3.5/site-packages/click/decorators.py”, line 17, in new _func
return f(get_current_context(), *args, **kwargs)
File “/home/sanath/frappe-bench/apps/frappe/frappe/commands/init.py”, line 25, in _func
ret = f(frappe.dict(ctx.obj), *args, **kwargs)
File “/home/sanath/frappe-bench/apps/frappe/frappe/commands/site.py”, line 239, in migrate
migrate(context.verbose, rebuild_website=rebuild_website, skip_failing=skip_failing)
File “/home/sanath/frappe-bench/apps/frappe/frappe/migrate.py”, line 52, in migrate
sync_fixtures()
File “/home/sanath/frappe-bench/apps/frappe/frappe/utils/fixtures.py”, line 24, in sync_fixtures
ignore_links=True, overwrite=True)
File “/home/sanath/frappe-bench/apps/frappe/frappe/core/doctype/data_import/data_import.py”, line 60, in import_doc
frappe.modules.import_file.import_file_by_path(f, data_import=True, force=True, pre_process=pre_pro cess, reset_permissions=True)
File “/home/sanath/frappe-bench/apps/frappe/frappe/modules/import_file.py”, line 66, in import_file_b y_path
ignore_version=ignore_version, reset_permissions=reset_permissions)
File “/home/sanath/frappe-bench/apps/frappe/frappe/modules/import_file.py”, line 141, in import_doc
doc.insert()
File “/home/sanath/frappe-bench/apps/frappe/frappe/model/document.py”, line 260, in insert
self.run_post_save_methods()
File “/home/sanath/frappe-bench/apps/frappe/frappe/model/document.py”, line 924, in run_post_save_met hods
self.run_method(“on_update”)
File “/home/sanath/frappe-bench/apps/frappe/frappe/model/document.py”, line 794, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “/home/sanath/frappe-bench/apps/frappe/frappe/model/document.py”, line 1064, in composer
return composed(self, method, *args, **kwargs)
File “/home/sanath/frappe-bench/apps/frappe/frappe/model/document.py”, line 1047, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/home/sanath/frappe-bench/apps/frappe/frappe/model/document.py”, line 788, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/home/sanath/frappe-bench/apps/frappe/frappe/custom/doctype/custom_field/custom_field.py”, line 61, in on_update
validate_fields_for_doctype(self.dt)
File “/home/sanath/frappe-bench/apps/frappe/frappe/core/doctype/doctype/doctype.py”, line 670, in val idate_fields_for_doctype
validate_fields(frappe.get_meta(doctype, cached=False))
File “/home/sanath/frappe-bench/apps/frappe/frappe/core/doctype/doctype/doctype.py”, line 967, in val idate_fields
check_hidden_and_mandatory(meta.get(“name”), d)
File “/home/sanath/frappe-bench/apps/frappe/frappe/core/doctype/doctype/doctype.py”, line 740, in che ck_hidden_and_mandatory
frappe.throw(
(“{0}: Field {1} in row {2} cannot be hidden and mandatory without default”).format(d ocname, d.label, d.idx), HiddenAndMandatoryWithoutDefaultError)
File “/home/sanath/frappe-bench/apps/frappe/frappe/init.py”, line 377, in throw
msgprint(msg, raise_exception=exc, title=title, indicator=‘red’, is_minimizable=is_minimizable)
File “/home/sanath/frappe-bench/apps/frappe/frappe/init.py”, line 356, in msgprint
_raise_exception()
File “/home/sanath/frappe-bench/apps/frappe/frappe/init.py”, line 316, in _raise_exception
raise raise_exception(msg)
frappe.core.doctype.doctype.doctype.HiddenAndMandatoryWithoutDefaultError: Sales Invoice: Field Cost Ce nter in row 44 cannot be hidden and mandatory without default

You seem to have a custom field issue.

1 Like