OdooWiki OCA HUB

Recurring - Product Contract

product_contract folder_open OCA/contract open_in_new
Contract Management License: AGPL-3

This module adds support for products to be linked to contract templates.

A contract is created on sale.order confirmation for each different template used in sale order line where recurrence details are set too.

Contract product are ignored on invoicing process and pass to nothing to invoice directly.

auto_awesome What this module does

AI-generated from the code · Odoo 19.0

Lets you mark service products as recurring contracts with their own invoicing rhythm, renewal and termination rules, and automatically creates contract records when a sale order is confirmed.

This module turns certain service products into "contract products". On a product form, when the product type is Service, a new "Is a contract" checkbox appears, and a Contract tab opens with the recurring settings: contract template, duration (number of periods and period length), invoicing frequency and pre-paid/post-paid choice, auto-renewal frequency, termination notice, and how the contract start date is calculated (manual, start or end of current or next period, with optional forced month).

When such a product is added to a sale order line, these settings are copied onto the line and can be adjusted there. A small configuration pop-up is available from the product field on sale order lines. The line description is rewritten to show the recurrence, invoicing type and dates.

On confirmation of a sale order, if the company setting "Automatically Create Contracts At Sale Order Confirmation" is on (it is on by default and can be changed in Sales settings), one contract is created per contract template used, and contract lines are generated from the order lines. Lines without a template go into a contract without template. If a line replaces an existing contract line, that line is stopped and linked to its successor.

Contract products are not invoiced from the sale order: their quantity to invoice is forced to zero and their invoice status is set to nothing to invoice. The contract form shows a button with the number of related sale orders, and the sale order shows a button to open its contracts. The module also blocks upsell/downsell on terminated contracts and checks that the order and contract share the same partner and template.

Depends on

Models and fields (9)
  • sale.order · extends an existing modelis_contract (Is a contract), contract_count, need_contract_creation
  • res.company · extends an existing modelcreate_contract_at_sale_order_confirmation (Automatically Create Contracts At Sale Order Confirmation)
  • contract.line · extends an existing modelsale_order_line_id (Sale Order Line)
  • sale.order.line · new model
  • product.template · extends an existing modelis_contract (Is a contract), is_auto_renew (Auto Renew), recurrence_number (Number of Recurrences), force_month_yearly, recurring_interval (Invoice Every), auto_renew_interval (Renew Every), recurrence_interval, recurring_rule_type (Invoicing Recurrence), auto_renew_rule_type (Renewal type), force_month_quarterly, force_month_semesterly, recurring_invoicing_type (Invoicing type), contract_start_date_method, termination_notice_interval (Termination Notice Before), termination_notice_rule_type (Termination Notice type), property_contract_template_id (Contract Template)
  • contract.contract · extends an existing modelsale_order_count
  • res.config.settings · extends an existing modelcreate_contract_at_sale_order_confirmation
  • product.contract.configurator · new model
  • sale.order.line.contract.mixin · new modeldate_end, company_id, date_start, partner_id, product_id, contract_id (Contract), is_contract (Is a contract), is_auto_renew (Auto Renew), product_uom_qty (Quantity), contract_line_id (Contract Line to replace), recurrence_number, recurring_interval (Invoice Every), auto_renew_interval (Renew Every), recurrence_interval, recurring_rule_type (Recurrence), auto_renew_rule_type (Renewal type), contract_template_id (Contract Template), recurring_invoicing_type (Invoicing type), contract_start_date_method

Text generated by AI (DeepSeek) from reading the Odoo 19.0 code on GitHub; it may contain mistakes, so check the code before deciding. The module is very large and only part of the code was read. View the code on GitHub

Availability by version

Reviewed: 2026-11-03
Confirmed (verified in repository and branch) Estimated (unverified) No information

Confirmation status: 8 confirmed, 1 with no information of 9 versions.

terminal Installation and usage

OCA documentation · Odoo 19.0

To use this module, you need to:

  • Go to Sales -\> Products and select or create a product.
  • Check "Is a contract" and select the contract template related to the product
  • Define default recurrence rules

No verified information in OCA: Installation, Configuration.

info

Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.