Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Odoo Documents?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/actinon-com-odoo-documents)
---
name: odoo-documents
description: Functional expertise in Odoo's file management ecosystem, covering the foundational attachment layer and the advanced Document Management System.
---
# Skill: Odoo Documents & Attachments
This skill provides the agent with functional expertise in Odoo's file management ecosystem, covering the foundational attachment layer and the advanced Document Management System (DMS).
## Core Mandates
### 1. Dual-Layer Architecture
Understand the distinction between the two layers of file management:
- **Base Attachments (`ir.attachment`):** Foundational binary storage. Linked to records via `res_model` and `res_id`. Use this for standard file storage on any record.
- **Managed Documents (`documents.document`):** The DMS layer. Provides workspaces, tags, and approval workflows.
- **Mandate (Odoo 18+):** In newer versions, folders and workspaces are unified into the `documents.document` model. Check the `type` field ('binary', 'url', or 'folder').
### 2. Attaching a File to a Record — use `upload_file`
- **Mandate:** To put a file on a record (a PDF on a task, a drawing on a sales order), call `upload_file` with `res_model`, `res_id` and `source_path` (an absolute local path). The server reads the file; never encode it yourself.
- **Never** write a file into `create_record` on `ir.attachment` as base64, a `sha256:` reference or a path. Large content cannot fit in a tool call, and references are stored as junk. `create_record` now refuses these and points here.
- **Distribute it:** add `post_message` to post the file on the chatter. `post_as: 'note'` (default) stays internal; `post_as: 'message'` notifies the record's followers, which may include customers — use it only when the user wants the file sent.
- **Limits:** up to 50 MB (Act refuses larger requests). Files over 50 MB are not yet supported by the tools: ask the user to attach the file in Odoo, or to share it from Google Drive. Tiny files (≤ 50 KB) may be passed as `content_base64` with a `name` when no local path exists.
- **Proof:** the result gives `attachment_id`, `size_bytes` and `checksum`. Odoo's stored copy is checked against what was sent; a mismatch is deleted and reported, so a returned result means the file landed intact. If `message_error` is present, the file is attached but the chatter post failed — say so.
- **Hidden folders** in the home directory (`~/.ssh`, `~/.config`, ...), `~/Library` (macOS) and `~/AppData` (Windows), and `/proc`, `/sys`, `/dev`, `/etc` are refused. Cloud-drive folders inside `~/Library` (`CloudStorage`, `Mobile Documents`) are allowed.
### 3. Workspace & Folder Organization
- **Hierarchy:** Managed via `folder_id` (pointing to another `documents.document` in Odoo 18+).
- **Mandate:** When creating or moving documents, always ensure they are assigned to the correct parent folder to maintain system-wide organization.
### 4. Workflows & Approvals
- **Validation:** Use Odoo Activities (`mail.activity`) linked via `request_activity_id` to manage internal approval requests (e.g., "Validate this Vendor Bill").
- **External Signatures:** Documents requiring external signatures typically link to the Odoo Sign app.
- **Mandate:** Do not bypass validation steps. If a document has a pending approval activity, the agent must acknowledge it before executing further state changes.
### 5. Sharing & Permissions
- **Internal Access:** Controlled via `access_internal` (view, edit, none) on the document.
- **Granular Sharing:** Managed via the `documents.access` model, linking specific Documents to specific Partners.
- **Public Links:** Controlled via `access_via_link` and `document_token`.
## Available Resources
- `documents-logic.md`: Deep-dive into Odoo 18 architectural changes, OCR/Action workflows, and attachment linking logic.
- `documents-fields.json`: Dense technical map of fields for Document, Attachment, Folder, and Access models.