The Prepayment Challenge in Odoo
In standard Odoo, the Purchase Order workflow follows this sequence:
Purchase Order → Vendor Bill → Payment
But many companies, especially in manufacturing, imports, or wholesale trade, need to pay vendors in advance before they issue bills. Common scenarios include:
- Paying a fixed percentage, such as 30% advance, when confirming a Purchase Order.
- Sending full payment upfront for overseas suppliers.
- Reserving scarce materials by partial payment before delivery.
Odoo doesn’t provide a clean out-of-the-box way to register prepayments directly from the Purchase Order without generating a Vendor Bill.
This article demonstrates how to extend Odoo with a “Register Prepayment” option that enables you to:
- Record supplier advance payments directly from the Purchase Order.
- Post real account.payment entries without relying on placeholder Vendor Bills.
- Link prepayments back to the Purchase Order.
- Reconcile prepayments later when the Vendor Bill arrives.
Prepayments in Practice
- Vendors often require payment in advance.
- The company may not want to generate a Vendor Bill yet.
- Payment must still be linked to the Purchase Order for traceability.
- Prepayments are later reconciled with the Vendor Bill at final invoicing.
Numla’s Prepayment Solution
We introduce a simple extension that adds:
- A Prepayment Wizard (prepayment.register) that collects payment details (amount, journal, method, bank account, etc.).
- A “Register Prepayment” button on Purchase Orders.
- Automatic posting of a Vendor Payment (account.payment) linked to the Purchase Order.
- Reconciliation of the Vendor Bill with the recorded prepayment once the invoice arrives.
Steps to Implement Prepayments in Odoo
1. Add Action on Purchase Order
We start by adding an action that triggers the Prepayment Wizard. This action ensures the wizard automatically pre-fills details such as partner, amount, currency, and company.
2. Add Buttons on the Purchase Order Form
Next, we make the feature accessible by adding a “Register Pre-Payment” button on the Purchase Order form. Users can click this button to open the wizard and record prepayments directly from the PO.
3. Create the Prepayment Wizard
We define a transient model prepayment.register with fields for journal, amount, payment method, partner bank, etc.
Compute Methods
The compute methods handle defaults for accounts, journals, banks, and payment methods, ensuring a smooth user experience with minimal manual input.
4. Posting Prepayments
When the user confirms the wizard, it creates and posts a Vendor Payment linked to the Purchase Order:
5. Prepayment Wizard Form View
User Workflow
1. Confirm the Purchase Order.
2. Click Register Pre-Payment.
3. Fill in:
- Journal (Bank or Cash)
- Payment Method
- Amount and Date
- Vendor Bank Account (if applicable)
4. Confirm. Odoo creates a posted Vendor Payment.
5. The payment is visible in the Purchase Order via the PrePayment smart button.
6. When the Vendor Bill arrives, the accountant reconciles it with the prepayment.
What Makes This Useful
- No fake Vendor Bills required for advance payments.
- Payments are fully traceable against the Purchase Order.
- Simple workflow for users.
- Fully compatible with Odoo accounting reconciliation.
Final Thoughts
This customisation gives businesses a clean way to handle supplier prepayments directly from Purchase Orders. It’s especially useful for industries with advance payment practices, and ensures accounting remains transparent without clutter from unnecessary bills.
By combining functional ease with solid accounting integrity, Odoo becomes more aligned with real-world purchase management.