DocType Supplier Type not found

Hello dears

after upgrading to v11 i faced this error message while trying to update permissions for stock_user

DocType Supplier Type not found
The resource you are looking for is not available

and i`v rerun this patch again

erpnext.patches.v11_0.rename_supplier_type_to_supplier_group

without luck

so please help !

bench reload-doctype “Supplier Type”

Traceback (most recent call last):
File “/usr/lib/python2.7/runpy.py”, line 162, in _run_module_as_main
main”, fname, loader, pkg_name)
File “/usr/lib/python2.7/runpy.py”, line 72, in _run_code
exec code in run_globals
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 97, in
main()
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 18, in main
click.Group(commands=commands)(prog_name=‘bench’)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 764, in call
return self.main(*args, **kwargs)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 717, in main
rv = self.invoke(ctx)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 555, in invoke
return callback(*args, **kwargs)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/decorators.py”, line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/commands/init.py”, line 25, in func
ret = f(frappe.dict(ctx.obj), *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/commands/site.py”, line 272, in reload_doctype
frappe.reload_doctype(doctype, force=context.force)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 778, in reload_doctype
reload_doc(scrub(db.get_value(“DocType”, doctype, “module”)), “doctype”, scrub(doctype),
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 804, in scrub
return txt.replace(’ ‘,’
‘).replace(’-', '
').lower()
AttributeError: ‘NoneType’ object has no attribute ‘replace’

Have you done/tried a (tune axact syntax to match your sitename etc)

bench --site site1.local migrate

and then optionally…

bench clear-cache
bench clear-website-cache

1 Like

Hi,
Actually “Supplier Type” doctype name changed in v11.

and there is a missing part in this patch for custom roles. it’s not updating custom permissions table.

delete from tabCustom DocPerm where parent=‘Supplier Type’;

instead of delete, you can update this field as well.

try above query directly into your DB for quick solution.

4 Likes

Thanks for you efforts