Skip to Content
Odoo Menu
  • Sign in
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Approvals
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Property Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
      • Get a Tailored Demo
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +32 2 290 34 90
    • Get a Tailored Demo
  • Pricing
  • Help
  1. APPS
  2. Purchasing
  3. Commodity Contracts v 19.0
  4. Sales Conditions FAQ

Commodity Contracts

by Grevlin Global Corp. https://www.grevlin.com
Odoo

$ 106.00

v 19.0 Third Party
Apps purchases are linked to your Odoo account, please sign in or sign up first.
Availability
Odoo Online
Odoo.sh
On Premise
Odoo Apps Dependencies • Discuss (mail)
• Invoicing (account)
• Purchase (purchase)
Community Apps Dependencies Show
• Commodity Base
• Commodity Supplier Management
Lines of code 5945
Technical Name grev_od_commodity_contract
LicenseOPL-1
Websitehttps://www.grevlin.com
You bought this module and need support? Click here!
Availability
Odoo Online
Odoo.sh
On Premise
Odoo Apps Dependencies • Discuss (mail)
• Invoicing (account)
• Purchase (purchase)
Community Apps Dependencies Show
• Commodity Base
• Commodity Supplier Management
Lines of code 5945
Technical Name grev_od_commodity_contract
LicenseOPL-1
Websitehttps://www.grevlin.com
  • Description
  • Documentation
  • License

🌾 Commodity Contracts

Full Commodity Trading Contract Suite — Spot, Forward, Futures, Options, Swaps, Pricing Formulas & Mark-to-Market

✓  Odoo 19.0 Community & Enterprise  |  OPL-1 License

🎯 Value Proposition

Commodity Contracts brings professional commodity trading contract management into Odoo. Manage spot, forward, futures, option, term, and swap contracts with a powerful pricing formula engine, Black-Scholes option Greeks, mark-to-market valuations, delivery scheduling, rollover and washout workflows, and automatic purchase/sale order generation — all with full lifecycle governance and multi-company support.

📈

8 Contract Types

Spot, forward, futures, option, term, swap, fixed-price & market-linked

💰

6 Pricing Formulas

Fixed, basis, differential, average, min/max, and custom Python expressions

📊

Position Tracking

Unrealized P&L, margin management, and mark-to-market valuations

🌟 Key Benefits

📄

Full Contract Lifecycle

Manage contracts from draft through confirmation, activation, suspension, settlement, and expiry. Every state transition is an explicit action with validation, chatter tracking, and full audit trail.

🔢

Pricing Formula Engine

Six formula types — fixed, basis, differential, average, min/max, and custom Python expressions. Floor/ceiling price collars, averaging periods, and price fixation workflows keep pricing precise and auditable.

💲

Mark-to-Market & Margins

Track position valuations, unrealized P&L, initial and variation margins. Margin call monitoring and Black-Scholes option Greeks computation keep your trading book accurate in real time.

📋

Automatic PO Generation

Generate purchase or sale orders from active contracts with a single click. Fulfillment tracking computes delivered quantity, remaining quantity, and completion percentage from PO line receipts automatically.

⚙ Core Features

📄 Contract Types & Lifecycle

  • 8 contract types: spot, forward, futures, option, term, swap, fixed-price, market-linked
  • Buy-side and sell-side direction with counterparty management
  • States: draft → confirmed → active → suspended / expired / settled / cancelled
  • Incoterm and payment term assignment
  • Delivery month, season, origin, and grade tracking

🔢 Pricing Formula Engine

  • 6 formula types: fixed, basis, differential, average, min/max, custom
  • Floor and ceiling price collars
  • Averaging periods with daily/weekly/monthly frequency
  • Custom Python expressions with safe_eval
  • Price fixation workflow: provisional → fixed → final

💲 Positions, Margins & MTM

  • Position tracking with long/short/flat status
  • Unrealized P&L computation per contract
  • Initial margin, variation margin, and margin calls
  • Mark-to-market valuations with snapshot history
  • Black-Scholes option Greeks (delta, gamma, theta, vega)

🚚 Delivery & Tolerance

  • Delivery scheduling with start/end dates
  • Configurable tolerance percentage per contract
  • Delivered quantity computed from PO receipts
  • Fulfillment percentage and remaining quantity tracking
  • Delivery month and season assignment for futures

🔄 Rollover & Washout

  • Roll expiring contracts to a new delivery period
  • Washout workflows for offsetting open positions
  • Parent-child contract chain linking
  • Swap contracts with multi-leg structures
  • Full chatter audit trail on all transitions

✅ Quality Rules & Penalties

  • Override base quality parameter thresholds per contract
  • Supplier-specific quality agreements
  • Penalty clauses for late delivery, under-delivery, quality breaches
  • Fixed amount or percentage-based penalties
  • Automated contract expiry via daily cron

👥 Who Is This For?

🌾

Commodity Traders

Manage spot, forward, futures, and option contracts with mark-to-market valuations, position tracking, and margin management — all within Odoo.

💼

Procurement Managers

Create commodity purchase contracts with pricing formulas, quality rules, and penalty clauses. Track fulfillment and generate purchase orders automatically.

💰

Finance Teams

Monitor pricing formula outcomes, mark-to-market valuations, margin calls, and unrealized P&L across the full commodity contract portfolio.

🗒 Changelog

Version 2.0.0 — April 2026

Full Trading Contract Platform — Major Release

  • 8 contract types: spot, forward, futures, option, term, swap, fixed-price, market-linked
  • Buy-side and sell-side direction with counterparty management
  • Pricing formula engine: fixed, basis, differential, average, min/max, custom expressions
  • Black-Scholes option Greeks computation (delta, gamma, theta, vega)
  • Mark-to-market valuations with snapshot history
  • Position tracking with unrealized P&L and margin management
  • Delivery scheduling with tolerance tracking
  • Rollover and washout workflows with parent-child contract linking
  • Swap contracts with multi-leg structures
  • Contract expiry, margin call, and option expiry monitoring crons
  • Automatic purchase/sale order generation from active contracts

Version 1.0.0 — January 2026

Initial Release

  • Fixed-price and market-linked commodity purchase contracts
  • Contract lifecycle: draft → confirmed → active → expired
  • Quality rules overriding base commodity parameters
  • Penalty clauses for delivery and quality breaches
  • Purchase order generation from active contracts
  • Fulfillment tracking with delivered/remaining quantity
  • Daily auto-expiry cron for past-due contracts
  • Three-tier security with multi-company record rules

📞 Need Help?

🎁 30 Days Free Support Included
📧

Email

odoo@grevlin.com
🐦

X (Twitter)

@GrevlinGlobal

Grevlin Procurement Suite

Enterprise-Grade Commodity Trading Solutions for Odoo

© 2026 Grevlin Global Corp. All Rights Reserved.

Compatible with Odoo 19.0 | Licensed under OPL-1

Commodity Contracts

The Commodity Contracts module provides professional commodity trading contract management for Odoo 19.0. It supports spot, forward, futures, option, term, and swap contracts with a powerful pricing formula engine, Black-Scholes option Greeks, mark-to-market valuations, delivery scheduling, rollover and washout workflows, and automatic purchase/sale order generation.

Overview

This module manages the full commodity contract lifecycle from draft through settlement or expiry. Contracts link commodity suppliers to pricing terms, quality rules, and penalty clauses, and serve as the contractual foundation for the entire commodity procurement chain.

