Skip to Content
Odoo Menu
  • Sign in
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Approvals
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Estate Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
      • Get a Tailored Demo
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +32 2 290 34 90
    • Get a Tailored Demo
  • Pricing
  • Help
  1. APPS
  2. AI
  3. Account Invoice Import LLM v 16.0
  4. Sales Conditions FAQ

Account Invoice Import LLM

by Apexive Solutions LLC https://github.com/apexive/odoo-llm
Odoo
v 16.0 Third Party 5
Download for v 16.0 Deploy on Odoo.sh
Apps purchases are linked to your Odoo account, please sign in or sign up first.
Availability
Odoo Online
Odoo.sh
On Premise
Odoo Apps Dependencies • Invoicing (account)
• Discuss (mail)
Community Apps Dependencies Show
• Account Invoice Import
• LLM Assistant
• Mistral AI LLM Integration
• Base Business Document Import
• Account Tax UNECE
• PDF Helper
• Product UoM UNECE
• Base UNECE
• Easy AI Chat
• LLM Integration Base
• LLM Tool
• Web JSON Editor
• OpenAI LLM Integration
• LLM Training Management
Lines of code 16446
Technical Name account_invoice_import_llm
LicenseAGPL-3
Websitehttps://github.com/apexive/odoo-llm
Versions 16.0 18.0
You bought this module and need support? Click here!
Availability
Odoo Online
Odoo.sh
On Premise
Odoo Apps Dependencies • Invoicing (account)
• Discuss (mail)
Community Apps Dependencies Show
• Account Invoice Import
• LLM Assistant
• Mistral AI LLM Integration
• Base Business Document Import
• Account Tax UNECE
• PDF Helper
• Product UoM UNECE
• Base UNECE
• Easy AI Chat
• LLM Integration Base
• LLM Tool
• Web JSON Editor
• OpenAI LLM Integration
• LLM Training Management
Lines of code 16446
Technical Name account_invoice_import_llm
LicenseAGPL-3
Websitehttps://github.com/apexive/odoo-llm
Versions 16.0 18.0
  • Description
  • Documentation

Process Invoices in 2 Minutes
Instead of 20

AI-powered invoice data extraction with OCR—automatically processes vendor invoices and populates all fields in one shot

90% Faster
100% Accurate
Any Invoice Format

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

BEFORE: Manual Process

20 Minutes

  1. Receive PDF invoice via email
  2. Download and open file
  3. Manually type: vendor, date, amounts, line items
  4. Double-check calculations
  5. Verify against PO (open another system)
  6. Correct inevitable mistakes
  7. Save and route for approval
AFTER: AI-Assisted

2 Minutes

  1. Upload PDF invoice to Odoo
  2. AI automatically reads PDF via OCR
  3. AI extracts all data in one shot (vendor, dates, amounts, lines)
  4. Review auto-filled invoice
  5. Confirm → Done

90% Time Savings


Smart Invoice Extraction—Powered by AI

This isn't just OCR. It's an AI that understands invoices. It extracts vendor information, line items, tax calculations, dates, and amounts in one shot. Works with any invoice format—PDFs, scanned documents, or images. Integrates seamlessly with OCA's invoice import wizard as an intelligent fallback parser.

What Makes This Different

One-Shot Extraction

Auto-Validation

OCA Integration

Any Format


The Business Case Your CFO Wants to See

Real numbers that matter to your bottom line

Example ROI Calculation

Process 200 invoices/month
Currently 20 min each = 66 hours/month
With AI 2 min each = 6.6 hours/month
Time Saved 59.4 hours/month = 2.5 full days
At $30/hour loaded cost:
Monthly Savings: $1,782
Annual Savings: $21,384
15+
Hours Saved
Per Week
95%
Cost
Reduction
0
Training
Required
100%
Invoice
Coverage

Powerful Features

Automatic Processing

Upload PDF to invoice → EDI decoder triggers automatically → Invoice fields populate instantly. Zero clicks required.

One-Shot Data Extraction

Single LLM call extracts all invoice data: vendor info, dates, line items, tax calculations, amounts. No multi-turn conversation needed.

Smart Data Mapping

Automatically converts LLM output to OCA's Invoice Pivot Format. Handles vendor matching, product mapping, and tax calculations.

Data Mapping

Converts LLM output to OCA's Invoice Pivot Format automatically. Seamless integration with OCA wizard.

OCR Integration

Powered by Mistral OCR for perfect text extraction, even from fuzzy scans or phone photos.

EDI Decoder Integration

Registers in Odoo's EDI decoder chain. XML parsers run first, LLM-OCR as intelligent fallback. 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

OCA Wizard Integration

Upload invoice via OCA wizard → No XML found → LLM-OCR fallback extracts data automatically → Invoice created seamlessly


Three Ways to Extract Invoice Data

1

Automatic Processing

RECOMMENDED

Upload PDF to invoice → EDI decoder triggers automatically → OCR extracts text → LLM extracts data → Invoice populated

2

Manual Trigger

FOR EXISTING INVOICES

Open draft invoice → Click "Process with AI" button → Form reloads with extracted data

3

OCA Wizard Fallback

OCA INTEGRATION

Upload via OCA wizard → No XML found → LLM extraction used as fallback → Invoice created


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.

Mistral Provider Configuration

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.

OCR models available for parsing attachments

