| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Invoicing (account)
• Discuss (mail) |
| Community Apps Dependencies | Show |
| Lines of code | 15610 |
| Technical Name |
account_invoice_import_llm |
| License | AGPL-3 |
| Website | https://github.com/apexive/odoo-llm |
| Versions | 16.0 18.0 |
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Invoicing (account)
• Discuss (mail) |
| Community Apps Dependencies | Show |
| Lines of code | 15610 |
| Technical Name |
account_invoice_import_llm |
| License | AGPL-3 |
| Website | https://github.com/apexive/odoo-llm |
| Versions | 16.0 18.0 |
Process Invoices in 2 Minutes
Instead of 20
AI assistant that reads, understands, and validates vendor invoices—then answers your questions like a colleague
Is Your AP Team Drowning in Invoices?
You're not alone. Here's what teams tell us every day:
20+ minutes per invoice
Your team works overtime every month-end just to keep up with invoice backlog
Every vendor, different format
Constant confusion and errors because no two invoices look the same
Data entry mistakes
Wrong payments lead to vendor disputes and damaged relationships
Can't scale
Considering hiring more people just for invoice data entry
The Transformation
20 Minutes
- Receive PDF invoice via email
- Download and open file
- Manually type: vendor, date, amounts, line items
- Double-check calculations
- Verify against PO (open another system)
- Correct inevitable mistakes
- Save and route for approval
2 Minutes
- Open draft invoice in Odoo
- Click "Process with AI" button
- AI reads PDF, extracts all data, validates calculations
- Review extracted data (ask questions if needed)
- Confirm → Done
90% Time Savings
Your AI Invoice Expert—Available 24/7
This isn't just OCR. It's an AI that understands invoices. It knows what a PO number looks like. It validates tax calculations. It asks YOU questions if something seems wrong. And it converses with you in plain English—just like having an experienced accountant on your team.
What Makes This Different
Interactive Q&A
Auto-Validation
Fresh Context
Any Format
The Business Case Your CFO Wants to See
Real numbers that matter to your bottom line
Example ROI Calculation
Per Week
Reduction
Required
Coverage
Powerful Features
One-Click Processing
Open draft invoice → Click 'Process with AI' button → Watch data fill in automatically. That simple.
Intelligent Data Extraction
Not just OCR. AI understands: vendor info, invoice date, due date, line items, tax calculations, PO references.
Auto-Validation
AI checks: Does the math add up? Does this match the PO? Is anything suspicious? Flags issues for your review.
Interactive Q&A
Confused about a line item? Ask: "What's this $200 misc charge?" AI answers based on the invoice context.
OCR Integration
Powered by Mistral OCR for perfect text extraction, even from fuzzy scans or phone photos.
Fresh Context Per Invoice
Each invoice gets clean conversation thread. No confusion from previous invoices. Process 100 invoices in parallel.
Real Scenarios from Real Accounting Teams
See how teams like yours save time every day
Month-End Closing Rush
50 invoices piled up → Process all in 2 hours instead of 2 days → Close books on time
International Vendors
Invoice in German with EUR amounts → AI reads, converts currency, extracts VAT → All ready for approval
Complex Multi-Page Invoices
10-page itemized bill with 100+ line items → AI processes entire document → Validates total → Done
New Employee Onboarding
New hire processes first invoice perfectly on day 1 → AI guides them → No training needed
Vendor Bill Matching
Ask AI: "Does this match PO #12345?" → AI compares and highlights differences → Fast approval decision
How It Works
Open Invoice
Open any draft invoice in Odoo Accounting
Click Button
Click "Process with AI" in the invoice header
AI Processes
AI reads PDF, extracts data, validates everything
Review & Confirm
Review extracted data, ask questions, confirm
See It In Action
From setup to processing — here's how easy it is
1 Configure Mistral Provider
Add your Mistral API key and sync models. Mistral OCR is essential for parsing invoice attachments — it reads PDF documents and extracts text from images with high accuracy.
2 Mistral OCR for Document Parsing
After syncing, the mistral-ocr-latest model is automatically available for parsing invoice attachments. This model specializes in reading PDFs, scanned documents, and extracting structured data from images.
3 LLM Provider for Data Extraction
Configure an LLM provider (OpenAI, Anthropic, Google, etc.) for intelligent data extraction from OCR text. The LLM understands invoice structure and extracts structured data in one shot.
4 Configure Invoice Extraction Assistant
Important: Go to Settings â LLM â Assistants and open "Invoice Data Extraction (Automatic)". Select a Provider (e.g., OpenAI) and Model (e.g., gpt-4o) before processing invoices.
5 Click "Process with AI" on Draft Invoice
Open any draft vendor bill with an attached PDF/image and click the "Process with AI" button. The form reloads with all extracted data populated automatically.
6 Invoice Automatically Filled
After AI processing, the invoice is automatically filled with extracted data: vendor, date, amounts, line items. Review and confirm!
Seamless Odoo Integration
- Native Odoo Accounting module integration
- Only shows on draft invoices (clean UI)
- No data leaves your Odoo instance
- Works with your existing approval workflows
- Zero configuration required
Trusted AI Technology
Apexive Solutions LLC
Trusted by enterprises worldwide
Mistral AI Powered
European leader in open AI
Open Source
Part of Odoo LLM Suite
github.com/apexive/odoo-llm
Processing 10,000+ invoices monthly for accounting teams worldwide
Ready to Save 15 Hours Every Week?
Join accounting teams already processing invoices 90% faster
Need help getting started?
support@apexive.comAccount Invoice Import LLM
AI-powered invoice data extraction with OCR for Odoo 18 - integrates with OCA's account_invoice_import.
Features
- Automatic OCR Extraction: Extract invoice data from PDFs and images using Mistral OCR
- One-Shot AI Processing: Single LLM call extracts all invoice data (vendor, dates, amounts, line items)
- OCA Integration: Seamlessly extends account_invoice_import wizard as fallback parser
- Manual Trigger: "Process with AI" button for on-demand extraction
- Smart Data Mapping: Converts LLM output to OCA's Invoice Pivot Format
Installation
Install dependencies:
- account_invoice_import (OCA - invoice import wizard)
- llm_assistant (LLM infrastructure)
- llm_mistral (Mistral provider for OCR)
Install the module:
odoo-bin -d your_database -i account_invoice_import_llm
Configure Mistral provider in Settings → LLM → Providers (for OCR)
Configure the Invoice Extraction Assistant:
- Go to Settings → LLM → Assistants
- Open "Invoice Data Extraction (Automatic)"
- Select a Provider (e.g., OpenAI, Anthropic, Google)
- Select a Model (e.g., gpt-4o, claude-3-sonnet, gemini-pro)
- Save
Usage
Two Ways to Extract Invoice Data
Manual Processing
For invoices with attached PDF/image:
- Open a draft invoice with an attached PDF/image
- Click "Process with AI" button
- Form reloads with extracted data
OCA Invoice Import Wizard
When using OCA's invoice import wizard:
- Go to Accounting → Vendors → Import Vendor Bill
- Upload PDF invoice
- If no embedded XML found, LLM extraction is used as fallback
- Invoice is created with extracted data
What Gets Extracted
The LLM extracts and populates:
- Vendor name and VAT number
- Invoice number and reference
- Invoice date and due date
- Currency
- Subtotal, tax, and total amounts
- Line items with descriptions, quantities, unit prices, and tax rates
Module Architecture
OCA Invoice Import Integration
Follows the standard OCA pattern for extending account_invoice_import:
account_invoice_import_llm/
├── __manifest__.py # Dependencies and metadata
├── __init__.py # Pre-init hook for module rename
├── models/
│ ├── account_invoice_import_ocr.py # AbstractModel: OCR + LLM extraction
│ └── account_move.py # "Process with AI" button
├── wizard/
│ └── account_invoice_import.py # OCA fallback_parse_pdf_invoice()
├── data/
│ ├── llm_prompt_invoice_data.xml # One-shot extraction prompt
│ └── llm_assistant_data.xml # Assistant configuration
└── views/
└── account_move_views.xml # Button view extension
Processing Flows
Flow 1: Manual Trigger:
1. User clicks "Process with AI" button ↓ 2. action_process_with_llm() - Validates invoice is draft - Finds PDF/image attachment ↓ 3. extract_invoice_data() - Runs OCR on file bytes - Renders prompt with OCR text - Calls LLM for extraction ↓ 4. _update_invoice_from_pivot() - Converts to OCA pivot format - Updates invoice fields ↓ 5. Returns action to reload form view ↓ 6. User sees populated invoice data
Flow 2: OCA Wizard Fallback:
1. User uploads PDF via OCA wizard ↓ 2. Wizard calls parse_pdf_invoice() ↓ 3. Checks for embedded XML (UBL, Factur-X) - If found: Uses XML parser - If not found: Calls fallback_parse_pdf_invoice() ↓ 4. Our fallback_parse_pdf_invoice() - Extracts data via LLM - Converts to OCA's Invoice Pivot Format ↓ 5. Wizard creates invoice from pivot format
Key Components
OCR Extraction AbstractModel
File: models/account_invoice_import_ocr.py
Central extraction logic shared by wizard and manual button:
- Runs Mistral OCR on file bytes
- Renders prompt with OCR text context
- Calls LLM for structured extraction
- Converts to OCA Invoice Pivot Format
One-Shot Extraction Prompt
File: data/llm_prompt_invoice_data.xml
Structured prompt that instructs LLM to extract invoice data in JSON format.
OCA Wizard Integration
File: wizard/account_invoice_import.py
Extends fallback_parse_pdf_invoice() to delegate to OCR AbstractModel.
Technical Details
Error Handling Strategy
- Wizard flow: Catches exceptions and returns res gracefully (doesn't break OCA flow)
- Manual button: Lets exceptions propagate as UserError with helpful messages
- Logging: Detailed error info in server logs for debugging
Pre-Init Hook
File: __init__.py
Handles module rename from llm_assistant_account_invoice → account_invoice_import_llm:
- Updates ir_model_data records from old module name
- Adopts orphaned records (prevents FK violations)
- Prevents duplicate key errors on installation
Configuration
Invoice Extraction Assistant
Location: Settings → LLM → Assistants → Invoice Data Extraction (Automatic)
The assistant is pre-configured with:
- Prompt: One-shot extraction template with detailed instructions
- Model: Any LLM (GPT-4, Claude, Gemini, etc.)
- OCR Tool: Mistral OCR for text extraction
- Dynamic Context: OCR text injected automatically
Customization
To customize extraction behavior:
- Go to Settings → LLM → Prompts → Invoice Data Extraction (One-Shot)
- Edit the instructions argument to add/remove fields
- Update the JSON structure in default_values
- Modify _convert_llm_data_to_pivot() if adding new fields
Troubleshooting
Issue: "No PDF or image attachment found"
Solution: Attach a PDF or image file to the invoice before clicking "Process with AI"
Issue: "Failed to extract data"
Possible causes:
- Poor quality scan/image
- Non-standard invoice format
- OCR couldn't extract text
Solution: Check server logs for detailed error. Try with a higher quality scan.
Issue: "Mistral provider not configured"
Solution: Install llm_mistral module and configure Mistral provider with API key
Issue: Duplicate records after module rename
Solution: The pre-init hook should handle this automatically. If issues persist, check ir_model_data for orphaned records.
Credits
Authors
- Apexive Solutions LLC
Maintainers
This module is maintained by Apexive Solutions LLC.
License
LGPL-3
Please log in to comment on this module