This module is an extension of the module account_invoice_import: it adds support for simple PDF invoices i.e. PDF invoice that don't have an embedded XML file. This module has been developped to solve the drawbacks of the OCA module account_invoice_import_invoice2data ; its advantages are the following:
- Possibility to add support for a new vendor without developper skills: the accountant can do it!
- Adding support for a new vendor is faster.
- More tolerance on vendor invoice layout changes.
- Easier to install.
With this module, you can import all the invoices that you were able to import with the module account_invoice_import_invoice2data. In fact, this module uses the same design when importing a PDF vendor bill:
- raw text extraction of the PDF file,
- identify the partner using the VAT number (if the VAT number is present in the raw text extraction) or some keywords,
- use regular expressions (regex) to extract the data needed to create the vendor bill in Odoo (single line configuration).
The main difference with the OCA module account_invoice_import_invoice2data is that the regular expressions are auto-generated from the configuration made by the user in Odoo. No need to be a regex expert! But you can still write regex to extract some fields for some very specific needs.
The module can extract the following fields:
- Total Amount with taxes
- Total Untaxed Amount
- Total Tax Amount
- Invoice Date
- Due Date
- Start Date
- End Date
- Invoice Number
- Description (for that field, you have to write a regex)
In this list, only 3 fields are required:
- Invoice Date
- 2 out of the 3 Amount fields (the 3rd can be deducted from the 2 others: Total Amount = Total Untaxed + Total Tax)
To take advantage of the fields Start Date and End Date, you need the OCA module account_invoice_start_end_dates from the account-closing project.
To know the full story behind the development of this module, read Akretion's blog post.
auto_awesome What this module does
AI-generated from the code · Odoo 18.0Lets accountants import vendor bills supplied as plain PDF files (without embedded XML) by teaching Odoo, per vendor, how to read the text of the PDF and extract the invoice number, dates and amounts.
This module extends the invoice import wizard so that plain PDF vendor bills can be turned into draft bills. When a PDF has no embedded structured file, Odoo extracts the text from the PDF and tries to read the key data from it.
On each vendor (contact) form you get a new section where you describe that vendor's PDF layout: - a keyword (or several separated by '|') used to recognise the vendor, otherwise the VAT number is used; - the date format and date separator, the decimal and thousand separators, and the currency used on the invoice; - whether the text is analysed on the first page only or on all pages; - a list of fields to extract (total, untaxed amount, tax amount, invoice date, due date, start/end dates, invoice number, description), each with optional start/end strings to cut the text, an optional specific regular expression, and a rule saying which occurrence to keep (first, last, minimum, maximum or a given position); - a list of invoice number format elements (fixed characters, letters, digits, spaces, year, month) that together describe how the vendor numbers its invoices.
A test area lets you upload a sample PDF and see the extracted text and the result found for each field, with errors shown in red, so the setup can be checked without importing a real bill.
Business rules: a date rule and at least one amount rule are required, and if only one amount is configured it must be the total; the description field requires a regular expression; decimal and thousand separators cannot be identical; positions and occurrences must be positive. The module touches res.partner and the invoice import wizard account.invoice.import.
Depends on
Required by other modules
Models and fields (4)
- res.partner · extends an existing modelsimple_pdf_pages (Page Analysis), simple_pdf_keyword, simple_pdf_field_ids (Fields for PDF Invoice Import), simple_pdf_test_file (Test PDF Invoice File), simple_pdf_currency_id (Invoice Import Currency), simple_pdf_date_format (Date Format), simple_pdf_test_results (Test Results), simple_pdf_test_filename (Test PDF Invoice Filename), simple_pdf_test_raw_text (Test Text Extraction), simple_pdf_date_separator (Date Separator), simple_pdf_decimal_separator (Decimal Separator), simple_pdf_invoice_number_ids (Invoice Import Number Format), simple_pdf_thousand_separator (Thousand Separator)
- account.invoice.import · extends an existing model
- account.invoice.import.simple.pdf.fields · new modelend (End String), name (Field), start (Start String), regexp (Specific Regular Expression), position, sequence, partner_id (Vendor), date_format (Specific Date Format), extract_rule, date_separator (Specific Date Separator)
- account.invoice.import.simple.pdf.invoice.number · new modelsequence, fixed_char, partner_id (Vendor), string_type (Type), occurrence_max (Maximum Occurence), occurrence_min (Minimum Occurence)
Text generated by AI (DeepSeek) from reading the Odoo 18.0 code on GitHub; it may contain mistakes, so check the code before deciding. The module is very large and only part of the code was read. View the code on GitHub
Availability by version
Reviewed: 2026-11-03Confirmation status: 3 confirmed, 6 with no information of 9 versions.
Sources · Odoo 14.0
Confirmed on 2026-11-03 in branch 14.0 of OCA/edi.
terminal Installation and usage
OCA documentation · Odoo 18.0Installation
Source · Odoo 18.0The most important technical component of this module is the tool that converts the PDF to text. Converting PDF to text is not an easy job. As outlined in this blog post, different tools can give quite different results. The best results are usually achieved with tools based on a PDF viewer, which exclude pure-python tools. But pure-python tools are easier to install than tools based on a PDF viewer. It is important to understand that, if you change the PDF to text tool, you will certainly have a slightly different text output, which may oblige you to update the field extraction rule, which can be time-consuming if you have already configured many vendors.
The module supports 5 different extraction methods:
- PyMuPDF which is a Python binding for MuPDF, a lightweight PDF toolkit/viewer/renderer published under the AGPL licence by the company Artifex Software.
- pdftotext python library, which is a python binding for the pdftotext tool.
- pdftotext command line tool, which is based on poppler, a PDF rendering library used by xpdf and Evince (the PDF reader of Gnome).
- pypdf, which is one of the most common PDF lib for Python. pypdf is a pure-python solution, so it's very easy to install on all OSes.
PyMuPDF and pdftotext both give a very good text output. So far, I can't say which one is best. pypdf often gives lower-quality text output, but its advantage is that it is a pure-Python librairy, so you will always be able to install it whatever your technical environnement is.
You can choose one extraction method and only install the tools/libs for that method.
Install PyMuPDF
Install it via pip:
pip3 install --upgrade pymupdfBeware that PyMuPDF is not a pure-python library: it uses MuPDF, which is written in C language. If a python wheel for your OS, CPU architecture and Python version is available on pypi (check the list of PyMuPDF wheels on pypi), it will install smoothly. Otherwize, the installation via pip will require MuPDF and all its development libs to compile the binding.
Install pdftotext python lib
To install pdftotext python lib, run:
sudo apt install build-essential libpoppler-cpp-dev pkg-config python3-devand then install the lib via pip:
pip3 install --upgrade pdftotextOn OSes other than Debian/Ubuntu, follow the instructions on the project page.
Install pdftotext command line
To install pdftotext command line, run:
sudo apt install poppler-utilsInstall pypdf
To install the pypdf python lib, run:
pip3 install --upgrade pypdfOther requirements
This module also requires the following Python libraries:
- regex which is backward-compatible with the re module of the Python standard library, but has additional functionalities.
- dateparser which is a powerful date parsing library.
The dateparser lib depends itself on regex. So you can install these Python libraries via pip with the following command:
pip3 install --upgrade dateparserThe dateparser lib is not compatible with all regex lib versions. As of February 2024, the version requirement declared by dateparser for regex is !=2019.02.19, !=2021.8.27. So the latest version of dateparser is currenly compatible with the latest version of regex. To know the version of regex installed in your environment, run:
pip3 show regexConfiguration
Source · Odoo 18.0By default, for the PDF to text conversion, the module tries the different methods in the order mentionned in the INSTALL section: it will first try to use PyMuPDF; if it fails (for example because the lib is not properly installed), then it will try to use the pdftotext python lib, if that one also fails, it will try to use pdftotext command line and, if it also fails, it will eventually try pypdf. If none of the 4 methods work, Odoo will display an error message.
If you want to force Odoo to use a specific text extraction method, go to the menu Configuration \> Technical \> Parameters \> System Parameters and create a new System Parameter:
- Key: invoice_import_simple_pdf.pdf2txt
- Value: select the proper value for the method you want to use:
- pymupdf
- pdftotext.lib
- pdftotext.cmd
- pypdf
In this configuration, Odoo will only use the selected text extraction method and, if it fails, it will display an error message.
You will find a full demonstration about how to configure each Vendor and import the PDF invoices in this screencast.
No verified information in OCA: Usage.
Installation instructions, the distribution package, dependencies and configuration steps are not shown because they have not yet been verified in the module documentation for any version.
Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.