Account Edi Ubl Cii Purchase Match
by ACSONE SA/NV https://github.com/OCA/edi , Odoo Community Association (OCA) https://github.com/OCA/edi| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Purchase (purchase)
• Invoicing (account) • Discuss (mail) |
| Lines of code | 510 |
| Technical Name |
account_edi_ubl_cii_purchase_match |
| License | AGPL-3 |
| Website | https://github.com/OCA/edi |
Account Edi Ubl Cii Purchase Match

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.
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
- 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
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
- Souheil Bejaoui souheil.bejaoui@acsone.eu
Maintainers
This module is maintained by the OCA.
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:

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.
Please log in to comment on this module