Import simple PDF vendor bills
Project description
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 this blog post.
Table of contents
Installation
This module requires several Python libraries:
PyMuPDF which is a Python binding for MuPDF, a lightweight PDF toolkit/viewer/renderer published under the AGPL licence by the company Artifex Software
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.
If you use Debian (Bullseye or higher) or Ubuntu (20.04 or higher), run the following command:
sudo apt install python3-fitz python3-regex python3-dateparser
You can also install these Python librairies via pip:
sudo pip3 install --upgrade PyMuPDF regex dateparser
but beware that PyMuPDF is just a binding on MuPDF, so it will require MuPDF and all the development libs required to compile the binding. So, for PyMuPDF, it’s much easier to install it via the packages of your Linux distribution (package name python3-fitz on Debian/Ubuntu, but the package name may be different in other distributions).
Configuration
You will find a full demonstration about how to configure and use this module in this screencast.
Bug Tracker
Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed feedback.
Do not contact contributors directly about support or help with technical issues.
Credits
Contributors
Alexis de Lattre <alexis.delattre@akretion.com>
Maintainers
This module is maintained by the OCA.
OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.
Current maintainer:
This module is part of the OCA/edi project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Hashes for odoo14_addon_account_invoice_import_simple_pdf-14.0.1.0.2.dev4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 58f645b818cfbab1fb296fe5859ba04cefccd2d5163e714f8b14467768f7cc80 |
|
MD5 | f13455093d73c6b79eb74265754266b1 |
|
BLAKE2b-256 | e0adb3707681c24b6e1f283d54bb01bc0ef8b7dec19188302cf0cb5f95248480 |