| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Inventory (stock)
• Invoicing (account) • Sales (sale_management) • Discuss (mail) |
| Lines of code | 554 |
| Technical Name |
sale_contract_management |
| License | LGPL-3 |
| Website | https://www.ahex.co |
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Inventory (stock)
• Invoicing (account) • Sales (sale_management) • Discuss (mail) |
| Lines of code | 554 |
| Technical Name |
sale_contract_management |
| License | LGPL-3 |
| Website | https://www.ahex.co |
Sales Contract Management
Enforce Price Compliance, Track Tolerances, and Automate Contract Lifecycles
This module provides a powerful framework to manage long-term customer agreements with quantity tracking, price lock-ins, and flexible over/under delivery tolerances. By linking Sales Orders directly to active contracts, it ensures strict policy enforcement and provides real-time visibility into committed versus delivered quantities.
Key Features
- Flexible Over/Under Tolerances: Configure custom tolerance margins (%) per line item.
- Over-Quantity Enforcement: Protect margins with block or warning policies on contract limits.
- Automated Lifecycle (Cron Engine): Scheduled background action auto-activates, auto-expires, or auto-closes contracts.
- Seamless Sales Integration: Locks in negotiated prices and auto-populates contract lines on Sales Orders.
- Deep Inventory Link: Updates delivered quantities and checks for auto-closure upon stock picking validation.
- Professional PDF Reports: Single-click generation of print-ready Sales Contract QWeb reports.
When to Use
- When negotiating long-term agreements with fixed prices and total committed quantities.
- When you want to prevent sales staff from accidentally selling items at incorrect prices.
- When you need strict controls to block orders once the total contract quantity is exceeded.
- When you need automated processes to close agreements when they reach a target delivery percentage.
How It Works
Step 1: Create a Sales Contract
Go to Sales → Contracts → All Contracts, click New, select the customer, dates, policy, and add product lines with target quantities and tolerances.
Step 2: Confirm the Contract
Click the Confirm button to make the contract Active. Active contracts are now ready to be used in Sales Orders.
Step 3: Create a Sales Order
Create a standard Sales Order, select your Customer, and then choose the active Sales Contract. All contract lines auto-populate with pre-negotiated unit prices and default quantities.
Step 4: Auto-Track and Close
As warehouse shipments are validated, Odoo tracks delivered contract quantities. Once the under-tolerance threshold is reached, the contract automatically moves to the Closed state.
Behind the Scenes
| Action / Trigger | Result / Behavior |
|---|---|
| Select Contract on Sales Order | Loads contract lines, defaults quantities, and locks unit prices. |
| Confirm Sales Order (Exceeds Qty + Tolerance) | If policy is Block, raises user error. If policy is Warn, posts alert to Chatter. |
| Validate Stock Delivery Picking | Recalculates delivered contract quantities and triggers auto-close check. |
| Daily Scheduled Cron Engine | Auto-activates draft contracts on start date, and auto-expires/closes active contracts. |
Important Notes
- Start Date cannot be after End Date during validation.
- Contracts with delivered quantities cannot be cancelled.
- Tolerances are configurable individually per product line.
- Fully integrated with Odoo chatter for a complete history of breaches and updates.
Troubleshooting & Rules
- Cannot Cancel Contract: Ensure the contract has no delivered quantities before cancelling.
- Sales Order Line Price not locked: Make sure the product matches the contract line exactly.
- Contract did not close automatically: Verify if delivered quantities have reached the under-tolerance percentage required.
Use Case Example
Sales Agreement: 1,000 units of Desk Organizer at $15.00/unit.
Tolerance Config: 10% Under Tolerance (900 units triggers fulfillment) & 5% Over Tolerance (max 1,050 units allowed).
Over-Qty Policy: Block.
Flow:
- Customer places multiple orders. As soon as total delivered quantity hits 900, the background engine can mark it as Fulfilled and Closed.
- If a salesperson tries to place a Sales Order that brings the total ordered qty to 1,060 units, Odoo will raise a hard validation error and block the order.
Support
Ahex Technologies
www.ahex.co
Contact Us
Please log in to comment on this module