3 LLM Provider for Data Extraction

Configure any LLM provider (ChatGPT, Gemini, Claude, etc.) for intelligent data extraction from OCR text. The LLM understands invoice structure and extracts structured data in one shot.

ChatGPT Provider for intelligent data extraction

4 Click "Process with AI" on Draft Invoice

Open any draft vendor bill and click the "Process with AI" button to manually trigger extraction. The form will reload with all fields populated automatically.

Process with AI button on invoice form

5 Invoice Automatically Filled

After AI processing, the form reloads with extracted data: vendor, date, amounts, line items. All populated in one shot. Review and confirm!

Invoice form filled with AI-extracted data

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

Install Now from Odoo Apps

Need help getting started?

support@apexive.com

Account Invoice Import LLM

AI-Powered Invoice Data Extraction with OCR for Odoo

Developed by Apexive Solutions LLC

Part of the comprehensive Odoo LLM Suite

github.com/apexive/odoo-llm

Licensed under LGPL-3

Account Invoice Import LLM

AI-powered invoice data extraction with OCR for Odoo 16 - 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
  • ⚡ EDI Decoder: Automatically processes attachments via Odoo's EDI decoder chain
  • 🔘 Manual Trigger: "Process with AI" button for on-demand extraction
  • 📊 Smart Data Mapping: Converts LLM output to OCA's Invoice Pivot Format

Installation

  1. Install dependencies:

    • account_invoice_import (OCA - invoice import wizard)
    • llm_assistant (LLM infrastructure)
    • llm_mistral (Mistral provider for OCR)
  2. Install the module:

    odoo-bin -d your_database -i account_invoice_import_llm
    
  3. Configure Mistral provider in Settings → LLM → Providers

Usage

Three Ways to Extract Invoice Data

  1. Automatic Processing (Recommended)

    Simply upload a PDF or image to an invoice:

    • Create a new vendor bill (Accounting → Vendors → Bills)
    • Attach an invoice PDF or image
    • Invoice is automatically processed!
      • EDI decoder triggers on attachment upload
      • OCR extracts text from document
      • LLM extracts structured data
      • Invoice fields are populated
  2. Manual Processing

    For invoices created before module installation:

    • Open a draft invoice with an attached PDF/image
    • Click "Process with AI" button
    • Form reloads with extracted data
  3. 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: Automatic Decoder (Odoo Native):

1. User uploads PDF to invoice
   ↓
2. account.move.create_document_from_attachment_decoders()
   ↓
3. _llm_ocr_decoder() checks if PDF is suitable
   ↓
4. Creates draft invoice with journal
   ↓
5. _extract_invoice_data_from_attachment()
   - Creates LLM thread with OCR context
   - Runs one-shot extraction prompt
   - Returns extracted data as JSON
   ↓
6. _populate_invoice_from_data()
   - Populates vendor, dates, amounts
   - Creates invoice lines
   - Processes UBL XML if present
   ↓
7. Decoder returns invoice
   ↓
8. Journal links attachment to invoice

Flow 2: 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_from_attachment()
   - Same extraction as automatic flow
   ↓
4. _populate_invoice_from_data()
   - Populates invoice fields
   ↓
5. Returns action to reload form view
   ↓
6. User sees populated invoice data

Flow 3: 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()
   - Creates temp invoice for context
   - Extracts data via LLM
   - Converts to OCA's Invoice Pivot Format
   ↓
5. Wizard creates invoice from pivot format
   ↓
6. Wizard automatically links attachment

Key Components

  1. 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
  2. One-Shot Extraction Prompt

    File: data/llm_prompt_invoice_data.xml

    Structured prompt that instructs LLM to extract invoice data in JSON format.

  3. OCA Wizard Integration

    File: wizard/account_invoice_import.py

    Extends fallback_parse_pdf_invoice() to delegate to OCR AbstractModel.

Technical Details

EDI Decoder Registration

The module registers _llm_ocr_decoder in Odoo's EDI decoder chain:

@api.model
def _get_create_document_from_attachment_decoders(self):
    decoders = super()._get_create_document_from_attachment_decoders()
    return decoders + [self._llm_ocr_decoder]

Decoder priority ensures XML parsers run first, LLM-OCR as fallback.

Error Handling Strategy

  • Top-level handlers: Decoder, manual action, OCA wizard
  • Intermediate methods: Raise exceptions directly (no hiding)
  • User-friendly errors: Clear messages about what failed and why
  • 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:

  1. Updates ir_model_data records from old module name
  2. Adopts orphaned records (prevents FK violations)
  3. 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:

  1. Go to Settings → LLM → Prompts → Invoice Data Extraction (One-Shot)
  2. Edit the instructions argument to add/remove fields
  3. Update the JSON structure in default_values
  4. 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

Contributors

  • Module development and LLM integration
  • OCA invoice import pattern implementation

Maintainers

This module is maintained by Apexive Solutions LLC.

License

LGPL-3

Please log in to comment on this module

  • The author can leave a single reply to each comment.
  • This section is meant to ask simple questions or leave a rating. Every report of a problem experienced while using the module should be addressed to the author directly (refer to the following point).
  • If you want to start a discussion with the author, please use the developer contact information. They can usually be found in the description.
Please choose a rating from 1 to 5 for this module.
Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security

Odoo is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

Website made with