| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
Discuss (mail)
|
| Lines of code | 284 |
| Technical Name |
grev_od_camera_attach |
| License | OPL-1 |
|
📷
Chatter Camera CaptureSnap a photo or record a short video straight from the Chatter — attached to the record in a single tap, without ever leaving Odoo.
|
|
|
|
|
|
|
|
|
💬
Need Help?For support, contact us at odoo@grevlin.com Follow us on X: @GrevlinGlobal
Built by Grevlin Global Corp — Odoo modules made by people who ship Odoo every day. |
Chatter Camera Capture
Overview
grev_od_camera_attach adds a one-click camera capture button to Odoo's mail stack so users can take a photo or record a short video directly from the record form (Chatter) or from the Discuss composer. The captured media is attached to the current record or channel message using Odoo's standard attachment pipeline — no new endpoints, models, or storage rules.
The module is intentionally minimal:
- No Python models — pure JS / XML / SCSS.
- No new controllers — captures flow through /mail/attachment/upload.
- No core modifications — everything is done via patch(), t-inherit and registerComposerAction.
Requirements
- Odoo 19.0
- Standard mail module (loaded automatically as a dependency)
- A browser that supports navigator.mediaDevices.getUserMedia and MediaRecorder (any recent Chromium, Firefox or Safari)
- HTTPS origin — browsers only expose getUserMedia on secure origins. On plain http:// the dialog opens but shows an explicit notice instead of a live preview.
Installation
- Copy the grev_od_camera_attach folder into your Odoo addons path.
- Restart the Odoo server.
- Go to Apps, click Update Apps List, search for Chatter Camera Capture and click Install.
No additional configuration is required — the module activates automatically for every backend user.
Usage
From a record form (Chatter)
- Open any record that has a Chatter (for example a Contact, Sale Order, Stock Picking or Maintenance Request).
- In the Chatter topbar, click the camera icon that sits immediately to the left of the paperclip (Attach Files) icon.
- Grant camera access when the browser prompts you.
- Choose Photo or Video mode in the dialog.
- Click Capture (photo) or Start recording → Stop recording (video). Preview the result.
- Click Retake to try again, or Attach to push the media into the record.
The attached file appears in the Chatter attachment list with a timestamped filename (for example photo-2026-04-09T14-32-05.jpg).
From the Discuss composer
- Open any Discuss channel or direct message.
- In the composer action bar, click the camera icon that sits immediately before the Attach Files action.
- Follow the same Capture → Preview → Attach flow as above.
- Click Send to post the message with the freshly captured attachment.
Photo vs. Video mode
| Mode | Behaviour |
|---|---|
| Photo | Captures a single JPEG frame at quality 0.92. Microphone is not requested. |
| Video | Records using MediaRecorder. The container is selected from vp9,opus → vp8,opus → webm → mp4 based on browser support. Microphone is requested. |
Note
No hard time cap is enforced on video recordings in this release. Keep recordings short to stay within reasonable upload sizes.
Permissions & privacy
- Attachments inherit Odoo's existing access rules — the module does not introduce any new security groups or record rules.
- All MediaStreamTrack instances are stopped on every close path (confirm, cancel, escape, retake, mode switch, component unmount). The device camera indicator turns off the moment the dialog closes.
- If the user denies camera access, the error is displayed inside the dialog and the dialog stays open so the user can retry after adjusting browser permissions.
Troubleshooting
The camera button does not appear
- Confirm the module is installed: Apps → Chatter Camera Capture → Installed.
- Hard-reload the browser (Ctrl+Shift+R) to force Odoo to reload the backend assets bundle.
- Open the browser console and look for JS errors mentioning Chatter or composer_actions.
The dialog opens but there is no video preview
- Make sure Odoo is served over HTTPS. navigator.mediaDevices is undefined on plain http://, which is a browser-level restriction.
- Check that no other application (Zoom, Meet, Teams) currently owns the camera.
- Check the browser site permissions for the Odoo URL and re-grant camera access if needed.
Video recording fails on Safari
Older versions of Safari do not implement MediaRecorder. In that case the dialog shows an error message inside the modal. Use Chromium, Firefox, or a recent Safari build.
Technical architecture
Module layout
grev_od_camera_attach/
├── __manifest__.py
├── __init__.py
├── doc/
│ ├── index.rst ← this file
│ └── prd/ ← product requirements
└── static/src/
├── js/
│ ├── camera_dialog.js ← shared OWL 2 dialog
│ ├── chatter_patch.js ← Chatter.prototype patch
│ └── composer_actions_patch.js ← registerComposerAction
├── xml/
│ ├── chatter_patch.xml ← t-inherit of mail.Chatter
│ └── camera_dialog.xml ← <Dialog> template
└── scss/
└── camera_dialog.scss
Extension points
| File | Odoo core target | Technique |
|---|---|---|
| xml/chatter_patch.xml | mail.Chatter template | t-inherit + xpath position="before" |
| js/chatter_patch.js | Chatter class | patch(Chatter.prototype, {...}) |
| js/composer_actions_patch.js | composer_actions registry | registerComposerAction("camera-capture", ...) |
| js/camera_dialog.js | New component | Extends OWL Component, renders <Dialog> |
Upload path
Both entry points share the same upload path:
CameraDialog.confirm()
→ new File([blob], filename, { type })
→ this.props.attachmentUploader.uploadFile(file)
→ mail.attachment_upload service
→ POST /mail/attachment/upload
→ ir.attachment create
No custom route, no custom service, no custom model.
Known limitations
- No client-side image editor (no cropping, filters, annotations).
- No maximum video length enforced in this release.
- No front/rear camera toggle — the dialog requests facingMode: "environment" and falls back to the default camera.
- Website / portal frontend forms are out of scope in this iteration.
Support
- Email: odoo@grevlin.com
- X: @GrevlinGlobal
- Free support window: 30 days from the purchase date.
Credits
Author
- Grevlin Global Corp
License
This module is distributed under the OPL-1 license. See the license key in __manifest__.py for details.
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