Account Edi Ubl Cii Purchase Match

account_edi_ubl_cii_purchase_match
REPOSITORY
REPOSITORYOCA/edi
GIT
GIThttps://github.com/OCA/edi.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/edi/tree/16.0/account_edi_ubl_cii_purchase_match
VERSION
VERSION 1.0.0
CATEGORY
CATEGORYUncategorized
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), ACSONE SA/NV
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), ACSONE SA/NV
COMMITTERS
COMMITTERSWeblate, OCA-git-bot, oca-ci, Souheil Bejaoui
WEBSITE
WEBSITEhttps://github.com/OCA/edi
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 19:11:59
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - account_edi_ubl_cii
    - account_edi
    - account
    - base_setup
    - base
    - web
    - product
    - mail
    - bus
    - web_tour
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
    - purchase
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
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:

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.

Code Analysis

Views touched (3)
XML IDNameModelTypeStatus
account_move_form_view account.move xpath 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 xpath Inherits purchase.purchase_order_line_form2
Models touched (4)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (2)
  • purchase_mismatch Boolean
    compute='_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_details Text
    compute='_compute_purchase_mismatch' help='Human-readable description of the differences between invoice lines and their related purchase order lines.'
Public methods (0)

No public methods.

New fields (3)
  • purchase_line_mismatch Boolean
    compute='_compute_purchase_line_mismatch' help='Checked when this invoice line does not fully match its related purchase order line.'
  • purchase_line_mismatch_details Text
    compute='_compute_purchase_line_mismatch' help='Human-readable description of the differences between this invoice line and the related purchase order line.'
  • supplier_product_code Char
    readonly=True
Public methods (2)
  • action_select_purchase_line(self)
  • action_show_purchase_line(self)

New fields (16)
  • currency_id Many2one
    related='move_line_id.currency_id'
  • description Char
    related='move_line_id.name'
  • move_line_id Many2one → account.move.line
    comodel_name='account.move.line' readonly=True required=True
  • move_line_price_subtotal Monetary
    related='move_line_id.price_subtotal' string='Move line Subtotal'
  • move_line_price_unit Float
    related='move_line_id.price_unit' string='Move line Unit Price'
  • move_line_quantity Float
    related='move_line_id.quantity'
  • partner_id Many2one → res.partner
    comodel_name='res.partner' readonly=True
  • po_line_price_subtotal Monetary
    related='purchase_order_line_id.price_subtotal' string='PO line Subtotal'
  • po_line_price_unit Float
    related='purchase_order_line_id.price_unit' string='PO line Unit Price'
  • po_line_product_uom_qty Float
    related='purchase_order_line_id.product_uom_qty' string='Ordered Qty'
  • po_line_qty_invoiced Float
    related='purchase_order_line_id.qty_invoiced'
  • po_line_qty_received Float
    related='purchase_order_line_id.qty_received'
  • product_domain Binary
    compute='_compute_product_domain'
  • product_id Many2one → product.product
    comodel_name='product.product' domain='product_domain'
  • purchase_order_ids Many2many → purchase.order
    comodel_name='purchase.order' domain="[('partner_id', '=', partner_id), ('state', 'in', ('purchase', 'done'))]" relation='account_move_line_purchase_match_wizard_rel'
  • purchase_order_line_id Many2one → purchase.order.line
    comodel_name='purchase.order.line' compute='_compute_purchase_order_line_id' domain="[('order_id', 'in', purchase_order_ids), ('product_id', '=', product_id)]" readonly=False store=True string='Line'
Public methods (1)
  • select_purchase_line(self)