Extract supplier invoice data from Odoo attachment (PDF/image) using an OpenAI-compatible vision model and optionally create the vendor bill automatically in Odoo.
Complete vendor bill flow from an Odoo attachment:
ir.attachment (PDF or image)account.move, in_invoice) and attach original fileattachment_id is available.ocr-invoiceExtract invoice data without creating the vendor bill in Odoo.
{
"attachment_id": 1234,
"sender_id": 7,
"company_id": 3,
"allowed_company_ids": [3, 5]
}
ocr-create-vendor-billExtract and create vendor bill in Odoo.
{
"attachment_id": 1234,
"dry_run": false,
"sender_id": 7,
"company_id": 3,
"allowed_company_ids": [3, 5]
}
dry_run=true: extract and normalize only; do not create account.move.sender_id + company context: executes ORM as the Odoo user and respects multi-company (company_id, allowed_company_ids).Required:
ODOO_URLODOO_DBODOO_USERNAMEODOO_PASSWORDVISION_API_BASEVISION_MODELOPENAI_API_KEYOptional:
OCR_API_BASE (if an external /v1/ocr/invoice endpoint exists)OCR_TIMEOUT_SECONDS (default: 240)OCR_MAX_PAGES (default: 4)OCR_IMAGE_DPI (default: 170)