Skip to content
Health
67/100
fair
  • Security25/25
    No findings
  • Activity25/25
    Last human commit 5 months ago
  • Required by5/25
    0 modules depend on it
  • Maturity12/25
    In 2 Odoo series since 16.0

Heuristic over the facts below, not an audit · How it's computed

Security findings
Grave / minor (static analysis)
Required by
0
Modules depending on it
External deps
0 pip · 0 bin
Python packages / system binaries
License
AGPL-3
No conflicts with its dependencies
Folder size
0.1 MB
Module directory on disk
Code analysis 0 migration notes 1 model 1 view 0 HTTP endpoints

Description

This module will support import despatch advice file

Dependencies

Odoo dependencies
Python dependencies
None
System dependencies
None
Required by
None

Code analysis

Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.

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…