| REPOSITORY | |
|---|---|
| REPOSITORY | OCA/contract |
| GIT | |
| GIT | https://github.com/OCA/contract.git |
| GIT FOLDER | |
| GIT FOLDER | https://github.com/OCA/contract/tree/18.0/contract_line_successor |
| VERSION | |
| VERSION | 1.0.1 |
| CATEGORY | |
| CATEGORY | Uncategorized |
| LICENSE | |
| LICENSE | AGPL-3 |
| APPLICATION | |
| APPLICATION | No |
| AUTO-INSTALLABLE | |
| AUTO-INSTALLABLE | No |
| AUTHORS | |
| AUTHORS | Odoo Community Association (OCA), ACSONE SA/NV |
| MAINTAINERS | |
| MAINTAINERS | Odoo Community Association (OCA), ACSONE SA/NV |
| COMMITTERS | |
| COMMITTERS | Denis Roussel, Weblate, OCA-git-bot, oca-ci, Angel Rivas |
| WEBSITE | |
| WEBSITE | https://github.com/OCA/contract |
| LAST TRACKING UPDATE | |
| LAST TRACKING UPDATE | 2026-07-06 19:30:10 |
| ODOO DEPENDENCIES | |
| ODOO DEPENDENCIES |
OCA/contract: - contract odoo/odoo: - base - account - base_setup - web - onboarding - product - bus - web_tour - html_editor - uom - analytic - portal - web_editor - http_routing - auth_signup - digest - resource |
| PYTHON DEPENDENCIES | |
| PYTHON DEPENDENCIES | Not have |
| SYSTEM DEPENDENCIES | |
| SYSTEM DEPENDENCIES | Not have |
| DESCRIPTION | |
| DESCRIPTION | **Contract Line Successor** extends `contract.line` model to support advanced
contract lifecycle management, including suspension, successor planning,
cancellation, and renewal.
It provides a flexible and robust framework for managing complex contract
line scenarios in a clean and structured way.
## Features
- **Successor and Predecessor Management**
- Link contract lines with successor and predecessor lines.
- Plan successors automatically or manually after a stop or suspension.
- **Contract Line Lifecycle States**
- Manage contract lines with the following computed states:
- `Upcoming`
- `In-Progress`
- `To Renew`
- `Upcoming Close`
- `Closed`
- `Canceled`
- **Lifecycle Operations**
- Stop a contract line.
- Plan a successor for a contract line.
- Stop and plan a successor in one operation (useful for suspensions).
- Cancel and un-cancel contract lines.
- Renew contract lines automatically (new line or extension).
- **Auto-Renewal Handling**
- Auto-renewal based on company settings (extend existing line or create a new one).
- Cron job to automate renewal of eligible contract lines.
- **Data Integrity and Validation**
- Prevent invalid successor or predecessor configurations.
- Validate state transitions and date overlaps.
- Ensure clean renewal and cancellation workflows.
- **Audit Trail**
- Automatic posting of chatter messages for lifecycle events like stops,
renewals, suspensions, cancellations, etc. |
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
contract_contract_form_view |
contract.contract | xpath | Inherits contract.contract_contract_form_view | |
contract_line_form_view |
contract.line | header | Inherits contract.contract_line_form_view | |
contract_line_report_tree_view |
contract.line | xpath | Inherits contract.contract_line_report_tree_view | |
contract_line_search_view |
contract.line | xpath | Inherits contract.contract_line_search_view | |
contract_line_tree_view |
contract.line | xpath | Inherits contract.contract_line_tree_view | |
contract_line_wizard_plan_successor_form_view |
contract.line.plan_successor.wizard.form (in contract) | contract.line.wizard | form | New |
contract_line_wizard_stop_form_view |
contract.line.stop.wizard.form (in contract) | contract.line.wizard | form | New |
contract_line_wizard_stop_plan_successor_form_view |
contract.line.stop_plan_successor.wizard.form (in contract) | contract.line.wizard | form | New |
contract_line_wizard_uncancel_form_view |
contract.line.stop_plan_successor.wizard.form (in contract) | contract.line.wizard | form | New |
contract_template_form_view |
contract.template | xpath | Inherits contract.contract_template_form_view | |
contract_template_line_form_view |
contract.template.line | xpath | Inherits contract.contract_template_line_form_view | |
res_config_settings_form_view |
res.config.settings | xpath | Inherits contract.res_config_settings_form_view |
line_recurrence
Boolean
default=True
No public methods.
is_cancel_allowed
Boolean
compute='_compute_allowed'
string='Cancel allowed?'
is_plan_successor_allowed
Boolean
compute='_compute_allowed'
string='Plan successor allowed?'
is_stop_allowed
Boolean
compute='_compute_allowed'
string='Stop allowed?'
is_stop_plan_successor_allowed
Boolean
compute='_compute_allowed'
string='Stop/Plan successor allowed?'
is_un_cancel_allowed
Boolean
compute='_compute_allowed'
string='Un-Cancel allowed?'
manual_renew_needed
Boolean
default=False
help='This flag is used to make a difference between a definitive stopand temporary one for which a user is not able to plan asuccessor in advance'
predecessor_contract_line_id
Many2one → contract.line
comodel_name='contract.line'
copy=False
help='Contract Line origin of this one.'
index=True
readonly=True
required=False
string='Predecessor Contract Line'
state
Selection
compute='_compute_state'
search='_search_state'
selection=[('upcoming', 'Upcoming'), ('in-progress', 'In-progress'), ('to-renew', 'To renew'), ('upcoming-close', 'Upcoming Close'), ('closed', 'Closed'), ('canceled', 'Canceled')]
successor_contract_line_id
Many2one → contract.line
comodel_name='contract.line'
copy=False
help='In case of restart after suspension, this field contain the new contract line created.'
index=True
readonly=True
required=False
string='Successor Contract Line'
termination_notice_date
Date
compute='_compute_termination_notice_date'
copy=False
store=True
action_plan_successor(self)
action_stop(self)
action_stop_plan_successor(self)
action_uncancel(self)
cancel(self)
cron_renew_contract_line(self)
plan_successor(self, date_start, date_end, is_auto_renew, recurring_next_date=False, post_message=True)
renew(self)
stop(self, date_end, manual_renew_needed=False, post_message=True)
stop_plan_successor(self, date_start, date_end, is_auto_renew)
uncancel(self, recurring_next_date)
unlink(self)
contract_line_id
Many2one → contract.line
comodel_name='contract.line'
index=True
ondelete='cascade'
required=True
string='Contract Line'
date_end
Date
date_start
Date
is_auto_renew
Boolean
default=False
manual_renew_needed
Boolean
default=False
help='This flag is used to make a difference between a definitive stopand temporary one for which a user is not able to plan asuccessor in advance'
recurring_next_date
Date
string='Next Invoice Date'
plan_successor(self)
stop(self)
stop_plan_successor(self)
uncancel(self)
is_auto_renew
Boolean
compute='_compute_is_auto_renew'
No public methods.
auto_renew_interval
Integer
default=1
help='Renew every (Days/Weeks/Months/Years)'
string='Renew Every'
auto_renew_rule_type
Selection
default='yearly'
help='Specify interval for automatic renewal.'
string='Renewal type'
args: [('daily', 'Day(s)'), ('weekly', 'Week(s)'), ('monthly', 'Month(s)'), ('yearly', 'Year(s)')]
is_auto_renew
Boolean
default=False
string='Auto Renew'
termination_notice_interval
Integer
default=1
string='Termination Notice Before'
termination_notice_rule_type
Selection
default='monthly'
string='Termination Notice type'
args: [('daily', 'Day(s)'), ('weekly', 'Week(s)'), ('monthly', 'Month(s)')]
No public methods.
create_new_line_at_contract_line_renew
Boolean
help='If checked, a new line will be generated at contract line renew and linked to the original one as successor. The default behavior is to extend the end date of the contract by a new subscription period'
No public methods.
create_new_line_at_contract_line_renew
Boolean
help='If checked, a new line will be generated at contract line renew and linked to the original one as successor. The default behavior is to extend the end date of the contract by a new subscription period'
readonly=False
related='company_id.create_new_line_at_contract_line_renew'
string='Create New Line At Contract Line Renew'
No public methods.
| STATUS | |
|---|---|
| STATUS | Open migration PR - not merged yet for this version |
| REPOSITORY | |
| REPOSITORY | OCA/contract |
| PULL REQUEST | |
| PULL REQUEST | [19.0][MIG] contract_line_successor (#1370) |
| STATUS | |
|---|---|
| STATUS | Open migration PR - not merged yet for this version |
| REPOSITORY | |
| REPOSITORY | OCA/contract |
| PULL REQUEST | |
| PULL REQUEST | 19.0 [MIG] contract line successor (#1334) |