-
Notifications
You must be signed in to change notification settings - Fork 106
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
[10.0] shopinvader.partner: switch to ondelete=restrict #563
[10.0] shopinvader.partner: switch to ondelete=restrict #563
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
makes sense, but at the same time I'm thinking if we shouldn't handle this on the application side w/ a constraint + ctx flag to bypass. What if we really want to delete the binding? Eg: removing the user from the shop but keep the partner?
Codecov Report
@@ Coverage Diff @@
## 10.0 #563 +/- ##
==========================================
+ Coverage 88.36% 89.61% +1.24%
==========================================
Files 125 142 +17
Lines 3162 3735 +573
==========================================
+ Hits 2794 3347 +553
- Misses 368 388 +20
Continue to review full report at Codecov.
|
Normal partner will remain as no unlink() has been implemented in shopinvader.partner to do so on res.partner (e.g.: same behaviour for product.product). |
This PR has the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/ocabot merge minor
/ocabot merge minor |
This PR looks fantastic, let's merge it! |
It looks like something changed on |
It looks like something changed on |
Congratulations, your PR was merged at 93819ce. Thanks a lot for contributing to shopinvader. ❤️ |
I propose to switch the link between res.partner and shopinvader.partner to ondelete='restrict' instead of 'cascade', to avoid the situation where someone deletes a partner that has an account on shopinvader without being conscious of it.