purchase_file_uploader
Upload a bill against one purchase order or a selection of them, with a check that they all belong to the same vendor.
August 27, 2026Updated August 29, 20264 min read
| Technical name | purchase_file_uploader |
|---|---|
| Views | list, form (view widget, <widget> element) |
| Module | purchase, the Purchase app |
| Used in core | Purchase order lists and forms in purchase |
| Versions | Odoo 20.0, Odoo 19.0, Odoo 18.0, Odoo 17.0 |
| No-code setup | No. It is set in view XML and depends on module-specific data |
| Alternatives | bill_upload_guide, attach_document, many2many_binary |
What the PO bill uploader does
What this means for your team
Supported options in Odoo 19
| Option | Type | What it does |
|---|---|---|
record | optional prop | When present, the bill targets that single purchase order. |
list | optional prop | When no record is present, the bill targets the list's selected identifiers. |
the vendor check | list-only guard | Refuses with a validation dialog when the selection spans more than one vendor. |
action_create_invoice | server call | Receives the target identifiers and every collected attachment identifier together. |
The vendor check only runs in a list. The handler returns immediately unless the current view is a list, because a single order cannot span vendors.
Working examples
Two phases, and the finally block that matters
Version compatibility
| Version | Status | Notes |
|---|---|---|
| Odoo 20.0 | Partial / changed | Not released. The attachment payload key changes from data to raw. |
| Odoo 19.0 | Verified | Verified against the shipped source. |
| Odoo 18.0 | Verified | Same two-phase upload and vendor check. |
| Odoo 17.0 | Verified | Same approach with older component conventions. |
| Odoo 16.0 | Not available | Widget does not exist. |
Upgrade note. Present since Odoo 17. The two-phase upload and the single vendor rule have been stable across those versions.
What is changing in Odoo 20
Common problems and fixes
| Symptom | Cause and fix |
|---|---|
| A validation dialog about a single vendor | The list selection spans more than one vendor. Select orders from one vendor at a time. |
| Several files produced one bill | All attachment identifiers are passed to a single creation call. Expected. Upload separately for separate bills. |
| Nothing happens on a form | The vendor check returns early outside a list, so the upload should proceed. Check the record prop is reaching the widget. |
| An old attachment appears on a new bill | It should not; the collected list is cleared in a finally block. Reload the view if a customization interfered. |
| The created bill is empty | The server could not read the attachment content. Check the file type is one the digitization supports. |
| The widget is missing | The Purchase module is not installed in that database. Install Purchase. |
PO bill uploader vs the alternatives
| Widget | Best for | Key difference |
|---|---|---|
purchase_file_uploader | Creating a vendor bill from a file against one or more purchase orders | Works from a record or a list selection, with a single vendor rule and a clean-up on failure |
bill_upload_guide | The first bill, from the accounting side | Guidance and three paths rather than order matching |
attach_document | Attaching a file to a record | No bill is created |
| many2many_binary | A set of attachments on a record | Storage rather than an action |
Frequently asked questions
Can I upload against several purchase orders?+
Do several files make several bills?+
What happens if the creation fails?+
How does it know what to target?+
What changes in Odoo 20?+
Purchase to pay that matches itself
Three-way matching only works when bills are created from orders rather than beside them. We implement Odoo Purchase and Accounting so the match happens automatically, on versions 16 through 19.
Book a free consultation