TIP: You can type at any time to perform a new search.
Contract Refund On Stop
contract_refund_on_stop · OCA/contract
- Repository
- OCA/contract · module folder · Try on Runboat
- Module version
- 1.0.0
- Category
- Uncategorized
- Folder size
- 0.05 MB
- License
- AGPL-3
- Application
- No
- Auto-installable
- No
- Website
- https://github.com/OCA/contract
- Last tracking update
- 2026-08-07 08:43:01
- Authors
- ACSONE SA/NV, Odoo Community Association (OCA)
- Maintainers
- ACSONE SA/NV, Odoo Community Association (OCA)
- Committers
- sbejaoui, Weblate, OCA-git-bot, oca-ci
- Odoo dependencies
- Python dependencies
- None
- System dependencies
- None
- Required by
- None
- Description
This module allows stopping a contract line even after it has been invoiced. When the stop date is earlier than the last invoiced date, the system will: - Automatically create a refund invoice for the period between the stop date and the last invoiced date. - Adjust the `last_date_invoiced` of the contract line to match the stop date. - Proceed with the normal stop process. To accurately compute the refund amount, the module depends on **`contract_variable_qty_prorated`**, which provides the prorating logic used to determine how much of the previously invoiced quantity should be refunded based on the actual number of days covered by the refund period. Without this dependency, it would not be possible to proportionally calculate the part of the invoiced quantity corresponding to unused service time when a contract is stopped mid-period. This ensures that users can gracefully handle early contract terminations without manual refund management, while maintaining accurate prorated invoicing and accounting consistency.
Code Analysis ⓘ
Views touched (1)
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
res_config_settings_form_view |
res.config.settings | form | Inherits contract.res_config_settings_form_view |
HTTP endpoints (0)
No HTTP endpoints found for this module.
Models touched (3)
New fields (0)
No new fields.
Public methods (1)-
stop(self, date_end, manual_renew_needed=False, post_message=True)
New fields (1)
-
enable_contract_line_refund_on_stopBooleanhelp='If enabled, users can stop a contract line even after it has been invoiced. A refund will automatically be created for the invoiced period beyond the stop date.'
No public methods.
New fields (1)
-
enable_contract_line_refund_on_stopBooleanreadonly=Falserelated='company_id.enable_contract_line_refund_on_stop'
No public methods.
- Status
- Open migration PR — not merged yet for this version
- CI status
- checks failing
- Open since
- 234 days ago
- Last activity
- 70 days ago
- Repository
- OCA/contract
- Pull request
- [19.0][MIG] contract_refund_on_stop (#1369)