This module allows you to import PDF files and generate records based on the data contained in those PDF files. It also allows you to define a pattern that indicates how to recognize and extract the data from the PDF to generate a record.
auto_awesome What this module does
AI-generated from the code · Odoo 18.0Create templates that read PDF files and automatically generate Odoo records from the data inside them. Upload PDFs, preview the extracted values, and let Odoo create or update the matching records.
This module lets you turn PDF documents into Odoo records automatically. You first create a template where you choose the target model (for example an invoice or a purchase order), optionally a child field for the document lines, and then define lines that say which field to fill, the pattern to find in the PDF text, and how to convert the value (dates, numbers, fixed values, or values looked up in other records).
From a template you can press Preview to upload a sample PDF and see the raw text, the header values, the table information and the line values that would be extracted, so you can check the template before using it.
The Import PDFs wizard lets you upload one or more PDFs. Odoo tries to auto-detect the right template using the auto-detect pattern, extracts the data, and creates or updates the records. If several records are created you get a list; if only one, its form opens directly. The PDF is then attached to the created record.
Templates can be restricted per company, and the module also hooks into incoming email: when a message with a PDF attachment is received with the right option, the PDF is processed automatically. Errors and value changes can be logged as messages on the record.
Depends on
Required by other modules
Menus it adds
Models and fields (8)
- mail.thread · extends an existing model
- base.import.pdf.template · new modelname, model, active, line_ids, model_id (Main Model), company_id (Company), child_model, child_field_id (Child Field), extraction_mode (Extraction mode), child_field_name, auto_detect_pattern (Auto detect pattern)
- wizard.base.import.pdf.mixin · new modelattachment_id, extraction_mode
- base.import.pdf.template.line · new modelmodel, pattern, field_id (Field), sequence, field_name, mapped_ids, value_type (Value type), field_ttype, fixed_value (Fixed value), template_id (Template), default_value (Default value), related_model (Related model), field_relation, search_field_id (Search field), date_time_format (Date/Time Format), fixed_value_char, fixed_value_date, fixed_value_html, fixed_value_text, decimal_separator, fixed_value_float, search_field_name (Search field name), log_distinct_value (Log distint value?), search_field_ttype (Search field type), search_subfield_id (Search subfield), thousand_separator, fixed_value_integer, fixed_value_datetime, search_subfield_name (Search subfield name), fixed_value_selection
- wizard.base.import.pdf.upload · new modeldata, model, line_ids, record_ref, attachment_ids (Files), allowed_template_ids
- wizard.base.import.pdf.preview · new modeldata (RAW data), data_file (File), file_name, table_info (Table info), template_id, total_pages (Total pages), lines_values (Lines values), header_values (Header values), extraction_mode (Extraction mode)
- wizard.base.import.pdf.upload.line · new modeldata, log_text, parent_id, template_id (Template), extraction_mode
- base.import.pdf.template.line.mapped · new modelvalue, origin, parent_id, json_value
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 15.0
Confirmed on 2026-11-03 in branch 15.0 of OCA/edi.
terminal Installation and usage
OCA documentation · Odoo 18.0Configuration
Source · Odoo 18.0To configure a PDF document template for import, the first thing to do is to have the document defined with a specific structure.
- Go to Settings \> Technical \> Base Import PDF Simple \> Templates
- Create a new template by entering a characteristic name and the model on which the record will be generated.
> Fields to consider completing on template: > > > - Main Model: model on which the record will be generated. Example: > > purchase.order > > - Child field: One2many field that will create records from selected > > template. Example: Order Lines (purchase.order) > > - Auto detect pattern: Define a characteristic pattern of the > > document so that it recognizes that it corresponds to the template > > we are creating. Need to use regular expression. Example: > > (?\<=ESA79935607)[Ss]* > > - Header Items: Complete this field if the template has a header > > table to extract information lines. Example: > > Reference,Quantity,Price > > - Company: Set the company that will use the template. If it is > > empty, template will apply for all companies set on the > > environment.
- Add new lines.
> - Related model: When adding new line, the section where to locate the > data; "header" which, as its name indicates, refers to the header of > the document and "lines" refers to the structure of lines or table > of the document. > > - Field: Map the field to be completed. Example: product > > - Pattern: Optional field to complete. Define pattern of the document > so that it recognizes the place to get the field selected on PDF > template. Need to use regular expression. Example: ([0-9]{7}) > [0-7]{1} > > - Value type: > - Fixed: Select this value, if the field mapped will always have an > specific value and not extract the information from template. In > this case Pattern field must be empty. > - Variable: Select variable to get the information from template. In > this case, Pattern field must be completed. > > - For Value type "Variable" will appear extra fields to complete: > > - Search value: Indicates the field by which the value obtained in the > PDF will be searched on the system. > > - Default value: If the search result is empty for the search value > option, you can set default value to create a record and not getting > error message. > > - Log distint value?: This option is useful when getting prices in > order to compare prices inside system and prices obtained from PDF. > This will create lines with prices obtained from the system but > create log on chatter to see the differences obtained from PDF.
- Process PDF templates from mail alias.
> - Create a mail alias > - Set the key "process_pdf_template": True in "Default values"
The record will be created with PDF values
Check demo data to further information.
Usage
Source · Odoo 18.0This module allows to upload PDF files in any Odoo model. It processes each of the files and converts it into a new record. Technically, the pdf is transformed into text and that text is processed to create the record. The module incorporates an option in actions 'Import records (with template)' and Template configuration in order to recognized any document structure.
No verified information in OCA: Installation.
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.