Contract Termination

contract_termination
REPOSITORY
REPOSITORYOCA/contract
GIT
GIThttps://github.com/OCA/contract.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/contract/tree/18.0/contract_termination
VERSION
VERSION 1.0.0
CATEGORY
CATEGORYUncategorized
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), ACSONE SA/NV
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), ACSONE SA/NV
COMMITTERS
COMMITTERSDenis Roussel, Weblate, OCA-git-bot, oca-ci
WEBSITE
WEBSITEhttps://github.com/OCA/contract
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 19:30:10
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/contract:
    - contract_line_successor
    - contract
odoo/odoo:
    - base
    - account
    - base_setup
    - web
    - onboarding
    - product
    - mail
    - 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
The **Contract Termination** module extends the `contract` module, allowing
users to properly manage the termination of contracts.  
It provides functionality to terminate contracts with a reason, track
termination comments and dates, and prevent further modifications on terminated
contracts unless reactivated.

## Features

- **Terminate Contracts**
  - Users with the appropriate rights can terminate active contracts.
  - Capture a termination reason, comment, and termination date.

- **Update or Cancel Termination**
  - Update termination details if needed.
  - Cancel (reactivate) a terminated contract.

- **Contract Form Enhancements**
  - Display an alert on terminated contracts with the reason and comment.
  - Hide or disable contract actions (e.g., Send) and fields on terminated contracts.
  - Set contract fields as read-only after termination.

- **Permissions**
  - Only users with the group `Contract: Can Terminate Contracts` can terminate
    or cancel termination of contracts.

Code Analysis

Views touched (4)
XML IDNameModelTypeStatus
contract_contract_form_view contract.contract xpath Inherits contract.contract_contract_form_view
contract_contract_terminate_form_view contract.contract.terminate form New
contract_terminate_reason_form_view contract.terminate.reason form New
contract_terminate_reason_tree_view contract.terminate.reason list New
HTTP endpoints (0)

No HTTP endpoints found for this module.

Models touched (4)

New fields (4)
  • is_terminated Boolean
    copy=False readonly=True string='Terminated'
  • terminate_comment Text
    copy=False readonly=True string='Termination Comment' tracking=True
  • terminate_date Date
    copy=False readonly=True string='Termination Date' tracking=True
  • terminate_reason_id Many2one → contract.terminate.reason
    comodel_name='contract.terminate.reason' copy=False ondelete='restrict' readonly=True string='Termination Reason' tracking=True
Public methods (2)
  • action_cancel_contract_termination(self)
  • action_terminate_contract(self)

New fields (6)
  • contract_id Many2one → contract.contract
    comodel_name='contract.contract' ondelete='cascade' required=True string='Contract'
  • terminate_comment Text
    string='Termination Comment'
  • terminate_comment_required Boolean
    related='terminate_reason_id.terminate_comment_required'
  • terminate_date Date
    required=True string='Termination Date'
  • terminate_reason_id Many2one → contract.terminate.reason
    comodel_name='contract.terminate.reason' ondelete='cascade' required=True string='Termination Reason'
  • terminate_with_last_date_invoiced Boolean
    help='Terminate the contract lines with the last invoiced date if they cannot be terminated with the date reported in the wizard.' string='Terminate lines with last date invoiced'
Public methods (1)
  • terminate_contract(self)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (2)
  • name Char
    required=True
  • terminate_comment_required Boolean
    default=True string='Require a termination comment'
Public methods (0)

No public methods.

STATUS
STATUSOpen migration PR - not merged yet for this version
REPOSITORY
REPOSITORYOCA/contract
PULL REQUEST
PULL REQUEST[19.0][MIG] contract_termination (#1367)
STATUS
STATUSOpen migration PR - not merged yet for this version
REPOSITORY
REPOSITORYOCA/contract
PULL REQUEST
PULL REQUEST19.0 [MIG] contract termination (#1335)