Skip to content
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 #166098

Conversation

fw-bot
Copy link
Contributor

@fw-bot fw-bot commented May 19, 2024

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.

Steps to reproduce:

  • Post a couple attachments on the same message as a user in a chatter
  • Switch to a different user that is not allowed to delete the attachment (not admin)
  • You can't select the download button without using the tab key

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: #166094
Forward-Port-Of: #165332

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: 1b1f58e
@robodoo
Copy link
Contributor

robodoo commented May 19, 2024

@fw-bot
Copy link
Contributor Author

fw-bot commented May 19, 2024

@reth-odoo this PR targets master and is the last of the forward-port chain.

To merge the full chain, use

@fw-bot r+

More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port

@robodoo robodoo added the forwardport This PR was created by @fw-bot label May 19, 2024
@C3POdoo C3POdoo added the RD research & development, internal work label May 19, 2024
@reth-odoo
Copy link
Contributor

@fw-bot r+

robodoo pushed a commit that referenced this pull request May 21, 2024
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 #166098

X-original-commit: 1b1f58e
Signed-off-by: Renaud Thiry (reth) <reth@odoo.com>
@robodoo robodoo closed this May 21, 2024
@robodoo robodoo added the 17.3 label May 21, 2024
zel-odoo pushed a commit to odoo-dev/odoo that referenced this pull request May 24, 2024
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 odoo#166098

X-original-commit: 1b1f58e
Signed-off-by: Renaud Thiry (reth) <reth@odoo.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
17.3 forwardport This PR was created by @fw-bot RD research & development, internal work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants