| 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 | 12428 |
| Technical Name |
grev_od_contract_farming |
| 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 | 12428 |
| Technical Name |
grev_od_contract_farming |
| License | OPL-1 |
| Website | https://www.grevlin.com |
🌱 Contract Farming ManagementDigitize the entire contract farming lifecycle — from farmer onboarding to settlement payout ✅ Odoo 19.0 Community / Enterprise | Risk Pack v2.0 |
|
|
|
|
|
Need Help?Email support@grevlin.com | X @GrevlinGlobal 🎁 30 days free support included |
Contract Farming Management
The Contract Farming Management module digitizes the entire contract farming lifecycle, enabling agribusiness companies to manage farming agreements with thousands of farmers efficiently. Version 2.0 adds a Risk Pack with farmer credit scoring, side-selling detection, quarterly scorecards and harvest forecasting on top of the contract backbone.
Overview
This module extends the Grevlin Commodity Procurement Suite with contract farming capabilities including farm registration, crop production contracts, input financing, field monitoring, automated settlement integration, farmer credit gating, and side-selling enforcement.
Key Features
- Farm and Plot Registration — register farms with GPS, soil characteristics, and multiple plots per farmer.
- Crop and Season Management — define crops with expected yields and manage seasonal farming periods (auto-closed by cron).
- Farming Contracts — create contracts linking farmers, farms, crops, and seasons with yield expectations and pricing terms.
- Input Financing — track seeds, fertilizer, and other inputs provided on credit, with automatic loan recovery during settlement.
- Field Monitoring — record field officer visits with crop stage assessments, yield estimates, pest/disease observations, and photo evidence.
- Settlement Integration — automatic input loan deductions and side-selling penalties during commodity settlement calculations.
- Farmer Credit Profiles — auto-computed score, grade and limit; credit gate enforced on contract approval.
- Side-Selling Detection — real-time detection on commodity deliveries with penalty workflow.
- Quarterly Scorecards — five-dimension performance scorecards rebuilt automatically by cron.
- Production Analytics — SQL-based reporting with pivot and graph views for yield analysis, input recovery, and financial performance.
Configuration
Crops
Define crops that link to existing commodity types:
- Navigate to :menuselection:`Commodity --> Configuration --> Crops`
- Click :guilabel:`Create`
- Enter crop name, code, and link to a commodity type
- Set expected yield per hectare and harvest cycle days
- Click :guilabel:`Save`
Seasons
Create seasonal periods for farming contracts:
- Navigate to :menuselection:`Commodity --> Configuration --> Seasons`
- Click :guilabel:`Create`
- Enter season name, dates, and associated crops
- Click :guilabel:`Activate` when the season begins
Security Groups
Contract farming reuses the centralized commodity security groups defined in grev_od_commodity_base. No module-specific groups are declared.
Commodity User
Group: grev_od_commodity_base.group_commodity_user
Permissions:
- View all contract farming data (farms, contracts, monitoring, credit, scorecards)
Commodity Officer
Group: grev_od_commodity_base.group_commodity_officer
Permissions:
- Create and manage farms, contracts, monitoring visits and credit profiles
- Mark inputs as delivered and submit monitoring reports
- Confirm or dismiss side-selling events
Commodity Manager
Group: grev_od_commodity_base.group_commodity_manager
Permissions:
- Full access including delete
- Approve and close contracts
- Manage credit suspensions, blacklists and penalty applications
- Configure crops and seasons
Usage
Registering a Farm
- Navigate to :menuselection:`Commodity --> Contract Farming --> Farms`
- Click :guilabel:`Create`
- Select the farmer and enter farm details (location, soil type, GPS)
- Add plots in the :guilabel:`Plots` tab with area and characteristics
- Click :guilabel:`Save`
Creating a Farming Contract
- Navigate to :menuselection:`Commodity --> Contract Farming --> Farming Contracts`
- Click :guilabel:`Create`
- Select farmer, farm, crop, season, and contracted area
- Set base price and pricing formula
- Add input financing lines (seeds, fertilizer, chemicals)
- Click :guilabel:`Approve` — the credit gate runs and a commodity contract is auto-created
- Click :guilabel:`Activate` when the contract period begins
Important
The total contracted area across all active contracts for the same farm and season cannot exceed the farm's total area. Contract approval is blocked when the farmer's outstanding loans plus new input financing would exceed their credit limit.
Recording Field Visits
- Navigate to :menuselection:`Commodity --> Contract Farming --> Farm Monitoring`
- Click :guilabel:`Create`
- Select the farming contract and record observations:
- Crop stage (germination through harvest ready)
- Plant health assessment
- Pest/disease observations
- Estimated yield per hectare
- Weather and soil moisture conditions
- Photos and recommendations
- Click :guilabel:`Submit` for review
Tip
Set a follow-up date on monitoring visits to receive automatic activity reminders for the assigned field officer.
Managing Farmer Credit
- Navigate to :menuselection:`Commodity --> Contract Farming --> Farmer Credit`
- Open or create a credit profile for the farmer
- Click :guilabel:`Recompute` to refresh the score, grade and recovery rate
- Use :guilabel:`Apply Suggested Limit` to adopt the auto-computed limit
- Suspend or blacklist farmers using the dedicated state actions
Reviewing Side-Selling Events
- Navigate to :menuselection:`Commodity --> Contract Farming --> Side-Selling Events`
- Filter open events and inspect the linked delivery
- Confirm, dispute, or dismiss based on investigation
- Apply a penalty — this creates a deduction line on the next settlement
Input Loan Recovery
When a settlement is calculated for a delivery linked to a farming contract, the system automatically:
- Identifies the farming contract via the commodity contract
- Calculates the outstanding input loan balance
- Creates an "Input Loan Recovery" deduction on the settlement
- Applies any confirmed side-selling penalties as separate deduction lines
- Caps the total deduction at the settlement net amount
The farming contract tracks total recovered amounts and recovery percentage in real time.
Technical Details
Models
grev.contract.farming.crop
Crop definitions linked to commodity types with agronomic parameters.
grev.contract.farming.season
Seasonal periods with draft/active/closed lifecycle.
grev.contract.farming.farm
Farm registration with GPS, soil type, irrigation, and plot management.
grev.contract.farming.plot
Farm subdivisions with individual area and characteristics.
grev.contract.farming.contract
Core farming contract with composition link to commodity contract.
grev.contract.farming.input.line
Input financing lines tracking products delivered on credit.
grev.contract.farming.monitoring
Field visit records with crop assessment and yield estimation.
grev.contract.farming.farmer.credit
Farmer credit profile with score, grade, recovery rate and limit.
grev.contract.farming.farmer.scorecard
Quarterly performance scorecard across five dimensions.
grev.contract.farming.side.selling.event
Detected off-contract delivery events with penalty workflow.
grev.contract.farming.report
SQL view aggregating contract farming analytics.
Scheduled Actions
- Close Expired Seasons — auto-closes seasons past their end date (daily).
- Monitoring Follow-up Alerts — activities for overdue follow-ups (daily).
- Detect Side-Selling — backstop scan over recent deliveries (daily).
- Build Quarterly Scorecards — rebuild farmer scorecards (weekly).
Public APIs
- grev.contract.farming.farmer.credit.check_loan_capacity(partner_id, amount)
- grev.contract.farming.farmer.scorecard._build_scorecard_for_partner(partner_id)
Integration Points
Commodity Modules
- Extends grev.commodity.contract with a farming contract backlink
- Extends grev.commodity.delivery with side-selling detection on done state
- Extends grev.commodity.settlement with input loan and penalty deduction hooks
- Extends grev.commodity.settlement.deduction with input_loan and side_selling_penalty deduction types
- Reuses commodity delivery, quality testing, and payment workflows
See Also
- Commodity Base module for commodity type configuration
- Commodity Supplier module for farmer registration and KYC
- Commodity Settlement module for payment processing
- Farm Advisory, Farm Infrastructure, Farm Veterinary modules — optional add-ons that extend the farm record
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