| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Discuss (mail)
• Invoicing (account) • Purchase (purchase) • Inventory (stock) |
| Community Apps Dependencies | Show |
| Lines of code | 8083 |
| Technical Name |
grev_od_commodity_settlement |
| License | OPL-1 |
| Website | https://www.grevlin.com |
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Discuss (mail)
• Invoicing (account) • Purchase (purchase) • Inventory (stock) |
| Community Apps Dependencies | Show |
| Lines of code | 8083 |
| Technical Name |
grev_od_commodity_settlement |
| License | OPL-1 |
| Website | https://www.grevlin.com |
💰 Commodity Settlement & PricingAutomated Pricing Engine, Quality Deductions, Multi-Level Approval, Vendor Bills & Payment Tracking
|
|
|
|
|
|
📞 Need Help?
|
|
Grevlin Procurement Suite Enterprise-Grade Commodity Procurement Solutions for Odoo © 2026 Grevlin Global Corp. All Rights Reserved. Compatible with Odoo 19.0 | Licensed under OPL-1 |
Commodity Settlement & Pricing
The Commodity Settlement & Pricing module automates the full settlement lifecycle for commodity procurement -- from delivery weigh-in to supplier payment. It calculates settlement amounts from delivery net weights and contract base prices, applies quality penalties and grade adjustments as itemised deductions, routes settlements through a multi-level approval workflow, generates vendor bills linked to purchase orders, and tracks payments across multiple payment methods.
Overview
This module sits at the financial close of the commodity procurement chain. It consumes delivery records from grev_od_commodity_delivery and quality test results from grev_od_commodity_quality, then produces vendor bills and payment records in Odoo Accounting.
Key Capabilities
- Automated Pricing Engine -- gross amount = net weight x base price from contract; quality penalties and grade adjustments are applied as individual deduction lines.
- Quality Penalty Application -- for each quality result with a penalty amount greater than zero, a deduction line is created automatically.
- Grade Adjustment -- if the assigned grade has a negative price_adjustment_pct, a deduction line reflects the grade-based price reduction.
- Multi-Level Approval -- six states: draft, calculated, submitted, approved, invoiced, paid. Approval records the approver, date, and final payable amount.
- Settlement Types -- delivery, washout, swap, and option exercise settlement types with provisional pricing and finalization workflow.
- Vendor Bill Creation -- approved settlements generate account.move (vendor bill) with a commodity line at base price and individual deduction lines.
- Payment Tracking -- record payments via bank transfer, mobile money, cash, or cheque. Settlement auto-closes when fully paid.
- FX Hedge Tracking -- link FX hedges to settlements and calculate gain/loss on currency exposure.
- Advance Payment Management -- manage advance payments against contracts with automatic recovery on settlement approval.
- Settlement Amendments -- amend approved settlements with manager approval and full audit trail.
- Procurement Analytics -- SQL view aggregating deliveries by date, partner, and commodity type with total weights, amounts, and average prices in pivot and graph views.
Note
Quality test results and delivery records are consumed from peer commodity modules via try/except guards. The settlement module degrades gracefully if optional dependencies are absent.
Configuration
Dependencies
Install the following modules before installing Commodity Settlement:
- grev_od_commodity_base -- commodity types, grades, quality parameters
- grev_od_commodity_delivery -- delivery records with net weights
- grev_od_commodity_supplier -- supplier management
The module also depends on account for vendor bill creation and purchase for purchase order context.
Security Groups
The module uses the centralized commodity security groups defined in grev_od_commodity_base:
Commodity User (group_commodity_user)
- Read-only access to settlements, deductions, payments, amendments, FX hedges, and the procurement report.
Commodity Officer (group_commodity_officer)
- Create and edit settlements, calculate pricing, submit for approval.
- Create and manage advance payments and FX hedges.
- Cannot delete records or approve settlements.
Commodity Manager (group_commodity_manager)
- Full CRUD including delete on all settlement models.
- Approve settlements, create vendor bills, manage payments.
- Approve settlement amendments.
Note
Multi-company record rules apply to all models using the pattern ['|', ('company_id', '=', False), ('company_id', 'in', company_ids)].
Usage
Creating a Settlement
- Navigate to :menuselection:`Commodity --> Settlements --> Settlements`.
- Click :guilabel:`Create`.
- Select the :guilabel:`Delivery` record to settle.
- The system populates the supplier, commodity type, net weight, and contract base price from the delivery and its linked contract.
- Click :guilabel:`Calculate` to compute the gross amount and generate deduction lines from quality penalties and grade adjustments.
Reviewing Deductions
After calculation, the :guilabel:`Deductions` tab shows all deduction lines. Each line includes:
- :guilabel:`Deduction Type` -- quality, grade, transport, handling, or other
- :guilabel:`Description` -- human-readable explanation
- :guilabel:`Amount` -- the deduction value
- :guilabel:`Source` -- reference to the quality test or grade record
Submitting for Approval
- Review all deduction lines and verify the net amount.
- Click :guilabel:`Submit` to move the settlement to submitted state.
- A manager reviews the settlement and clicks :guilabel:`Approve`.
- On approval, the final_payable amount is set (defaults to net_amount) and the approver and approval date are recorded.
Creating a Vendor Bill
- From an approved settlement, click :guilabel:`Create Bill`.
- The system generates an account.move (vendor bill) with:
- A commodity line at the base price per unit.
- Individual deduction lines for each penalty and adjustment.
- The bill is linked to the settlement's purchase order.
- The settlement moves to invoiced state.
Recording Payments
- From an invoiced settlement, go to the :guilabel:`Payments` tab.
- Click :guilabel:`Register Payment`.
- Select the :guilabel:`Payment Method`:
- Bank Transfer -- standard bank payment
- Mobile Money -- includes mobile money number field
- Cash -- manual cash payment
- Cheque -- cheque reference tracking
- Enter the payment amount and confirm.
- When total payments equal the final payable, the settlement automatically moves to paid state.
Managing FX Hedges
- Navigate to :menuselection:`Commodity --> Settlements --> FX Hedges`.
- Click :guilabel:`Create` and link to a settlement.
- Enter the hedge details: currency pair, hedged amount, hedge rate.
- When the settlement is finalized, the system calculates the FX gain or loss based on the actual vs hedged exchange rate.
Managing Advance Payments
- Navigate to :menuselection:`Commodity --> Settlements --> Advance Payments`.
- Click :guilabel:`Create` and link to a contract and supplier.
- Record the advance amount and payment date.
- On settlement approval, outstanding advances are automatically recovered against the final payable amount.
Settlement Amendments
- Open an approved or invoiced settlement.
- Click the :guilabel:`Amendments` smart button.
- Click :guilabel:`Create` and enter the amendment details:
- :guilabel:`Reason` -- mandatory explanation
- :guilabel:`Old Value` / :guilabel:`New Value` -- the change
- Submit for manager approval.
- Once approved, the amendment updates the settlement record.
Technical Details
Data Models
| Model | Type | Description |
|---|---|---|
| grev.commodity.settlement | Model | Settlement record with pricing, approval workflow, and bill linkage. |
| grev.commodity.settlement.deduction | Model | Individual deduction lines (quality, grade, transport, handling). |
| grev.commodity.payment | Model | Payment tracking with multiple payment methods. |
| grev.commodity.advance.payment | Model | Advance payments against contracts with recovery tracking. |
| grev.commodity.settlement.amendment | Model | Settlement amendments with manager approval. |
| grev.commodity.fx.hedge | Model | FX hedge records with gain/loss calculation. |
| grev.commodity.procurement.report | SQL view | Read-only procurement analytics (pivot + graph). |
Settlement Workflow States
| State | Description |
|---|---|
| draft | Settlement created, awaiting calculation. |
| calculated | Pricing computed, deductions generated. |
| submitted | Submitted for manager approval. |
| approved | Approved with final payable set. |
| invoiced | Vendor bill created in Odoo Accounting. |
| paid | All payments received, settlement closed. |
| cancelled | Settlement cancelled (available from any state). |
Pricing Computation
The pricing engine follows a deterministic formula:
- gross_amount = net_weight x base_price (from contract)
- For each quality test result with penalty_amount > 0, a deduction line is created.
- If the assigned grade has a negative price_adjustment_pct, a grade deduction line is created.
- total_deductions = sum of all deduction line amounts.
- net_amount = gross_amount - total_deductions.
- final_payable defaults to net_amount but can be overridden during approval.
Troubleshooting
Settlement Calculation Shows Zero Deductions
Symptom: clicking :guilabel:`Calculate` produces a gross amount but no deduction lines.
Checks:
- Verify the linked delivery has completed quality tests with penalty amounts greater than zero.
- Confirm the assigned grade has a non-zero price_adjustment_pct value.
- Check that grev_od_commodity_quality is installed if quality penalty deductions are expected.
Vendor Bill Not Created
Symptom: the :guilabel:`Create Bill` button is not visible.
Checks:
- The settlement must be in approved state. Check the state badge in the form header.
- The current user must have Commodity Manager security group access.
- Verify the account module is installed and properly configured with journals.
Payment Does Not Close Settlement
Symptom: payment is recorded but settlement remains in invoiced state.
Checks:
- Verify the total payment amount equals or exceeds the final_payable amount.
- Check that the payment is in posted state (draft payments do not count toward the settlement total).
See Also
Odoo Proprietary License v1.0 This software and associated files (the "Software") may only be used (executed, modified, executed after modifications) if you have purchased a valid license from the authors, typically via Odoo Apps, or if you have received a written agreement from the authors of the Software (see the COPYRIGHT file). You may develop Odoo modules that use the Software as a library (typically by depending on it, importing it and using its resources), but without copying any source code or material from the Software. You may distribute those modules under the license of your choice, provided that this license is compatible with the terms of the Odoo Proprietary License (For example: LGPL, MIT, or proprietary licenses similar to this one). It is forbidden to publish, distribute, sublicense, or sell copies of the Software or modified copies of the Software. The above copyright notice and this permission notice must be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Please log in to comment on this module