odoo_attachment_upload
Upload a file to an Odoo record and return its attachment ID for linking to messages or other records.
Instructions
Upload a file as an ir.attachment on an Odoo record. Returns the attachment ID which can be used with odoo_message_post (attachment_ids parameter) or linked to any record.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| connection | No | default | |
| model | Yes | Model name (e.g. 'sale.order') | |
| res_id | Yes | Record ID to attach to | |
| filename | Yes | File name (e.g. 'report.pdf') | |
| content_base64 | Yes | Base64-encoded file content | |
| mimetype | No | MIME type (optional, auto-detected) |