Cannot delete or cancel because Report Tax Detail is linked with Workspace Accounting

Need help solving this error when using the bench migrate command

Cannot delete or cancel because Report Tax Detail is linked with Workspace Accounting at Row: 46’, ‘title’: ‘Message’, ‘indicator’: ‘red’, ‘raise_exception’: 1, ‘__frappe_exc_id’: ‘8371cb3f0c15b7d7f79de98c6d707099b4cfca6e0a04a76d1923ecb1’}
raise_exception = <class ‘frappe.exceptions.LinkExistsError’>
…skipped… 1 vars
frappe.exceptions.LinkExistsError: Cannot delete or cancel because Report Tax Detail is linked with Workspace Accounting at Row: 46

App Versions

{
	"erpnext": "15.0.0",
	"frappe": "15.0.1",
	"hrms": "15.0.0-dev",
	"payments": "0.0.1"
}

Route

query-report/Tax Detail

Traceback

Traceback (most recent call last):
  File "apps/frappe/frappe/app.py", line 110, in application
    response = frappe.api.handle(request)
  File "apps/frappe/frappe/api/__init__.py", line 49, in handle
    data = endpoint(**arguments)
  File "apps/frappe/frappe/api/v1.py", line 36, in handle_rpc_call
    return frappe.handler.handle()
  File "apps/frappe/frappe/handler.py", line 49, in handle
    data = execute_cmd(cmd)
  File "apps/frappe/frappe/handler.py", line 85, in execute_cmd
    return frappe.call(method, **frappe.form_dict)
  File "apps/frappe/frappe/__init__.py", line 1682, in call
    return fn(*args, **newargs)
  File "apps/frappe/frappe/utils/typing_validations.py", line 31, in wrapper
    return func(*args, **kwargs)
  File "apps/frappe/frappe/__init__.py", line 847, in wrapper_fn
    retval = fn(*args, **get_newargs(fn, kwargs))
  File "apps/frappe/frappe/desk/query_report.py", line 221, in run
    result = generate_report_result(report, filters, user, custom_columns, is_tree, parent_field)
  File "apps/frappe/frappe/__init__.py", line 847, in wrapper_fn
    retval = fn(*args, **get_newargs(fn, kwargs))
  File "apps/frappe/frappe/desk/query_report.py", line 81, in generate_report_result
    res = get_report_result(report, filters) or []
  File "apps/frappe/frappe/desk/query_report.py", line 62, in get_report_result
    res = report.execute_script_report(filters)
  File "apps/frappe/frappe/core/doctype/report/report.py", line 164, in execute_script_report
    res = self.execute_module(filters)
  File "apps/frappe/frappe/core/doctype/report/report.py", line 181, in execute_module
    return frappe.get_attr(method_name)(frappe._dict(filters))
  File "apps/frappe/frappe/__init__.py", line 1672, in get_attr
    return getattr(get_module(modulename), methodname)
  File "apps/frappe/frappe/__init__.py", line 1408, in get_module
    return importlib.import_module(modulename)
  File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 992, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1004, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'erpnext.accounts.report.tax_detail'

Request Data

{
	"type": "GET",
	"args": {
		"report_name": "Tax Detail",
		"filters": "{}",
		"ignore_prepared_report": false,
		"are_default_filters": true
	},
	"headers": {},
	"error_handlers": {},
	"url": "/api/method/frappe.desk.query_report.run",
	"request_id": null
}

Response Data

{
	"exception": "ModuleNotFoundError: No module named 'erpnext.accounts.report.tax_detail'",
	"exc_type": "ModuleNotFoundError"
}

Cannot open Tax Detail Report because I don’t have the module apparently. Could these two problems be linked to one another?

I am also Facing this issue during Taking Database from v 14 to deploy in v 15

A workaround could be … just remove the report from your account workspace … and then try again

but … how about the real fixing? Are the topics (errors) from here also handled by the developers?

Could you please try deleting the tax detail in the accounting workspace and then execute “bench migrate”?

I have resolved this issue by deleting the tax detail from the tabworkspace link table in the database and then executing “bench migrate”.

I have not been able to find that and not sure that I’m looking at the right place. I went through my folders and can’t find a report called tax detail in the accounts folder for ERPnext

I cannot find tax detail in my database table. I’m viewing the contents of “tabWorkspace Link” table and cannot find anything that says Tax Detail Report? I did find this under “tabReport”

| Tax Detail | 2021-02-19 16:44:21.175113 | 2021-02-19 16:44:21.175113 | Administrator | Administrator | 0 | 0 | Tax Detail | GL Entry | NULL | Yes | Accounts | Script Report | NULL | 0 | 0 | 0 | 0 | NULL

I tried doing that and to no avail. After saving the changes it throws this message

Just click left side at the “accountant” entry
take a look there, you will find that report
after that edit your workspace (button above, right side)
got to the list, where the report is listed, edit this part and just delete the row/entry.
after that safe your workspace, done

select * from tabworkspace link where idx=97