Monday, January 30, 2023
1 change · master
New functionality added to Odoo
Vendor bills imported from documents can now be automatically linked to the related purchase order when the system finds a matching supplier, reference, and amount. This reduces manual work for accountants and helps keep bill lines aligned with purchase order records, even when document imports lose that connection.
Original PR description
When a vendor bill document is uploaded (EDI, PDF,..) the link with the purchase order is often lost. We want to reuse the purchase.order OCR' matching logic to enhance vendor bill extracted from documents. To sum up the logic; - if we find a partner or reference match (invoice_origin) AND the same amount, we use autocomplete and replace the line in the vendor bill with the purchase order one. - if we find a match with the reference and some line in the purchase order sum up to the vendor bill total, we add those line in the vendor bill but we set the qty to zero (the accountant can manually remove the XML line and link the new one afterwards). task-id: 2828521 [community](https://github.com/odoo/odoo/pull/109093) [enterprise](https://github.com/odoo/enterprise/pull/35436)