TIP: You can type at any time to perform a new search.
Base Import Pdf by Template
base_import_pdf_by_template · OCA/edi
- Repository
- OCA/edi · module folder · Try on Runboat
- Module version
- Category
- Uncategorized
- Folder size
- 0.25 MB
- License
- AGPL-3
- Application
- No
- Auto-installable
- No
- Website
- https://github.com/OCA/edi
- Last tracking update
- 2026-08-11 17:15:20
- Authors
- Odoo Community Association (OCA), Tecnativa
- Maintainers
- Odoo Community Association (OCA), Tecnativa
- Committers
- Pedro M. Baeza, Víctor Martínez, Weblate, OCA-git-bot, oca-ci, David Bañón, cristina-hidalgo-tecnativa
- Odoo dependencies
- Python dependencies
- pypdf
- System dependencies
- None
- Required by
- base_import_pdf_by_template_account, test_base_import_pdf_by_template
- Description
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.
Code Analysis ⓘ
Views touched (7)
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
base_import_pdf_template_line_view_form |
base.import.pdf.template.line.form | base.import.pdf.template.line | form | New |
base_import_pdf_template_line_view_tree |
base.import.pdf.template.line.tree | base.import.pdf.template.line | list | New |
base_import_pdf_template_view_form |
base.import.pdf.template.form | base.import.pdf.template | form | New |
base_import_pdf_template_view_search |
base.import.pdf.template.search | base.import.pdf.template | search | New |
base_import_pdf_template_view_tree |
base.import.pdf.template.tree | base.import.pdf.template | list | New |
view_wizard_base_import_pdf_preview_form |
wizard.base.import.pdf.preview | form | New | |
view_wizard_base_import_pdf_upload_form |
wizard.base.import.pdf.upload | form | New |
HTTP endpoints (0)
No HTTP endpoints found for this module.
Models touched (8)
New fields (11)
-
activeBooleandefault=True -
auto_detect_patternCharhelp='It will be necessary to set a patter that only finds something\n in the documents for this template.'string='Auto detect pattern' -
child_field_idMany2one → ir.model.fieldscomodel_name='ir.model.fields'domain="[('model_id.model', '=', model), ('ttype', '=', 'one2many')]"ondelete='cascade'string='Child Field' -
child_field_nameCharrelated='child_field_id.name' -
child_modelCharcompute='_compute_child_model'compute_sudo=Truestore=True -
company_idMany2one → res.companycomodel_name='res.company'string='Company' -
extraction_modeSelectiondefault='pypdf'selection=[('pypdf', 'Pypdf')]string='Extraction mode' -
line_idsOne2many → base.import.pdf.template.linecomodel_name='base.import.pdf.template.line'copy=Trueinverse_name='template_id' -
modelCharcompute='_compute_model'compute_sudo=Truestore=True -
model_idMany2one → ir.modelcomodel_name='ir.model'domain=[('transient', '=', False), ('model', 'not like', 'base.import.pdf')]ondelete='cascade'required=Truestring='Main Model' -
nameCharrequired=True
-
button_preview(self)
New fields (32)
-
date_formatSelectionselection='_selection_date_format' -
decimal_separatorSelectiondefault='dot'selection=[('dot', 'Dot (.)'), ('comma', 'Comma (,)')] -
default_valueReferenceselection='_selection_reference_value'string='Default value' -
field_idMany2one → ir.model.fieldscomodel_name='ir.model.fields'domain="[('model_id.model', '=', model), ('store', '=', True)]"ondelete='cascade'required=Truestring='Field' -
field_nameCharrelated='field_id.name' -
field_relationCharrelated='field_id.relation' -
field_ttypeSelectionrelated='field_id.ttype' -
fixed_valueReferenceselection='_selection_reference_value'string='Fixed value' -
fixed_value_charChar -
fixed_value_dateDate -
fixed_value_datetimeDatetime -
fixed_value_floatFloat -
fixed_value_htmlHtml -
fixed_value_integerInteger -
fixed_value_selectionMany2one → ir.model.fields.selectioncomodel_name='ir.model.fields.selection'domain="[('field_id', '=', field_id)]" -
fixed_value_textText -
log_distinct_valueBooleanhelp='A note will be added with the previous value and the indicated value if\n they are different.'string='Log distint value?' -
mapped_idsOne2many → base.import.pdf.template.line.mappedcomodel_name='base.import.pdf.template.line.mapped'inverse_name='parent_id' -
modelCharcompute='_compute_model'store=True -
patternChar -
related_modelSelectiondefault='header'selection='_selection_related_model'string='Related model' -
search_field_idMany2one → ir.model.fieldscomodel_name='ir.model.fields'domain="[('model_id.model', '=', field_relation)]"string='Search field' -
search_field_nameCharrelated='search_field_id.name'string='Search field name' -
search_field_relationCharrelated='search_field_id.relation'string='Search field relation' -
search_field_ttypeSelectionrelated='search_field_id.ttype'string='Search field type' -
search_subfield_idMany2one → ir.model.fieldscomodel_name='ir.model.fields'domain="[('model_id.model', '=', search_field_relation)]"string='Search subfield' -
search_subfield_nameCharrelated='search_subfield_id.name'string='Search subfield name' -
sequenceIntegerdefault=10 -
template_idMany2one → base.import.pdf.templatecomodel_name='base.import.pdf.template'ondelete='cascade'required=Truestring='Template' -
thousand_separatorSelectiondefault='none'selection='_selection_thousand_separator' -
time_formatSelectionselection='_selection_time_format' -
value_typeSelectiondefault='variable'selection='_selection_value_type'string='Value type'
No public methods.
New fields (4)
-
json_valueText -
originChar -
parent_idMany2one → base.import.pdf.template.linecomodel_name='base.import.pdf.template.line'required=True -
valueReferenceselection='_selection_reference_value'
No public methods.
New fields (0)
No new fields.
Public methods (1)-
message_new(self, msg_dict, custom_values=None)
New fields (2)
-
attachment_idMany2one → ir.attachmentcomodel_name='ir.attachment' -
extraction_modeChar
-
simple_pdf_text_extraction(self, file_data)
New fields (9)
-
dataTextreadonly=Truestring='RAW data' -
data_fileBinaryattachment=Truestring='File' -
extraction_modeSelectiondefault='pypdf'selection=[('pypdf', 'Pypdf')]string='Extraction mode' -
file_nameCharstore=True -
header_valuesTextreadonly=Truestring='Header values' -
lines_valuesTextreadonly=Truestring='Lines values' -
table_infoTextreadonly=Truestring='Table info' -
template_idMany2one → base.import.pdf.templatecomodel_name='base.import.pdf.template'readonly=True -
total_pagesIntegerreadonly=Truestring='Total pages'
-
default_get(self, fields)@api.model
New fields (6)
-
allowed_template_idsMany2many → base.import.pdf.templatecomodel_name='base.import.pdf.template'compute='_compute_allowed_template_ids' -
attachment_idsMany2many → ir.attachmentcomodel_name='ir.attachment'string='Files' -
dataTextcompute='_compute_data'store=True -
line_idsOne2many → wizard.base.import.pdf.upload.linecomodel_name='wizard.base.import.pdf.upload.line'inverse_name='parent_id' -
modelChar -
record_refReferenceselection='_selection_reference_value'
-
action_process(self)Creamos las lineas, auto-detección + procesar cada línea.
New fields (5)
-
dataText -
extraction_modeSelectionrelated='template_id.extraction_mode' -
log_textHtml -
parent_idMany2one → wizard.base.import.pdf.uploadcomodel_name='wizard.base.import.pdf.upload' -
template_idMany2one → base.import.pdf.templatecomodel_name='base.import.pdf.template'compute='_compute_template_id'store=Truestring='Template'
-
action_process(self)Parse the file again, this time with the corresponding extraction mode.
Loading…
Loading…