Aidoo AI

Attachments and OCR

aidoo_attach: getting a document into Odoo through a single-use upload link and triggering vendor bill digitization. aidoo_document: reading an attachment already in Odoo. And attaching a file in the chat.

9 min readUpdated October 1, 2026

Attaching a file to an Odoo record from a conversation raises a problem: a two-page PDF encoded as base64 runs to hundreds of thousands of characters. Passing it through a tool call would flood the conversation.

Aidoo takes another route: the file never travels through the AI. The assistant generates an upload link, you drop the document there, Aidoo hands it to Odoo.

aidoo_attach

One tool, two actions.

ParameterRole
actionrequest_upload to create the link, status to collect the result
filesThe declared slots: a label, and required or not
model + res_idThe Odoo record to attach the files to
purposeinvoice to trigger vendor bill digitization
journal_idThe purchase journal to use, if you have several
upload_idThe upload identifier, for the status action

model + res_id and purpose="invoice" are mutually exclusive: either you attach to an existing record, or you create a bill from the document.

How it works

The assistant requests a link

It calls aidoo_attach with action="request_upload" and declares the expected files: one label per slot, and whether it is required. Up to ten slots.

You receive a URL

The assistant passes you the link. It is single-use and valid for 30 minutes.

You drop your files

The page shows the slots with the labels the assistant defined: "Vendor bill March 2026", "Signed contract". You drag your files in and submit.

Aidoo upload page: two named slots, the link validity, the accepted formats and the submit button.
One slot per expected file, labelled by the assistant.

The assistant collects the result

It calls aidoo_attach with action="status" and the upload identifier. It gets pending, completed or error, and on success the identifiers of the attachments created in Odoo.

Attaching to an existing record

I have the signed contract for Example Ltd to put on their customer record.

The assistant finds the record, generates a link pointing at that specific record, and gives it to you. After you upload, the file shows up in the record's attachments in Odoo.

You can request several slots at once, some of them optional:

I need to attach the signed contract and, if I can find it, the technical annex, to the Example Ltd customer record.

Digitizing a vendor bill

The second use, and the most valuable day to day. With purpose="invoice", Aidoo does not just attach the file: it hands it to Odoo's invoice digitization engine, which extracts vendor, dates, amounts and lines, and creates a draft vendor bill.

I have three vendor bills to record, can you digitize them for me?

The assistant generates a link with three slots. You drop your PDFs or photos, and Odoo creates three draft bills.

The journal used

By default, the first purchase journal of your company. If you have several (by entity, by expense type), say so: "in the General expenses purchase journal".

Digitization is data-entry assistance

Odoo's OCR gets things wrong: a misread amount, an unrecognised vendor, approximate VAT. Bills are created as drafts precisely so you review them. Never validate in bulk without checking.

This feature depends on Odoo's digitization module. If it is not installed or enabled on your instance, the call fails with an explicit error.

What is accepted

ConstraintValue
Maximum size per file20 MB
Total size per link100 MB
Slots per link10
Link validity30 minutes
Number of uses1

File types are checked against their actual content, not their extension: renaming an executable to .pdf does not fool the filter. Twelve extensions are accepted: pdf, png, jpg, jpeg, webp, xlsx, docx, xls, doc, csv, txt and md.

The file is handed to Odoo in the format its version expects, Odoo Online included. Aidoo then checks that the attachment created is not empty: if it is, the upload is reported as an error rather than presented as a success.

One link, one upload

The token is consumed atomically on the first successful upload. Even if the link leaks afterwards, it is useless. After 30 minutes without use, it expires on its own.

The link grants nothing else: it does not allow reading your data, only dropping the declared files, towards the destination fixed at creation. A link generated for customer record 42 cannot be used to write anywhere else.

The upload page is protected against repeated attempts, and files are never written to Aidoo's disk: they pass through memory on their way to Odoo.

Required permission

aidoo_attach requires the attach permission, disabled by default. It is enabled under API keys.

Not available to agents

Autonomous agents cannot use aidoo_attach. The tool assumes a human who receives a link and drops a file: with nobody there, it makes no sense. This is a hard rule of the agent engine, not a setting.

