AttributeError: 'DocTypeLink'

If i need make sales invoice showing error

AttributeError: ‘DocTypeLink’ object has no attribute ‘parent_doctype’

Report

I’m getting this same cryptic error after an upgrade to from 13.8.0 to 13.10.2. I get it when clicking on a user in the User list.

Upgrading mariadb to 10.5.12 resolved this issue for me.

After upgrading from frappe 13.5.2 to 13.11.0, the above error appears. Even if mariadb is upgraded to 10.5.12 and bench is upgraded from 5.4.1 to 5.6.0, the same error occurs.

It was solved by manually adding the columns [parent_doctype varchar(140)] and [is_child_table int] to the tabDocType Link.
However, whenever entering DocType, AttributeError: ‘DocTypeLink’ object has no attribute ‘parent_doctype’ errpr is displayed. You can still operate it. Programs that have not been entered can be executed normally.

When I click Submit on the Sales invoice, an error message stating [ImportError: cannot import name ‘remove_file’] appears and I can’t fix it. Please find a solution.