-
Notifications
You must be signed in to change notification settings - Fork 23.1k
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
[FW][FIX] mail: show all attachment options #166094
[FW][FIX] mail: show all attachment options #166094
Conversation
@reth-odoo cherrypicking of pull request #165332 failed. stdout:
stderr:
Either perform the forward-port manually (and push to this branch, proceeding as usual) or close this PR (maybe?). In the former case, you may want to edit this PR message as well. More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port |
a3fc2ca
to
0d26a92
Compare
@robodoo r+ |
The template for the attachment list adds a class to show multiple options when attachments can be deleted. However the condition to display the delete button is different from the condition to apply that style. Meaning if one condition `showDelete` is true while the other `isDeletable` is false it is impossible to access the download button as the correct style is not applied. - Fix the template to use the same condition everywhere - Fix the condition for showDelete to always be false is deletion is disallowed Issue noticeable since [1] when attachments were made conditionally deletable as opposed to always deletable previously. 1: 32a80a3 task-3519815 X-original-commit: 281140f
0d26a92
to
f3daf5b
Compare
Can't use patchUserWithCleanup anymore because it's not in hoot, patching the pyenv setup method to get isAdmin which is even better anyway. @robodoo r+ |
The template for the attachment list adds a class to show multiple options when attachments can be deleted. However the condition to display the delete button is different from the condition to apply that style. Meaning if one condition `showDelete` is true while the other `isDeletable` is false it is impossible to access the download button as the correct style is not applied. - Fix the template to use the same condition everywhere - Fix the condition for showDelete to always be false is deletion is disallowed Issue noticeable since [1] when attachments were made conditionally deletable as opposed to always deletable previously. 1: 32a80a3 task-3519815 closes #166094 X-original-commit: 281140f Signed-off-by: Renaud Thiry (reth) <reth@odoo.com>
[ | ||
0, | ||
0, | ||
{ | ||
mimetype: "image/jpeg", | ||
name: "BLAH", | ||
res_id: partnerId, | ||
res_model: "res.partner", | ||
}, | ||
], | ||
[ | ||
0, | ||
0, | ||
{ | ||
mimetype: "image/png", | ||
name: "BLEH", | ||
res_id: partnerId, | ||
res_model: "res.partner", | ||
}, | ||
], | ||
], |
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.
Could use Command.create(data)
rather than [0, 0, data]
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.
Fair, could probably also have used a list comprehension to be honest in hindsight
The template for the attachment list adds a class to show multiple options when attachments can be deleted.
However the condition to display the delete button is different from the condition to apply that style.
Meaning if one condition
showDelete
is true while the otherisDeletable
is false it is impossible to access the download button as the correct style is not applied.Issue noticeable since [1] when attachments were made conditionally deletable as opposed to always deletable previously.
Steps to reproduce:
1: 32a80a3
task-3519815
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: #166086
Forward-Port-Of: #165332