Account Edi Ubl Cii Purchase Match
account_edi_ubl_cii_purchase_match · OCA/edi
-
Security25/25No findings
-
Activity25/25Last human commit 3 months ago
-
Required by15/251 module depends on it
-
Maturity5/25In 1 Odoo series since 16.0
Heuristic over the facts below, not an audit · How it's computed
Migration considerations
account_move_form_view— Migrating to 17.0: `attrs=`/`states=` are rejected in views: convert them to Python expressions in `invisible`/`readonly`/`required`, keeping the original AND/OR logic. migration-view-attrs-states · source
Migration review checklist, not a compatibility verdict. "Migrating to X.0" applies once you upgrade to that version; "Since X.0" means this version already ignores or rejects that code. Methodology
Description
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.
Dependencies
Code analysis
Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.
Views touched 3
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
account_move_form_view |
account.move | form | Inherits account.view_move_form | |
account_move_line_select_purchase_line_wizard_form_view |
account.move.line.select.purchase.line.wizard | form | New | |
purchase_order_line_form_view |
purchase.order.line | form | Inherits purchase.purchase_order_line_form2 |
HTTP endpoints 0
No HTTP endpoints found for this module.
Models touched 4
No new fields.
Public methods (0)No public methods.
-
purchase_mismatchBooleancompute='_compute_purchase_mismatch'help='Checked when this invoice has at least one line that does not fully match its related purchase order line.' -
purchase_mismatch_detailsTextcompute='_compute_purchase_mismatch'help='Human-readable description of the differences between invoice lines and their related purchase order lines.' -
purchase_other_mismatchBooleancompute='_compute_purchase_mismatch'help='Checked when this invoice has at least one line with a non-quantity mismatch against its related purchase order line.' -
purchase_other_mismatch_countIntegercompute='_compute_purchase_mismatch'help='Number of invoice lines with non-quantity mismatches.' -
purchase_other_mismatch_summaryCharcompute='_compute_purchase_mismatch'help='Short summary of non-quantity mismatches.' -
purchase_quantity_mismatchBooleancompute='_compute_purchase_mismatch'help='Checked when this invoice has at least one line with a quantity mismatch against its related purchase order line.' -
purchase_quantity_mismatch_countIntegercompute='_compute_purchase_mismatch'help='Number of invoice lines with quantity mismatches.' -
purchase_quantity_mismatch_summaryCharcompute='_compute_purchase_mismatch'help='Short summary of quantity mismatches.'
No public methods.
-
purchase_line_mismatchBooleancompute='_compute_purchase_line_mismatch'help='Checked when this invoice line does not fully match its related purchase order line.' -
purchase_line_mismatch_summaryCharcompute='_compute_purchase_line_mismatch'help='Short description of the purchase order matching issue.' -
purchase_line_other_mismatchBooleancompute='_compute_purchase_line_mismatch'help='Checked when this invoice line has a non-quantity mismatch with its related purchase order line.' -
purchase_line_other_mismatch_detailsTextcompute='_compute_purchase_line_mismatch'help='Human-readable description of the non-quantity differences between this invoice line and the related purchase order line.' -
purchase_line_quantity_mismatchBooleancompute='_compute_purchase_line_mismatch'help='Checked when this invoice line has a quantity mismatch with its related purchase order line.' -
purchase_line_quantity_mismatch_detailsTextcompute='_compute_purchase_line_mismatch'help='Human-readable description of the quantity differences between this invoice line and the related purchase order line.' -
supplier_product_codeCharreadonly=True
-
action_select_purchase_line(self) -
action_show_purchase_line(self) -
action_show_purchase_line_mismatch_details(self)
-
currency_idMany2onerelated='move_line_id.currency_id' -
descriptionCharrelated='move_line_id.name' -
move_line_idMany2one → account.move.linecomodel_name='account.move.line'readonly=Truerequired=True -
move_line_price_subtotalMonetaryrelated='move_line_id.price_subtotal'string='Move line Subtotal' -
move_line_price_unitFloatrelated='move_line_id.price_unit'string='Move line Unit Price' -
move_line_quantityFloatrelated='move_line_id.quantity' -
partner_idMany2one → res.partnercomodel_name='res.partner'readonly=True -
po_line_price_subtotalMonetaryrelated='purchase_order_line_id.price_subtotal'string='PO line Subtotal' -
po_line_price_unitFloatrelated='purchase_order_line_id.price_unit'string='PO line Unit Price' -
po_line_product_uom_qtyFloatrelated='purchase_order_line_id.product_uom_qty'string='Ordered Qty' -
po_line_qty_invoicedFloatrelated='purchase_order_line_id.qty_invoiced' -
po_line_qty_receivedFloatrelated='purchase_order_line_id.qty_received' -
product_domainBinarycompute='_compute_product_domain' -
product_idMany2one → product.productcomodel_name='product.product'domain='product_domain' -
purchase_order_idsMany2many → purchase.ordercomodel_name='purchase.order'domain="[('partner_id', '=', partner_id), ('state', 'in', ('purchase', 'done'))]"relation='account_move_line_purchase_match_wizard_rel' -
purchase_order_line_idMany2one → purchase.order.linecomodel_name='purchase.order.line'compute='_compute_purchase_order_line_id'domain="[('order_id', 'in', purchase_order_ids), ('product_id', '=', product_id)]"readonly=Falsestore=Truestring='Line'
-
select_purchase_line(self)