Key Capabilities

  1. 8 Contract Types -- spot, forward, futures, option, term, swap, fixed-price, and market-linked contracts with buy/sell direction.
  2. Pricing Formula Engine -- six formula types (fixed, basis, differential, average, min/max, custom) with floor/ceiling collars and price fixation workflows.
  3. Mark-to-Market & Margins -- position tracking, unrealized P&L, initial/variation margins, and margin call monitoring.
  4. Black-Scholes Greeks -- option delta, gamma, theta, and vega computation for commodity options.
  5. Delivery Scheduling -- delivery start/end dates, tolerance tracking, delivery month assignment, and fulfillment percentage.
  6. Rollover & Washout -- roll expiring contracts to new periods, offset open positions, and maintain parent-child contract chains.
  7. Quality Rules -- override base quality parameter thresholds at the contract level for supplier-specific agreements.
  8. Penalty Clauses -- fixed or percentage penalties for late delivery, under-delivery, and quality breaches.
  9. Automatic PO Generation -- create purchase or sale orders from active contracts with remaining quantity tracking.
  10. Swap Contracts -- multi-leg swap structures with independent pricing per leg.

Note

This module depends on grev_od_commodity_base for commodity types, grades, and quality parameters, and on grev_od_commodity_supplier for supplier partner profiles. Delivery, quality testing, and settlement logic belong to their respective modules.

Configuration

Dependencies

Install the following modules before installing Commodity Contracts:

  • grev_od_commodity_base -- commodity types, grades, parameters
  • grev_od_commodity_supplier -- commodity supplier management

The module also requires purchase, account, and mail from standard Odoo.

Scheduled Actions

Three crons ship with the module. All are active by default.

Cron Frequency Purpose
Contract Expiry Check Daily Auto-expires contracts past their delivery end date.
Margin Call Monitor Daily Checks margin levels and creates alerts when thresholds are breached.
Option Expiry Monitor Daily Monitors option contract expiry dates and triggers settlement workflows.

Security Groups

The module uses centralized security groups from grev_od_commodity_base:

Commodity User (group_commodity_user)

  • Read-only access to contracts, pricing formulas, positions, valuations, quality rules, and penalties.
  • Cannot create or modify records.

Commodity Officer (group_commodity_officer)

  • Create and edit contracts, pricing formulas, delivery schedules, quality rules, and penalties.
  • Generate purchase/sale orders from active contracts.
  • Cannot delete records.
  • Inherits Commodity User permissions.

Commodity Manager (group_commodity_manager)

  • Full CRUD including delete on all contract models.
  • Can activate, suspend, and settle contracts directly.
  • Inherits Commodity Officer permissions.

Note

Multi-company record rules apply to all models using the pattern ['|', ('company_id', '=', False), ('company_id', 'in', company_ids)].

Usage

Creating a Contract

  1. Navigate to :menuselection:`Commodity --> Contracts --> Contracts`.
  2. Click :guilabel:`Create`.
  3. Fill in the required fields:
    • :guilabel:`Supplier` -- the commodity supplier partner.
    • :guilabel:`Commodity` -- the commodity type being traded.
    • :guilabel:`Contract Type` -- spot, forward, futures, etc.
    • :guilabel:`Direction` -- buy or sell.
    • :guilabel:`Contract Quantity` and :guilabel:`Base Price`.
    • :guilabel:`Delivery Start` / :guilabel:`Delivery End`.
  4. Optionally assign a :guilabel:`Pricing Formula` for market-linked contracts.
  5. Add :guilabel:`Quality Rules` and :guilabel:`Penalties` in their respective tabs.
  6. Click :guilabel:`Confirm` to move to the confirmed state.

Setting Up a Pricing Formula

  1. Open a contract and click the :guilabel:`Pricing Formula` tab.
  2. Click :guilabel:`Create` to add a new formula.
  3. Select the :guilabel:`Formula Type`:
    • Fixed -- uses base_price directly.
    • Basis -- base price plus/minus a differential.
    • Differential -- price relative to a reference commodity.
    • Average -- average of market prices over a period.
    • Min/Max -- price bounded by floor and ceiling.
    • Custom -- Python expression using safe_eval.
  4. Set floor/ceiling prices if applicable.
  5. The :guilabel:`Computed Price` updates automatically.
  6. Use :guilabel:`Fix Price` to lock the formula at a specific moment.

