Name: [FIX] web_responsive: stop disabling the attachment side panel on every

State: Killed finished in 239m

PR State: merged

PR Author: Roy Le

PR Author Email:

PR: #662

Committer: Roy Le

Committer Email: roy.le@viindoo.com

Commit: cd64675058aff4805e053332aff4975139ba0892

Description:

                                            [FIX] web_responsive: stop disabling the attachment side panel on every
form

form_renderer.esm.js patched FormRenderer.hasFile() to return false
unconditionally, and the file is loaded in web.assets_backend for the
whole backend. hasFile() is what mail's form compiler asks before
rendering the "o_attachment_preview" hook
(mail/chatter/web/form_renderer.js mailLayout(),
which returns COMBO only when there is a file), so with it in place the
attachment preview panel never rendered on ANY form at ANY screen size -
no receipt beside an expense report, no PDF beside a vendor bill.

The patch also has nothing left to do on 18.0: mailLayout() already
gates the panel on SIZES.XXL, so narrow screens get the chatter at the
bottom and no preview whether or not this override exists. It only
removed the feature from the wide screens that are supposed to have it.
The exported unpatchDisableFilePreview handle is never imported
anywhere, so nothing ever put the behaviour back.

Reproduced and verified on v18_full: hr_expense's
test_show_expense_receipt_on_expense_line_click went from "1 failed of 1
tests" (step 8/12 "Check attachment" timing out after 10s because the
panel was absent from the DOM) to "tour succeeded, 0 failed of 1 tests".
A browser probe on the same database confirmed the cause was rendering,
not data: the mail store held all three attachments with
attachmentsInWebClientView = 3, uiService.size = 6 (XXL) and the chatter
mounted, while .o_attachment_preview was absent entirely.

No manifest version bump: the module declares its assets with the
"views/form/*" glob, so the ir.asset rows in the database are unchanged
and the bundle is rebuilt from the checksum of the files it resolves.
                                            

Branch: 18.0

Age:

Up-time: