-
-
Notifications
You must be signed in to change notification settings - Fork 2k
[16.0][FIX] web_responsive: Show Attachment Preview By Default In Form view #2695
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
base: 16.0
Are you sure you want to change the base?
[16.0][FIX] web_responsive: Show Attachment Preview By Default In Form view #2695
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.
hi @bvanjeelharia.
Thanks a lot for your contribution. That is a good improvment to allow to have the preview attachment by default, because it saves click to users.
However, there are some problem in your implementation.
- blocking point : the place of the chatter changed. It is now allways on the bottom. (should not). Also, if user click on the invoice, there is a double display.
runboat / firefox 120.0.1 (64 bits)
- Performance : This should be an option per user (opt out by default) : This feature is great, but make the UI slower, because there are extra read call to the server.
Kind regards.
|
Exactly, I see this feature very annoying, and should be at least configurable, but I don't really see why having the preview always (although not needed), and having to scroll down for the chatter is an improvement... |
👍
i see this feature very important for accountant people. In my company,
|
|
The problem is that when you access an invoice, you don't want to see the attachment most of the times. Only for the initial encoding is needed, or some later checks. But the rest of the time, this preview is useless. And this only works when then first attachment is the correct one. I have for example one ISP vendor that attaches a PDF with the call list, and as second attachment, the invoice, so in this case, it's worst the solution than the illness. Doing 2 clicks is not so bad then. One thing we can do is to unfold attachment by default (when there are any), so the preview is only 1 click away. I think Odoo does this on v17. |
Just tested on v17 : When user click on an invoice and open a form view AND IF len(attachments) |
Yes, that's the same in v16 as well(also the double display). That is why I had made the change likewise |
|
Well, as said, this was intentionally put this way on |
Thanks ! I didn't know all that analysis.
👍 |
|
So, the current PR is fine , but only should be put as an option , right? @pedrobaeza |
|
Check the issue commented by Sylvain, but if you put it as an option disabled by default, then go ahead. I suppose you put the option selectable per user, but it should also attend the core option for display it per model. |
Yes, this preview only comes up when the attachment_preview div is added like how chatter_div is added on the form view.
Yes, which would be disabled by default |
d691d0e to
3d7c865
Compare
|
@legalsylvain and @pedrobaeza , can you please review it once now? |
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.
Tested and working. The preference field is not shown, and needed to add it manually to the UI. I'm seeing that web_chatter_position (I needed to uninstall it for avoiding interferences) has an option called "Sided", that seems to be thought for recovering this option. It's not working, but don't you think it's better to add this code in such module and have it all controlled the same way?
Added configurable option for attachment preview Prettify Code Prettify Code Remove Redundant string for field Fixed access rights for files Added Radio Widget
3d7c865 to
bee0d12
Compare
The Preference field would show up in My Profile section exactly how the chatter position options show up.
The web_chatter_position module may or may not be installed by everyone who use the web_responsive module so this change(code) has to be added in web_responsive module I believe. And the sided option in web_chatter_position module doesn't work even if you uninstall the web_responsive module and check in invoices as this feature (Attachment Preview) is actually independent of the chatter position. So if needed, changes should also be added in the web_chatter_position module to allow/disallow Attachment Previews based on the chatter position or handle it any other way. |
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.
lgtm
-OCA already have discussion at /OCA/web/pull/2695/
This commit would allow the attachment previews to load by default wherever applicable like for Invoices.


Check the following screenshot for invoices before this change:
Check the following screenshot for invoices after this change is merged: