Skip to main content

Extend UBL vendor bill import to automatically match and link bill lines to purchase order lines using the OrderReference and product label.

Project description

Odoo Community Association

Account Edi Ubl Cii Purchase Match

Beta License: AGPL-3 OCA/edi Translate me on Weblate Try me on Runboat

This module extends the UBL vendor bill import process to improve how vendor bill lines are linked to purchase order lines.

Instead of replacing the imported UBL lines with the purchase order lines (standard behavior), this module:

  1. Reads the OrderReference in the UBL document.

  2. Identifies the corresponding Purchase Order using the vendor reference (partner_ref) or the purchase order ref.

  3. Matches each UBL line with a purchase order line based on:

    • product name,

    • supplier product name

  4. Links the vendor bill line to the matched PO line

  5. When a user manually selects a purchase order line from the bill:

    • the system stores the supplier product name,

    • future imports will auto-match using that supplier information.

This ensures accurate line-level linking while preserving the supplier’s invoice data.

Table of contents

Use Cases / Context

In the standard behavior, when importing a vendor bill from a UBL document:

  • If a Purchase Order is found, all imported UBL lines are replaced by the Purchase Order lines.

  • This causes a loss of original UBL data, such as:

    • line-level descriptions,

    • quantities,

    • pricing,

    • tax information received from the supplier.

  • Additionally, the standard flow performs no matching based on product labels, so incorrect PO lines may be added if PO content does not reflect what is actually on the invoice.

Configuration

No configuration is required to use this module.

However, for optimal matching:

  • Ensure that OrderReference in the vendor UBL document corresponds to the Purchase Order Ref or the Vendor Reference (partner_ref).

  • Maintain consistent product names or supplier product names so that UBL line descriptions can be matched to the correct purchase order line.

Optional but recommended:

  • Define supplier product names (product.supplierinfo) to improve matching accuracy.

Usage

  1. Import a vendor bill in UBL format through: Accounting / Vendors / Bills / Upload

  2. The module will automatically:

    • Extract the OrderReference from the UBL.

    • Find the matching purchase order via partner_ref or purchase order ref.

    • Attempt to match each UBL line with the correct purchase order line using:

      • product name,

      • supplier product name

  3. When a match is found: the vendor bill line is linked to the purchase order line.

  4. If no match is found:

    • Click “Select purchase line” button in invoice line

    • Select a purchase order and a purchase order line

Known issues / Roadmap

This module implements custom purchase order line matching and replaces the standard behavior of linking vendor bills to purchase orders via UBL.

Before migrating to future versions, it is recommended to verify whether:

  • Odoo natively supports precise line-level matching,

  • supplier product names and UBL descriptions are matched out of the box,

  • and the original UBL lines are preserved.

If the standard behavior evolves to fully cover this business requirement, this module may become unnecessary.

Bug Tracker

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed feedback.

Do not contact contributors directly about support or help with technical issues.

Credits

Authors

  • ACSONE SA/NV

Contributors

Maintainers

This module is maintained by the OCA.

Odoo Community Association

OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

Current maintainer:

sbejaoui

This module is part of the OCA/edi project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file odoo_addon_account_edi_ubl_cii_purchase_match-16.0.1.0.0.5-py3-none-any.whl.

File metadata

File hashes

Hashes for odoo_addon_account_edi_ubl_cii_purchase_match-16.0.1.0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 0a485a704df11c0a2c9473a05aefe113ff352da78ad997f51bc2d32aaddc96dd
MD5 1a6d82a137377a34c92e6691ea0a028d
BLAKE2b-256 8890c4d189e2d44238c2fcb64116d76bfc6b60f47562dfe91af992382cf81273

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page