Context when it matters. Space when it doesn't.
Three focused controls keep communication and files close without making every form feel crowded.
Chatter when needed
Open messages, notes, and activities when collaboration matters, then return to a wider form.
Attachment-aware
Keep the document control quiet until files exist, then show a clear count and preview path.
Preview or compare
Use one-file preview for focus or switch to a complete attachment overview when comparing.
See the control layer in context.
The cards below show the main states of the module: a clean form, chatter open, chatter with document preview, and the attachment overview.
Start focused, with panels closed.
The form opens wide and calm. Chatter and document tools stay available without taking over the workspace.
Bring communication in when needed.
Open chatter for notes, messages, and activities, then close it again when the record needs the space.
Review files beside the conversation.
Keep fields, messages, and the current document preview together in one practical working view.
Switch from preview to complete overview.
Use the all-files view when comparing documents, checking filenames, or browsing record attachments.
Strict controls, native Odoo behavior.
The module does not replace Odoo's chatter or attachment systems. It adds a clean control layer on top of the existing form, mail, and preview behavior.
Global form support
Applies to form views that include Odoo chatter or attachment previews without model-specific setup.
Theme-aware readability
Attachment names, headers, and controls are tuned for both dark and light Odoo themes.
Smart empty state
The document control stays invisible until attachments exist, then updates after upload.
Optional form opt-out
Keep Odoo's standard layout on exceptional forms with the module opt-out attribute.
Chatter & Attachments Toggle
Chatter & Attachments Toggle adds compact form controls for opening chatter, previewing attachments, and browsing all files only when they are needed.
The module keeps Odoo form views cleaner by hiding communication and document panels until the user chooses to show them. Attachment controls remain hidden on records without files, then appear automatically when documents are available.
Key Features
- Toggle chatter directly from the form control panel.
- Toggle attachment previews from the same form toolbar area.
- Show the current attachment count on the documents button.
- Hide attachment controls until at least one file exists.
- Refresh attachment controls immediately after uploads.
- Switch between single-file preview and a see-all attachment view.
- Generate clean previews for PDF and image attachments.
- Keep attachment filenames readable in light and dark mode.
- Preserve a wider form sheet when side panels are hidden.
Usage
Install the module and open any standard Odoo form view that includes chatter or attachment previews. The module adds compact controls to the form toolbar so users can show or hide chatter and document panels without changing their normal workflow.
When a record has no files, the attachment control stays hidden. After a file is attached, the documents button appears with the current attachment count.
Optional Form Opt-Out
To keep Odoo's standard chatter and attachment layout on a specific form, add the following attribute to that form architecture:
<form x_gd_chatter_attachments_toggle_disabled="1"> ... </form>
Compatibility
This module depends on base, web, and mail.
It is designed for standard form views across Odoo apps such as Sales, Inventory, Purchases, Approvals, CRM, and other models that use chatter or attachment previews.
License
OPL-1.
Odoo Proprietary License v1.0 This software and associated files (the "Software") may only be used (executed, modified, executed after modifications) if you have purchased a valid license from the authors, typically via Odoo Apps, or if you have received a written agreement from the authors of the Software (see the COPYRIGHT file). You may develop Odoo modules that use the Software as a library (typically by depending on it, importing it and using its resources), but without copying any source code or material from the Software. You may distribute those modules under the license of your choice, provided that this license is compatible with the terms of the Odoo Proprietary License (For example: LGPL, MIT, or proprietary licenses similar to this one). It is forbidden to publish, distribute, sublicense, or sell copies of the Software or modified copies of the Software. The above copyright notice and this permission notice must be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Please log in to comment on this module