The Wayback Machine - https://web.archive.org/web/20220518193929/https://github.com/frappe/frappe/issues/15519
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request]uninstall-app should also remove print format from app #15519

Open
lasalesi opened this issue Jan 30, 2018 · 2 comments
Open

[Feature request]uninstall-app should also remove print format from app #15519

lasalesi opened this issue Jan 30, 2018 · 2 comments

Comments

@lasalesi
Copy link
Contributor

@lasalesi lasalesi commented Jan 30, 2018

Actual behaviour:
In case a custom app has print formats, the command bench uninstall-app (app) will fail with frappe.exceptions.LinkExistsError: Cannot delete or cancel because Module Def <a href="#Form/Module Def/ham">ham</a> is linked with Print Format <a href="#Form/Print Format/cheese">cheese</a>

Expected behaviour:
bench uninstall-app should also remove print formats that are part of an app and successfully remove the app.

Steps to reproduce:

  1. Install an app which has a print format (e.g. one DocType and a print format for the same)
  2. Remove the app using bench uninstall-app and observe the error

Workaround:
The print formats can be manually removed and the app installed afterwards.

More details:
Refer to https://discuss.erpnext.com/t/uninstall-app-fails-when-app-contains-print-formats/33201/2

@rahulmr
Copy link

@rahulmr rahulmr commented Jun 30, 2020

what is the bypass from command line?

@lasalesi
Copy link
Contributor Author

@lasalesi lasalesi commented Jan 4, 2022

Unfortunately, the only way is to go into the database and remove the print formats manually:

$ bench mariadb
> delete from `tabPrint Format` where `module` = "<your app name>";

@ankush ankush transferred this issue from frappe/bench Jan 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants