Repository
OCA/edi · module folder · Try on Runboat
Module version
1.0.0
Category
Uncategorized
Folder size
0.1 MB
License
AGPL-3
Application
No
Auto-installable
No
Website
https://github.com/OCA/edi
Last tracking update
2026-08-07 09:06:21
Authors
ACSONE SA/NV, Odoo Community Association (OCA), BCIM
Maintainers
ACSONE SA/NV, Odoo Community Association (OCA), BCIM
Committers
Ricardoalso, Maksym Yankin, OCA-git-bot, oca-ci
Odoo dependencies
Python dependencies
None
System dependencies
None
Required by
None
Description
This module will support import despatch advice file

Code Analysis

Views touched (1)
XML IDNameModelTypeStatus
despatch_advice_import_form_view despatch.advice.import (in purchase_order_import) despatch.advice.import form New
HTTP endpoints (0)

No HTTP endpoints found for this module.

Models touched (1)

New fields (3)
  • allow_validate_over_qty Boolean
    default=True args: 'Allow Validate Over Quantity'
  • document Binary
    help='Upload an Despatch Advice file that you received from your supplier. Supported formats: XML and PDF (PDF with an embeded XML file).' required=True string='XML or PDF Despatch Advice'
  • filename Char
    string='File Name'
Public methods (6)
  • get_xml_files_from_pdf(self, document: bytes)
    @api.model
    Return embedded XML attachments from a PDF as parsed XML roots. :param document: The raw content of the uploaded PDF file, as bytes. :return: A dict mapping embedded XML filenames to parsed XML root elements.
  • parse_despatch_advice(self, document: bytes, filename: str)
    @api.model
    Parse an uploaded XML or PDF document into a normalized dict. :param document: The raw content of the uploaded file, as bytes. :param filename: The name of the uploaded file, used to detect the file type. :return: A dict with the parsed despatch advice data, in a normalized format.
  • parse_pdf_despatch_advice(self, document: bytes)
    @api.model
    Extract embedded XML files from a PDF and parse the first supported one. :param document: The raw content of the uploaded PDF file, as bytes. :return: A normalized dict containing the parsed despatch advice data.
  • parse_xml_despatch_advice(self, xml_root: etree._Element)
    @api.model
    Parse a despatch advice XML tree with a format-specific implementation. :param xml_root: The parsed XML root element to interpret. :return: A normalized dict containing the parsed despatch advice data.
  • process_data(self, parsed_order_document: dict)
    Apply the parsed despatch advice to the matching purchase moves. :param parsed_order_document: The normalized despatch advice data to apply.
  • process_document(self)
    Decode the uploaded file, parse it, and apply its stock impact.

Loading…