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 #166086

Conversation

fw-bot
Copy link
Contributor

@fw-bot fw-bot commented May 18, 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: #165332

@robodoo
Copy link
Contributor

robodoo commented May 18, 2024

@fw-bot
Copy link
Contributor Author

fw-bot commented May 18, 2024

This PR targets saas-17.1 and is part of the forward-port chain. Further PRs will be created up to master.

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 18, 2024
@C3POdoo C3POdoo added the RD research & development, internal work label May 18, 2024
@fw-bot
Copy link
Contributor Author

fw-bot commented May 18, 2024

@reth-odoo ci/runbot failed on this forward-port PR

@reth-odoo
Copy link
Contributor

@fw-bot retry

@reth-odoo reth-odoo force-pushed the saas-17.1-17.0-show-all-attachment-options-when-deletable-reth-Pl2I-fw branch from b1b088d to d8f3a60 Compare May 18, 2024 16:33
@reth-odoo
Copy link
Contributor

@robodoo r+

rebased

@fw-bot
Copy link
Contributor Author

fw-bot commented May 18, 2024

@reth-odoo this PR was modified / updated and has become a normal PR. It should be merged the normal way (via @robodoo)

@C3POdoo C3POdoo requested review from a team May 18, 2024 16:35
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: 56b3f67
@reth-odoo reth-odoo force-pushed the saas-17.1-17.0-show-all-attachment-options-when-deletable-reth-Pl2I-fw branch from d8f3a60 to 3ce0d76 Compare May 18, 2024 19:00
@reth-odoo
Copy link
Contributor

Switch to patchUserWithCleanup, user service not available and this is more reliable.
@robodoo r+

robodoo pushed a commit that referenced this pull request 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.

1: 32a80a3

task-3519815

closes #166086

X-original-commit: 56b3f67
Signed-off-by: Renaud Thiry (reth) <reth@odoo.com>
@robodoo robodoo closed this May 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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