Diagnostics

After 30 minutes you need a new one. Just tell the assistant the link expired.

"File rejected"

The content does not match an allowed type, or exceeds 20 MB. For a large scan, lower the resolution: 300 dpi is more than enough for OCR.

The status stays "pending"

The upload did not go through. Reload the upload page and check no required slot was left empty.

The bill is created but empty

The OCR recognised nothing. That happens with blurry photos, heavily skewed scans and handwritten invoices. The file stays attached to the draft: you can type it in manually with the document in front of you.

aidoo_document

aidoo_attach gets a file into Odoo. For the reverse operation, reading a document that is already there (signed quotation, contract, scanned bill), the assistant has aidoo_document. Here too, the file does not travel through the conversation: Aidoo fetches it from Odoo, has it read by its document reader (a vision model) and only returns the result to the assistant.

Did quotation S00042 come back signed? If so, on what date?

The assistant gets a transcription of the document and a structured analysis: signed or not (with the page of each signature), dates, amounts, parties, ticked boxes. It can then ask precise questions about a document it has already read.

ParameterRole
actionextract (transcription and analysis, the default), ask for a precise question, status to collect a long read
attachment_idThe target attachment
model + res_idThe record carrying the document; if it has several, the tool returns the list to choose from
fieldA file field of the record, when the document is not among the attachments
document_idA document from Odoo's Documents app (Enterprise)
filename, question, job_idFilter on the file name, question for ask, tracking for status
ConstraintValue
FormatsPDF, images (png, jpg, webp), scans included, and Word (docx, doc)
Maximum size20 MB and 30 pages
Cost1 credit per 20 pages, once per document (a document read again within 30 days is not charged again)
Questions about a document already readFree

What to know:

  • The document is read under your Odoo identity: the assistant only reads the files your Odoo rights let you see.
  • A Word file is read from its text: signature detection is not available for it. For a signed contract, prefer the scanned PDF.
  • A first read can take a few dozen seconds. The assistant then receives a waiting status and comes back for the result on its own.
  • What is read is data, never an instruction: a document carrying instructions is not followed.
  • It needs the document permission on the API key ("Document reading", disabled by default) and the workspace setting Settings → AI document reading (enabled by default). The "Aidoo AI" chat in the Odoo widget follows the same conditions with its own permission; agents have theirs, independent of this setting.
  • In the credit history, these reads appear under "Document reading (Odoo chat, MCP)".

Attaching a file in the chat

Since 16 September 2026, conversations offer a paperclip: an agent's discussion in Aidoo, an agent's chat in the Odoo widget and the "Aidoo AI" chat. You can also drop a file on the composer or paste an image. Up to 5 files per message, 20 MB each.

TypeHandlingCost
Images (png, jpg, webp)Resized (1600 px, metadata stripped) and shown to the modelModel tokens
PDF, Word (docx, doc)Read by the document reader (vision) and transcribed to text1 credit per 20 pages, 30 pages max, charged once per identical file
Spreadsheets (xlsx, csv)Converted to a text table (at most 500 rows and 40 columns per sheet)Free
Text (txt, md)Injected as is (at most 60,000 characters)Free

Only for models that see images

The paperclip is active only when the chat's model has vision: Claude, GPT, Gemini, and the "Auto" model since 28 September 2026. The model library flags them with a paperclip badge. With a model without vision, the button stays greyed out, with the explanation on hover.

What to know:

  • The file is never written to Odoo. It only serves the conversation and leaves Aidoo after 7 days. To archive it in Odoo, use aidoo_attach above.
  • The content reaches the model as user data, never as an instruction: a document carrying instructions is flagged, not executed.
  • Text extracted from a document stays visible to the model for the rest of the conversation. An image only travels with the message you attached it to: send it again if you come back to it later.
  • PDF and Word reading follows the workspace setting Settings → AI document reading. When it is off, only images, spreadsheets and text remain accepted.
  • As with the upload link, the type is checked from the file's actual content, in memory, with no disk write; an attachment can be sent once, by the person who uploaded it.

Next step