-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
[19.0][MIG] attachment_delete_restrict: Migration to 19.0 #3398
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
Open
AungKoKoLin1997
wants to merge
26
commits into
OCA:19.0
Choose a base branch
from
qrtl:19.0-mig-attachment_delete_restrict
base: 19.0
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
[19.0][MIG] attachment_delete_restrict: Migration to 19.0 #3398
AungKoKoLin1997
wants to merge
26
commits into
OCA:19.0
from
qrtl:19.0-mig-attachment_delete_restrict
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Currently translated at 100.0% (37 of 37 strings) Translation: server-tools-14.0/server-tools-14.0-attachment_delete_restrict Translate-URL: https://translation.odoo-community.org/projects/server-tools-14-0/server-tools-14-0-attachment_delete_restrict/es_AR/
- Remove the display of duplicate allowed user names. - Correct the many2many field relation - Correct domain values and add the many2many_tags widget in views.
- Add _onchange_restrict_delete_attachment() to clear groups and users when restrict_delete_attachment is not set to custom or owner_custom.
Currently translated at 100.0% (38 of 38 strings) Translation: server-tools-16.0/server-tools-16.0-attachment_delete_restrict Translate-URL: https://translation.odoo-community.org/projects/server-tools-16-0/server-tools-16-0-attachment_delete_restrict/it/
cf04b42 to
c97ea27
Compare
- Remove the self.env.su condition in unlink, since it is always called with sudo() in Odoo 19. https://github.com/odoo/odoo/blob/98bae80f57733162c67593539ef47dfd0c6d8797/addons/mail/controllers/attachment.py#L98
c97ea27 to
bf333bc
Compare
yostashiro
reviewed
Oct 26, 2025
| return self._raise_delete_attachment_error(allowed_users) | ||
|
|
||
| def unlink(self): | ||
| if self.env.uid == SUPERUSER_ID: |
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.
I thought there was a possibility that this change might cause inconveniences in some operational scenarios.
@sebastienbeau Do you have any concerns on this? If you do, we might revert this change and additionally insert a check at the beginning of mail_attachment_delete().
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
https://github.com/odoo/odoo/blob/98bae80f57733162c67593539ef47dfd0c6d8797/addons/mail/controllers/attachment.py#L98
@qrtl QT5667