Activating and Generating Orders

  1. From a confirmed contract, click :guilabel:`Activate`.
  2. Once active, click :guilabel:`Generate Purchase Order` (buy-side) or :guilabel:`Generate Sale Order` (sell-side).
  3. The system creates an order for the remaining contract quantity at the current contract price.
  4. Fulfillment percentage updates automatically as deliveries are received against the linked purchase order lines.

Managing Positions

  1. Navigate to :menuselection:`Commodity --> Contracts --> Positions`.
  2. View open positions with current market value, unrealized P&L, and margin status.
  3. Margin calls are flagged automatically when variation margin exceeds the configured threshold.

Rollover and Washout

Rollover: To roll an expiring contract to a new delivery period, open the contract and click :guilabel:`Rollover`. A new child contract is created with the same terms but updated delivery dates. The parent contract is settled.

Washout: To offset an open position, open the contract and click :guilabel:`Washout`. The system creates an offsetting contract and settles both positions at the washout price.

Technical Details

Data Models

Model Type Description
grev.commodity.contract Model Core commodity contract with lifecycle and pricing.
grev.commodity.pricing.formula Model Pricing formula definitions with computation engine.
grev.commodity.contract.position Model Position tracking with unrealized P&L.
grev.commodity.contract.margin Model Initial and variation margin management.
grev.commodity.contract.valuation Model Mark-to-market valuation snapshots.
grev.commodity.contract.option Model Option-specific fields and Greeks computation.
grev.commodity.contract.rollover Model Rollover transaction records.
grev.commodity.contract.washout Model Washout/offset transaction records.
grev.commodity.contract.swap Model Swap contract header.
grev.commodity.contract.swap.leg Model Individual swap legs with independent pricing.
grev.commodity.contract.delivery.schedule Model Delivery scheduling lines.
grev.commodity.contract.quality.rule Model Contract-level quality parameter overrides.
grev.commodity.contract.penalty Model Penalty clause definitions.
purchase.order Extended Extended with commodity_contract_id linkage.

Troubleshooting

Pricing Formula Not Computing

Symptom: computed_price shows 0 on a formula record.

Checks:

  1. Verify the formula has a base_price set (required for all types except custom).
  2. For custom formulas, ensure the expression field contains valid Python that returns a numeric value.
  3. Check that safe_eval can evaluate the expression without errors in the Odoo server log.

Fulfillment Percentage Stuck at Zero

Symptom: fulfillment_pct does not update after deliveries.

Checks:

  1. Confirm that purchase orders were generated from the contract (linked via commodity_contract_id).
  2. Verify that PO line qty_received has been updated by stock receipts.
  3. The field is compute + store=True. Trigger recomputation by saving the contract or running grev.commodity.contract._compute_delivered_quantity() from a shell.

Margin Calls Not Triggering

Symptom: No margin call alerts despite position losses.

Checks:

  1. Confirm the Margin Call Monitor scheduled action is active.
  2. Verify that the contract has a margin record with the initial margin amount set.
  3. Check that the current market price is available for the mark-to-market computation.

See Also

Related Modules

  • grev_od_commodity_base -- commodity types, grades, and quality parameters used by contract quality rules.
  • grev_od_commodity_supplier -- supplier partner profiles linked to contracts.
  • grev_od_commodity_delivery -- delivery and weighbridge management consuming contract delivery schedules.
  • grev_od_commodity_settlement -- settlement pricing engine consuming contract pricing formulas.
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

  • The author can leave a single reply to each comment.
  • This section is meant to ask simple questions or leave a rating. Every report of a problem experienced while using the module should be addressed to the author directly (refer to the following point).
  • If you want to start a discussion with the author or have a question related to your purchase, please use the support page.
Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security

Odoo is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

Website made with