OdooWiki OCA HUB

Account Edi Ubl Cii Purchase Match

account_edi_ubl_cii_purchase_match folder_open OCA/edi open_in_new
Uncategorised License: AGPL-3

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:

  • Reads the OrderReference in the UBL document.
  • Identifies the corresponding Purchase Order using the vendor reference

(partner_ref) or the purchase order ref.

  • Matches each UBL line with a purchase order line based on:
  • product name,
  • supplier product name
  • Links the vendor bill line to the matched PO line
  • 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.

auto_awesome What this module does

AI-generated from the code · Odoo 16.0

When a vendor bill is imported from a UBL e-invoice, this module reads the purchase order reference in the document and links each bill line to the matching purchase order line. It also flags and explains any quantity or price differences between the bill and the order.

This module improves how imported vendor bills are connected to purchase orders. When a UBL electronic invoice is imported, the system looks for a purchase order reference in the document, finds the confirmed or done purchase order, and tries to link each bill line to an order line. A line is linked when the product, the description, the product name, the supplier product code or the supplier product name matches.

On a draft vendor bill, each invoice line shows small buttons: one opens the linked purchase order line, another opens a window to pick a purchase order line manually. In that window you choose the purchase orders, the product and the order line, and the bill line is updated. The supplier product code is then saved on the product's supplier information so future imports can match automatically.

A warning banner appears at the top of the bill when differences are found. Lines with a quantity difference are highlighted in red and lines with a price difference in orange. A badge column shows a short alert, and an info button displays the details as notifications. Quantity differences compare invoiced quantity with ordered quantity, and with received quantity when the product is invoiced on received quantities. Price differences compare the bill unit price with the order unit price.

The module touches vendor bills (account.move), bill lines (account.move.line) and purchase order lines, and adds a selection wizard for account users.

Depends on

account_edi_ubl_ciipurchaseweb_notify
Models and fields (3)
  • account.move · extends an existing modelpurchase_mismatch, purchase_other_mismatch, purchase_mismatch_details, purchase_quantity_mismatch, purchase_other_mismatch_count, purchase_other_mismatch_summary, purchase_quantity_mismatch_count, purchase_quantity_mismatch_summary
  • account.move.line · extends an existing modelsupplier_product_code, purchase_line_mismatch, purchase_line_other_mismatch, purchase_line_mismatch_summary, purchase_line_quantity_mismatch, purchase_line_other_mismatch_details, purchase_line_quantity_mismatch_details
  • account.move.line.select.purchase.line.wizard · new modelpartner_id, product_id, currency_id, description, move_line_id, product_domain, move_line_quantity, po_line_price_unit (PO line Unit Price), purchase_order_ids, move_line_price_unit (Move line Unit Price), po_line_qty_invoiced, po_line_qty_received, po_line_price_subtotal (PO line Subtotal), purchase_order_line_id (Line), po_line_product_uom_qty (Ordered Qty), move_line_price_subtotal (Move line Subtotal)

Text generated by AI (DeepSeek) from reading the Odoo 16.0 code on GitHub; it may contain mistakes, so check the code before deciding. View the code on GitHub

Availability by version

Reviewed: 2026-11-03
Confirmed (verified in repository and branch) Estimated (unverified) No information

Confirmation status: 1 confirmed, 8 with no information of 9 versions.

terminal Installation and usage

OCA documentation · Odoo 16.0

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.

  • Import a vendor bill in UBL format through: Accounting / Vendors / Bills / Upload
  • 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
  • When a match is found: the vendor bill line is linked to the purchase order line.
  • If no match is found:
  • Click "Select purchase line" button in invoice line
  • Select a purchase order and a purchase order line

No verified information in OCA: Installation.

info

Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.