-
Notifications
You must be signed in to change notification settings - Fork 3.9k
feat: hook ignore_links_on_delete
to skip doctypes on delete
#19347
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
feat: hook ignore_links_on_delete
to skip doctypes on delete
#19347
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## develop #19347 +/- ##
===========================================
+ Coverage 64.88% 64.94% +0.05%
===========================================
Files 754 754
Lines 71304 71418 +114
Branches 6117 6117
===========================================
+ Hits 46267 46381 +114
Misses 21530 21530
Partials 3507 3507
Flags with carried forward coverage won't be shown. Click here to find out more. |
This is a very minor feature. Backporting to v14 will help me maintain my code consistently in India Compliance 😅 |
5832680
to
ff37d2f
Compare
@sagarvora no problem in backporting but
This will cause IC to depend on 14.x of framework, maybe wait a while before depending on it as people do partial updates too. :) |
* feat: hook `ignore_links_on_delete` to skip doctypes on delete * fix: helper comment * fix: helper comment * test: test case for `ignore_links_on_delete` * test: fix test case (cherry picked from commit d88ef96)
# [14.21.0](v14.20.0...v14.21.0) (2022-12-27) ### Bug Fixes * Allow emailing disabled user ([#19382](#19382)) ([#19383](#19383)) ([fb7f645](fb7f645)) * **error snapshot:** fix seen update qeury in error snapshot to work with postgres ([#19373](#19373)) ([#19374](#19374)) ([0ab6a30](0ab6a30)) * **minor:** dont set autoincrement autoname by default for child table ([8ff3f4c](8ff3f4c)) * not able to make delivery note from pick list ([#19418](#19418)) ([#19420](#19420)) ([d2d776c](d2d776c)) * shift-select checkboxes ranges ([#19367](#19367)) ([#19368](#19368)) ([bd79b03](bd79b03)) * **subscription:** Allow remote_login even if subscription.expiry is not set ([1d777dc](1d777dc)) ### Features * hook `ignore_links_on_delete` to skip doctypes on delete ([#19347](#19347)) ([#19356](#19356)) ([a457447](a457447))
…e#19347) (frappe#19356) * feat: hook `ignore_links_on_delete` to skip doctypes on delete * fix: helper comment * fix: helper comment * test: test case for `ignore_links_on_delete` * test: fix test case (cherry picked from commit d88ef96) Co-authored-by: Daizy Modi <modidaizy5217@gmail.com>
# [14.21.0](frappe/frappe@v14.20.0...v14.21.0) (2022-12-27) ### Bug Fixes * Allow emailing disabled user ([frappe#19382](frappe#19382)) ([frappe#19383](frappe#19383)) ([fb7f645](frappe@fb7f645)) * **error snapshot:** fix seen update qeury in error snapshot to work with postgres ([frappe#19373](frappe#19373)) ([frappe#19374](frappe#19374)) ([0ab6a30](frappe@0ab6a30)) * **minor:** dont set autoincrement autoname by default for child table ([8ff3f4c](frappe@8ff3f4c)) * not able to make delivery note from pick list ([frappe#19418](frappe#19418)) ([frappe#19420](frappe#19420)) ([d2d776c](frappe@d2d776c)) * shift-select checkboxes ranges ([frappe#19367](frappe#19367)) ([frappe#19368](frappe#19368)) ([bd79b03](frappe@bd79b03)) * **subscription:** Allow remote_login even if subscription.expiry is not set ([1d777dc](frappe@1d777dc)) ### Features * hook `ignore_links_on_delete` to skip doctypes on delete ([frappe#19347](frappe#19347)) ([frappe#19356](frappe#19356)) ([a457447](frappe@a457447))
This feature is primarily intended to be used by apps like India Compliance and e-Commerce Integrations to ignore links to log doctypes like e-Waybill log, e-Invoice log, e-Commerce integration log etc. on delete.
ignore_links_on_delete
inhooks.py
hooks_template
inboilerplate.py
doctypes_to_skip
with a new hook so that the user can ignore any doctypes by specifying it in the hook (for a custom app).Docs: https://frappeframework.com/docs/v14/user/en/python-api/hooks/edit-wiki?wiki_page_patch=1b43df460e