8000 feat: hook `ignore_links_on_delete` to skip doctypes on delete by DaizyModi · Pull Request #19347 · frappe/frappe · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

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

Merged

Conversation

DaizyModi
Copy link
Contributor
@DaizyModi DaizyModi commented Dec 19, 2022

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.

  1. Added a new hook ignore_links_on_delete in hooks.py
  2. Updated hooks_template in boilerplate.py
  3. Replace 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

@DaizyModi DaizyModi requested review from a team and phot0n and removed request for a team December 19, 2022 08:31
@github-actions github-actions bot added the add-test-cases Add test case to validate fix or enhancement label Dec 19, 2022
@sagarvora sagarvora added squash and removed add-test-cases Add test case to validate fix or enhancement labels Dec 19, 2022
@codecov
Copy link
codecov bot commented Dec 19, 2022

Codecov Report

Merging #19347 (f91a929) into develop (a113207) will increase coverage by 0.05%.
The diff coverage is 66.66%.

❗ Current head f91a929 differs from pull request most recent head df3ad16. Consider uploading reports for the commit df3ad16 to get more accurate results

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              
Flag Coverage Δ
server 68.52% <100.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

@sagarvora
Copy link
Contributor

This is a very minor feature. Backporting to v14 will help me maintain my code consistently in India Compliance 😅

@sagarvora sagarvora added the backport version-14-hotfix backport to version 14 label Dec 19, 2022
@DaizyModi DaizyModi force-pushed the feat-ignore-links-on-delete-hook branch from 5832680 to ff37d2f Compare December 19, 2022 12:14
@ankush
Copy link
Member
ankush commented Dec 20, 2022

@sagarvora no problem in backporting but

Backporting to v14 will help me maintain my code consistently in India Compliance

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. :)

@ankush ankush merged commit d88ef96 into frappe:develop Dec 20, 2022
@ankush ankush deleted the feat-ignore-links-on-delete-hook branch December 20, 2022 05:47
mergify bot pushed a commit that referenced this pull request Dec 20, 2022
* 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)
@ankush ankush mentioned this pull request Dec 20, 2022
ankush pushed a commit that referenced this pull request Dec 20, 2022
… (#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>
frappe-pr-bot pushed a commit that referenced this pull request Dec 27, 2022
# [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))
developmentforpeople pushed a commit to developmentforpeople/frappe that referenced this pull request Jan 3, 2023
…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>
developmentforpeople pushed a commit to developmentforpeople/frappe that referenced this pull request Jan 3, 2023
# [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))
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0