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
odoo/odoo:
- web
- bus
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 IDNameModelTypeStatus
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)
  • active Boolean
    default=True
  • auto_detect_pattern Char
    help='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_id Many2one → ir.model.fields
    comodel_name='ir.model.fields' domain="[('model_id.model', '=', model), ('ttype', '=', 'one2many')]" ondelete='cascade' string='Child Field'
  • child_field_name Char
    related='child_field_id.name'
  • child_model Char
    compute='_compute_child_model' compute_sudo=True store=True
  • company_id Many2one → res.company
    comodel_name='res.company' string='Company'
  • extraction_mode Selection
    default='pypdf' selection=[('pypdf', 'Pypdf')] string='Extraction mode'
  • line_ids One2many → base.import.pdf.template.line
    comodel_name='base.import.pdf.template.line' copy=True inverse_name='template_id'
  • model Char
    compute='_compute_model' compute_sudo=True store=True
  • model_id Many2one → ir.model
    comodel_name='ir.model' domain=[('transient', '=', False), ('model', 'not like', 'base.import.pdf')] ondelete='cascade' required=True string='Main Model'
  • name Char
    required=True
Public methods (1)
  • button_preview(self)

New fields (32)
  • date_format Selection
    selection='_selection_date_format'
  • decimal_separator Selection
    default='dot' selection=[('dot', 'Dot (.)'), ('comma', 'Comma (,)')]
  • default_value Reference
    selection='_selection_reference_value' string='Default value'
  • field_id Many2one → ir.model.fields
    comodel_name='ir.model.fields' domain="[('model_id.model', '=', model), ('store', '=', True)]" ondelete='cascade' required=True string='Field'
  • field_name Char
    related='field_id.name'
  • field_relation Char
    related='field_id.relation'
  • field_ttype Selection
    related='field_id.ttype'
  • fixed_value Reference
    selection='_selection_reference_value' string='Fixed value'
  • fixed_value_char Char
  • fixed_value_date Date
  • fixed_value_datetime Datetime
  • fixed_value_float Float
  • fixed_value_html Html
  • fixed_value_integer Integer
  • fixed_value_selection Many2one → ir.model.fields.selection
    comodel_name='ir.model.fields.selection' domain="[('field_id', '=', field_id)]"
  • fixed_value_text Text
  • log_distinct_value Boolean
    help='A note will be added with the previous value and the indicated value if\n they are different.' string='Log distint value?'
  • mapped_ids One2many → base.import.pdf.template.line.mapped
    comodel_name='base.import.pdf.template.line.mapped' inverse_name='parent_id'
  • model Char
    compute='_compute_model' store=True
  • pattern Char
  • related_model Selection
    default='header' selection='_selection_related_model' string='Related model'
  • search_field_id Many2one → ir.model.fields
    comodel_name='ir.model.fields' domain="[('model_id.model', '=', field_relation)]" string='Search field'
  • search_field_name Char
    related='search_field_id.name' string='Search field name'
  • search_field_relation Char
    related='search_field_id.relation' string='Search field relation'
  • search_field_ttype Selection
    related='search_field_id.ttype' string='Search field type'
  • search_subfield_id Many2one → ir.model.fields
    comodel_name='ir.model.fields' domain="[('model_id.model', '=', search_field_relation)]" string='Search subfield'
  • search_subfield_name Char
    related='search_subfield_id.name' string='Search subfield name'
  • sequence Integer
    default=10
  • template_id Many2one → base.import.pdf.template
    comodel_name='base.import.pdf.template' ondelete='cascade' required=True string='Template'
  • thousand_separator Selection
    default='none' selection='_selection_thousand_separator'
  • time_format Selection
    selection='_selection_time_format'
  • value_type Selection
    default='variable' selection='_selection_value_type' string='Value type'
Public methods (0)

No public methods.

New fields (4)
  • json_value Text
  • origin Char
  • parent_id Many2one → base.import.pdf.template.line
    comodel_name='base.import.pdf.template.line' required=True
  • value Reference
    selection='_selection_reference_value'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (1)
  • message_new(self, msg_dict, custom_values=None)

New fields (2)
  • attachment_id Many2one → ir.attachment
    comodel_name='ir.attachment'
  • extraction_mode Char
Public methods (1)
  • simple_pdf_text_extraction(self, file_data)

New fields (9)
  • data Text
    readonly=True string='RAW data'
  • data_file Binary
    attachment=True string='File'
  • extraction_mode Selection
    default='pypdf' selection=[('pypdf', 'Pypdf')] string='Extraction mode'
  • file_name Char
    store=True
  • header_values Text
    readonly=True string='Header values'
  • lines_values Text
    readonly=True string='Lines values'
  • table_info Text
    readonly=True string='Table info'
  • template_id Many2one → base.import.pdf.template
    comodel_name='base.import.pdf.template' readonly=True
  • total_pages Integer
    readonly=True string='Total pages'
Public methods (1)
  • default_get(self, fields)
    @api.model

New fields (6)
  • allowed_template_ids Many2many → base.import.pdf.template
    comodel_name='base.import.pdf.template' compute='_compute_allowed_template_ids'
  • attachment_ids Many2many → ir.attachment
    comodel_name='ir.attachment' string='Files'
  • data Text
    compute='_compute_data' store=True
  • line_ids One2many → wizard.base.import.pdf.upload.line
    comodel_name='wizard.base.import.pdf.upload.line' inverse_name='parent_id'
  • model Char
  • record_ref Reference
    selection='_selection_reference_value'
Public methods (1)
  • action_process(self)
    Creamos las lineas, auto-detección + procesar cada línea.

New fields (5)
  • data Text
  • extraction_mode Selection
    related='template_id.extraction_mode'
  • log_text Html
  • parent_id Many2one → wizard.base.import.pdf.upload
    comodel_name='wizard.base.import.pdf.upload'
  • template_id Many2one → base.import.pdf.template
    comodel_name='base.import.pdf.template' compute='_compute_template_id' store=True string='Template'
Public methods (1)
  • action_process(self)
    Parse the file again, this time with the corresponding extraction mode.

Loading…

Loading…