odoo-addon-contract-line-successor 18.0.1.0.0.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. odoo/addons/contract_line_successor/README.rst +168 -0
  2. odoo/addons/contract_line_successor/__init__.py +2 -0
  3. odoo/addons/contract_line_successor/__manifest__.py +24 -0
  4. odoo/addons/contract_line_successor/data/contract_renew_cron.xml +12 -0
  5. odoo/addons/contract_line_successor/i18n/contract_line_successor.pot +532 -0
  6. odoo/addons/contract_line_successor/models/__init__.py +5 -0
  7. odoo/addons/contract_line_successor/models/contract_contract.py +25 -0
  8. odoo/addons/contract_line_successor/models/contract_line.py +835 -0
  9. odoo/addons/contract_line_successor/models/contract_line_constraints.py +429 -0
  10. odoo/addons/contract_line_successor/models/contract_template_line.py +35 -0
  11. odoo/addons/contract_line_successor/models/res_company.py +15 -0
  12. odoo/addons/contract_line_successor/models/res_config_settings.py +18 -0
  13. odoo/addons/contract_line_successor/readme/CONFIGURE.md +10 -0
  14. odoo/addons/contract_line_successor/readme/CONTRIBUTORS.md +1 -0
  15. odoo/addons/contract_line_successor/readme/DESCRIPTION.md +40 -0
  16. odoo/addons/contract_line_successor/readme/USAGE.md +6 -0
  17. odoo/addons/contract_line_successor/security/ir.model.access.csv +2 -0
  18. odoo/addons/contract_line_successor/static/description/icon.png +0 -0
  19. odoo/addons/contract_line_successor/static/description/index.html +523 -0
  20. odoo/addons/contract_line_successor/tests/__init__.py +1 -0
  21. odoo/addons/contract_line_successor/tests/test_contract.py +847 -0
  22. odoo/addons/contract_line_successor/views/contract_contract.xml +73 -0
  23. odoo/addons/contract_line_successor/views/contract_line.xml +134 -0
  24. odoo/addons/contract_line_successor/views/contract_template.xml +19 -0
  25. odoo/addons/contract_line_successor/views/contract_template_line.xml +50 -0
  26. odoo/addons/contract_line_successor/views/res_config_settings.xml +16 -0
  27. odoo/addons/contract_line_successor/wizards/__init__.py +1 -0
  28. odoo/addons/contract_line_successor/wizards/contract_line_wizard.py +53 -0
  29. odoo/addons/contract_line_successor/wizards/contract_line_wizard.xml +110 -0
  30. odoo_addon_contract_line_successor-18.0.1.0.0.2.dist-info/METADATA +185 -0
  31. odoo_addon_contract_line_successor-18.0.1.0.0.2.dist-info/RECORD +33 -0
  32. odoo_addon_contract_line_successor-18.0.1.0.0.2.dist-info/WHEEL +5 -0
  33. odoo_addon_contract_line_successor-18.0.1.0.0.2.dist-info/top_level.txt +1 -0
@@ -0,0 +1,73 @@
1
+ <?xml version="1.0" encoding="utf-8" ?>
2
+ <!-- Copyright 2025 ACSONE SA/NV
3
+ License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
4
+ <odoo>
5
+ <record model="ir.ui.view" id="contract_contract_form_view">
6
+ <field name="model">contract.contract</field>
7
+ <field name="inherit_id" ref="contract.contract_contract_form_view" />
8
+ <field name="arch" type="xml">
9
+ <xpath expr="//field[@name='contract_line_ids']//list" position="inside">
10
+ <field name="is_plan_successor_allowed" column_invisible="True" />
11
+ <field name="is_stop_plan_successor_allowed" column_invisible="True" />
12
+ <field name="is_stop_allowed" column_invisible="True" />
13
+ <field name="is_cancel_allowed" column_invisible="True" />
14
+ <field name="is_un_cancel_allowed" column_invisible="True" />
15
+ <field name="is_auto_renew" column_invisible="True" />
16
+ <field name="is_canceled" column_invisible="True" />
17
+ <button
18
+ name="action_plan_successor"
19
+ title="Plan Start"
20
+ type="object"
21
+ icon="fa-calendar text-success"
22
+ invisible="not is_plan_successor_allowed"
23
+ />
24
+ <button
25
+ name="action_stop_plan_successor"
26
+ title="Stop Plan Successor"
27
+ type="object"
28
+ icon="fa-pause text-muted"
29
+ invisible="not is_stop_plan_successor_allowed"
30
+ />
31
+ <button
32
+ name="action_stop"
33
+ title="Stop"
34
+ type="object"
35
+ icon="fa-stop text-danger"
36
+ invisible="not is_stop_allowed"
37
+ />
38
+ <button
39
+ name="cancel"
40
+ title="Cancel"
41
+ type="object"
42
+ icon="fa-ban text-danger"
43
+ confirm="Are you sure you want to cancel this line"
44
+ invisible="not is_cancel_allowed"
45
+ />
46
+ <button
47
+ name="action_uncancel"
48
+ title="Un-cancel"
49
+ type="object"
50
+ icon="fa-ban text-success"
51
+ invisible="not is_un_cancel_allowed"
52
+ />
53
+ <button
54
+ name="renew"
55
+ title="Renew"
56
+ type="object"
57
+ icon="fa-fast-forward text-success"
58
+ groups="base.group_no_one"
59
+ invisible="not is_auto_renew"
60
+ />
61
+ </xpath>
62
+ <xpath
63
+ expr="//field[@name='contract_line_ids']//list"
64
+ position="attributes"
65
+ >
66
+ <attribute name="decoration-muted">is_canceled</attribute>
67
+ <attribute
68
+ name="decoration-info"
69
+ >create_invoice_visibility and not is_canceled</attribute>
70
+ </xpath>
71
+ </field>
72
+ </record>
73
+ </odoo>
@@ -0,0 +1,134 @@
1
+ <?xml version="1.0" encoding="utf-8" ?>
2
+ <!-- Copyright 2025 ACSONE SA/NV
3
+ License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
4
+ <odoo>
5
+ <record model="ir.ui.view" id="contract_line_form_view">
6
+ <field name="model">contract.line</field>
7
+ <field name="inherit_id" ref="contract.contract_line_form_view" />
8
+ <field name="arch" type="xml">
9
+ <header position="inside">
10
+ <field name="state" widget="statusbar" />
11
+ </header>
12
+ <xpath expr="//page[@name='renewal']" position="inside">
13
+ <group>
14
+ <field
15
+ name="termination_notice_date"
16
+ readonly="True"
17
+ invisible="not is_auto_renew"
18
+ />
19
+ <field name="manual_renew_needed" invisible="not is_auto_renew" />
20
+ </group>
21
+ </xpath>
22
+ <xpath expr="//notebook" position="inside">
23
+ <page
24
+ string="Predecessor &amp; Successor Lines"
25
+ groups="base.group_no_one"
26
+ invisible="display_type"
27
+ >
28
+ <group>
29
+ <field name="predecessor_contract_line_id" />
30
+ <field name="successor_contract_line_id" />
31
+ </group>
32
+ </page>
33
+ </xpath>
34
+ <xpath expr="//field[@name='date_end']" position="attributes">
35
+ <attribute name="required">is_auto_renew</attribute>
36
+ </xpath>
37
+ </field>
38
+ </record>
39
+ <record model="ir.ui.view" id="contract_line_tree_view">
40
+ <field name="model">contract.line</field>
41
+ <field name="inherit_id" ref="contract.contract_line_tree_view" />
42
+ <field name="arch" type="xml">
43
+ <xpath expr="//list" position="inside">
44
+ <field name="is_plan_successor_allowed" column_invisible="True" />
45
+ <field name="is_stop_plan_successor_allowed" column_invisible="True" />
46
+ <field name="is_stop_allowed" column_invisible="True" />
47
+ <field name="is_cancel_allowed" column_invisible="True" />
48
+ <field name="is_un_cancel_allowed" column_invisible="True" />
49
+ <field name="is_auto_renew" column_invisible="True" />
50
+ <field name="is_canceled" column_invisible="True" />
51
+ <button
52
+ name="action_plan_successor"
53
+ title="Plan Start"
54
+ type="object"
55
+ icon="fa-calendar text-success"
56
+ invisible="not is_plan_successor_allowed"
57
+ />
58
+ <button
59
+ name="action_stop_plan_successor"
60
+ title="Stop Plan Successor"
61
+ type="object"
62
+ icon="fa-pause text-muted"
63
+ invisible="not is_stop_plan_successor_allowed"
64
+ />
65
+ <button
66
+ name="action_stop"
67
+ title="Stop"
68
+ type="object"
69
+ icon="fa-stop text-danger"
70
+ invisible="not is_stop_allowed"
71
+ />
72
+ <button
73
+ name="cancel"
74
+ title="Cancel"
75
+ type="object"
76
+ icon="fa-ban text-danger"
77
+ confirm="Are you sure you want to cancel this line"
78
+ invisible="not is_cancel_allowed"
79
+ />
80
+ <button
81
+ name="action_uncancel"
82
+ title="Un-cancel"
83
+ type="object"
84
+ icon="fa-ban text-success"
85
+ invisible="not is_un_cancel_allowed"
86
+ />
87
+ <button
88
+ name="renew"
89
+ title="Renew"
90
+ type="object"
91
+ icon="fa-fast-forward text-success"
92
+ groups="base.group_no_one"
93
+ invisible="not is_auto_renew"
94
+ />
95
+ </xpath>
96
+ <xpath expr="//list" position="attributes">
97
+ <attribute name="decoration-muted">is_canceled</attribute>
98
+ <attribute
99
+ name="decoration-info"
100
+ >create_invoice_visibility and not is_canceled</attribute>
101
+ </xpath>
102
+ </field>
103
+ </record>
104
+
105
+ <record id="contract_line_report_tree_view" model="ir.ui.view">
106
+ <field name="model">contract.line</field>
107
+ <field name="inherit_id" ref="contract.contract_line_report_tree_view" />
108
+ <field name="arch" type="xml">
109
+ <xpath expr="//list" position="inside">
110
+ <field name="is_auto_renew" />
111
+ <field name="is_canceled" />
112
+ <field name="state" />
113
+ </xpath>
114
+ </field>
115
+ </record>
116
+ <record id="contract_line_search_view" model="ir.ui.view">
117
+ <field name="model">contract.line</field>
118
+ <field name="inherit_id" ref="contract.contract_line_search_view" />
119
+ <field name="arch" type="xml">
120
+ <xpath expr="//separator" position="after">
121
+ <filter
122
+ string="Canceled"
123
+ name="is_canceled"
124
+ domain="[('is_canceled', '=', True)]"
125
+ />
126
+ <filter
127
+ string="Auto-renew"
128
+ name="is_auto_renew"
129
+ domain="[('is_auto_renew', '=', True)]"
130
+ />
131
+ </xpath>
132
+ </field>
133
+ </record>
134
+ </odoo>
@@ -0,0 +1,19 @@
1
+ <?xml version="1.0" encoding="utf-8" ?>
2
+ <!-- Copyright 2025 ACSONE SA/NV
3
+ License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
4
+ <odoo>
5
+ <record model="ir.ui.view" id="contract_template_form_view">
6
+ <field name="model">contract.template</field>
7
+ <field name="inherit_id" ref="contract.contract_template_form_view" />
8
+ <field name="arch" type="xml">
9
+ <xpath
10
+ expr="//field[@name='contract_line_ids']//list//field[@name='automatic_price']"
11
+ position="attributes"
12
+ >
13
+ <attribute
14
+ name="column_invisible"
15
+ >parent.contract_type == 'purchase' and not is_auto_renew</attribute>
16
+ </xpath>
17
+ </field>
18
+ </record>
19
+ </odoo>
@@ -0,0 +1,50 @@
1
+ <?xml version="1.0" encoding="utf-8" ?>
2
+ <!-- Copyright 2025 ACSONE SA/NV
3
+ License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
4
+ <odoo>
5
+ <record model="ir.ui.view" id="contract_template_line_form_view">
6
+ <field name="model">contract.template.line</field>
7
+ <field name="inherit_id" ref="contract.contract_template_line_form_view" />
8
+ <field name="arch" type="xml">
9
+ <xpath expr="//page[@name='recurrence_info']" position="after">
10
+ <page string="Renewal" name="renewal" invisible="display_type">
11
+ <group>
12
+ <field name="is_auto_renew" />
13
+ </group>
14
+ <group invisible="not is_auto_renew">
15
+ <group>
16
+ <label for="auto_renew_interval" />
17
+ <div class="o_row">
18
+ <field
19
+ name="auto_renew_interval"
20
+ class="oe_inline"
21
+ required="is_auto_renew"
22
+ />
23
+ <field
24
+ name="auto_renew_rule_type"
25
+ class="oe_inline"
26
+ required="is_auto_renew"
27
+ />
28
+ </div>
29
+ </group>
30
+ <group>
31
+ <label for="termination_notice_interval" />
32
+ <div class="o_row">
33
+ <field
34
+ name="termination_notice_interval"
35
+ class="oe_inline"
36
+ required="is_auto_renew"
37
+ />
38
+ <field
39
+ name="termination_notice_rule_type"
40
+ class="oe_inline"
41
+ required="is_auto_renew"
42
+ />
43
+ </div>
44
+ </group>
45
+ </group>
46
+ </page>
47
+ </xpath>
48
+ </field>
49
+ </record>
50
+ </odoo>
@@ -0,0 +1,16 @@
1
+ <?xml version="1.0" encoding="utf-8" ?>
2
+ <!-- Copyright 2019 ACSONE SA/NV
3
+ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
4
+ <odoo>
5
+ <record model="ir.ui.view" id="res_config_settings_form_view">
6
+ <field name="model">res.config.settings</field>
7
+ <field name="inherit_id" ref="contract.res_config_settings_form_view" />
8
+ <field name="arch" type="xml">
9
+ <xpath expr="//block[@name='contract']" position="inside">
10
+ <setting class="col-12 col-lg-6 o_setting_box">
11
+ <field name="create_new_line_at_contract_line_renew" />
12
+ </setting>
13
+ </xpath>
14
+ </field>
15
+ </record>
16
+ </odoo>
@@ -0,0 +1 @@
1
+ from . import contract_line_wizard
@@ -0,0 +1,53 @@
1
+ # Copyright 2018 ACSONE SA/NV
2
+ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
3
+
4
+ from odoo import fields, models
5
+
6
+
7
+ class ContractLineWizard(models.TransientModel):
8
+ _name = "contract.line.wizard"
9
+ _description = "Contract Line Wizard"
10
+
11
+ date_start = fields.Date()
12
+ date_end = fields.Date()
13
+ recurring_next_date = fields.Date(string="Next Invoice Date")
14
+ is_auto_renew = fields.Boolean(default=False)
15
+ manual_renew_needed = fields.Boolean(
16
+ default=False,
17
+ help="This flag is used to make a difference between a definitive stop"
18
+ "and temporary one for which a user is not able to plan a"
19
+ "successor in advance",
20
+ )
21
+ contract_line_id = fields.Many2one(
22
+ comodel_name="contract.line",
23
+ string="Contract Line",
24
+ required=True,
25
+ index=True,
26
+ ondelete="cascade",
27
+ )
28
+
29
+ def stop(self):
30
+ for wizard in self:
31
+ wizard.contract_line_id.stop(
32
+ wizard.date_end, manual_renew_needed=wizard.manual_renew_needed
33
+ )
34
+ return True
35
+
36
+ def plan_successor(self):
37
+ for wizard in self:
38
+ wizard.contract_line_id.plan_successor(
39
+ wizard.date_start, wizard.date_end, wizard.is_auto_renew
40
+ )
41
+ return True
42
+
43
+ def stop_plan_successor(self):
44
+ for wizard in self:
45
+ wizard.contract_line_id.stop_plan_successor(
46
+ wizard.date_start, wizard.date_end, wizard.is_auto_renew
47
+ )
48
+ return True
49
+
50
+ def uncancel(self):
51
+ for wizard in self:
52
+ wizard.contract_line_id.uncancel(wizard.recurring_next_date)
53
+ return True
@@ -0,0 +1,110 @@
1
+ <?xml version="1.0" encoding="utf-8" ?>
2
+ <!-- Copyright 2018 ACSONE SA/NV
3
+ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
4
+ <odoo>
5
+ <record model="ir.ui.view" id="contract_line_wizard_stop_form_view">
6
+ <field name="name">contract.line.stop.wizard.form (in contract)</field>
7
+ <field name="model">contract.line.wizard</field>
8
+ <field name="arch" type="xml">
9
+ <form>
10
+ <group>
11
+ <field name="contract_line_id" invisible="True" />
12
+ <field string="Stop Date" name="date_end" required="True" />
13
+ <field
14
+ string="Is suspension without end date"
15
+ name="manual_renew_needed"
16
+ />
17
+ </group>
18
+ <footer>
19
+ <button
20
+ name="stop"
21
+ string="Validate"
22
+ class="btn-primary"
23
+ type="object"
24
+ />
25
+ <button string="Cancel" class="btn-default" special="cancel" />
26
+ </footer>
27
+ </form>
28
+ </field>
29
+ </record>
30
+ <record model="ir.ui.view" id="contract_line_wizard_plan_successor_form_view">
31
+ <field
32
+ name="name"
33
+ >contract.line.plan_successor.wizard.form (in contract)</field>
34
+ <field name="model">contract.line.wizard</field>
35
+ <field name="arch" type="xml">
36
+ <form>
37
+ <group>
38
+ <field name="contract_line_id" invisible="True" />
39
+ <field name="date_start" required="True" />
40
+ <field name="date_end" required="is_auto_renew" />
41
+ <field name="is_auto_renew" />
42
+ </group>
43
+ <footer>
44
+ <button
45
+ name="plan_successor"
46
+ string="Validate"
47
+ class="btn-primary"
48
+ type="object"
49
+ />
50
+ <button string="Cancel" class="btn-default" special="cancel" />
51
+ </footer>
52
+ </form>
53
+ </field>
54
+ </record>
55
+ <record model="ir.ui.view" id="contract_line_wizard_stop_plan_successor_form_view">
56
+ <field
57
+ name="name"
58
+ >contract.line.stop_plan_successor.wizard.form (in contract)</field>
59
+ <field name="model">contract.line.wizard</field>
60
+ <field name="arch" type="xml">
61
+ <form>
62
+ <group>
63
+ <field name="contract_line_id" invisible="True" />
64
+ <field
65
+ string="Suspension Start Date"
66
+ name="date_start"
67
+ required="True"
68
+ />
69
+ <field
70
+ string="Suspension End Date"
71
+ name="date_end"
72
+ required="True"
73
+ />
74
+ </group>
75
+ <footer>
76
+ <button
77
+ name="stop_plan_successor"
78
+ string="Validate"
79
+ class="btn-primary"
80
+ type="object"
81
+ />
82
+ <button string="Cancel" class="btn-default" special="cancel" />
83
+ </footer>
84
+ </form>
85
+ </field>
86
+ </record>
87
+ <record model="ir.ui.view" id="contract_line_wizard_uncancel_form_view">
88
+ <field
89
+ name="name"
90
+ >contract.line.stop_plan_successor.wizard.form (in contract)</field>
91
+ <field name="model">contract.line.wizard</field>
92
+ <field name="arch" type="xml">
93
+ <form>
94
+ <group>
95
+ <field name="contract_line_id" invisible="True" />
96
+ <field name="recurring_next_date" required="True" />
97
+ </group>
98
+ <footer>
99
+ <button
100
+ name="uncancel"
101
+ string="Validate"
102
+ class="btn-primary"
103
+ type="object"
104
+ />
105
+ <button string="Cancel" class="btn-default" special="cancel" />
106
+ </footer>
107
+ </form>
108
+ </field>
109
+ </record>
110
+ </odoo>
@@ -0,0 +1,185 @@
1
+ Metadata-Version: 2.1
2
+ Name: odoo-addon-contract_line_successor
3
+ Version: 18.0.1.0.0.2
4
+ Requires-Python: >=3.10
5
+ Requires-Dist: odoo-addon-contract==18.0.*
6
+ Requires-Dist: odoo==18.0.*
7
+ Summary: Contract Line Successor
8
+ Home-page: https://github.com/OCA/contract
9
+ License: AGPL-3
10
+ Author: ACSONE SA/NV,Odoo Community Association (OCA)
11
+ Author-email: support@odoo-community.org
12
+ Classifier: Programming Language :: Python
13
+ Classifier: Framework :: Odoo
14
+ Classifier: Framework :: Odoo :: 18.0
15
+ Classifier: License :: OSI Approved :: GNU Affero General Public License v3
16
+ Classifier: Development Status :: 5 - Production/Stable
17
+
18
+ .. image:: https://odoo-community.org/readme-banner-image
19
+ :target: https://odoo-community.org/get-involved?utm_source=readme
20
+ :alt: Odoo Community Association
21
+
22
+ =======================
23
+ Contract Line Successor
24
+ =======================
25
+
26
+ ..
27
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
28
+ !! This file is generated by oca-gen-addon-readme !!
29
+ !! changes will be overwritten. !!
30
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
31
+ !! source digest: sha256:8e82b783a2b08e6cd099e1709b74f04fb704bec1cafd7770c03eccc682f828a2
32
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
33
+
34
+ .. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png
35
+ :target: https://odoo-community.org/page/development-status
36
+ :alt: Production/Stable
37
+ .. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
38
+ :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
39
+ :alt: License: AGPL-3
40
+ .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fcontract-lightgray.png?logo=github
41
+ :target: https://github.com/OCA/contract/tree/18.0/contract_line_successor
42
+ :alt: OCA/contract
43
+ .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
44
+ :target: https://translation.odoo-community.org/projects/contract-18-0/contract-18-0-contract_line_successor
45
+ :alt: Translate me on Weblate
46
+ .. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
47
+ :target: https://runboat.odoo-community.org/builds?repo=OCA/contract&target_branch=18.0
48
+ :alt: Try me on Runboat
49
+
50
+ |badge1| |badge2| |badge3| |badge4| |badge5|
51
+
52
+ | **Contract Line Successor** extends ``contract.line`` model to support
53
+ advanced contract lifecycle management, including suspension,
54
+ successor planning, cancellation, and renewal.
55
+ | It provides a flexible and robust framework for managing complex
56
+ contract line scenarios in a clean and structured way.
57
+
58
+ Features
59
+ --------
60
+
61
+ - **Successor and Predecessor Management**
62
+
63
+ - Link contract lines with successor and predecessor lines.
64
+ - Plan successors automatically or manually after a stop or
65
+ suspension.
66
+
67
+ - **Contract Line Lifecycle States**
68
+
69
+ - Manage contract lines with the following computed states:
70
+
71
+ - ``Upcoming``
72
+ - ``In-Progress``
73
+ - ``To Renew``
74
+ - ``Upcoming Close``
75
+ - ``Closed``
76
+ - ``Canceled``
77
+
78
+ - **Lifecycle Operations**
79
+
80
+ - Stop a contract line.
81
+ - Plan a successor for a contract line.
82
+ - Stop and plan a successor in one operation (useful for suspensions).
83
+ - Cancel and un-cancel contract lines.
84
+ - Renew contract lines automatically (new line or extension).
85
+
86
+ - **Auto-Renewal Handling**
87
+
88
+ - Auto-renewal based on company settings (extend existing line or
89
+ create a new one).
90
+ - Cron job to automate renewal of eligible contract lines.
91
+
92
+ - **Data Integrity and Validation**
93
+
94
+ - Prevent invalid successor or predecessor configurations.
95
+ - Validate state transitions and date overlaps.
96
+ - Ensure clean renewal and cancellation workflows.
97
+
98
+ - **Audit Trail**
99
+
100
+ - Automatic posting of chatter messages for lifecycle events like
101
+ stops, renewals, suspensions, cancellations, etc.
102
+
103
+ **Table of contents**
104
+
105
+ .. contents::
106
+ :local:
107
+
108
+ Configuration
109
+ =============
110
+
111
+ - | **Auto-Renewal Strategy**
112
+ | In the company settings, define whether renewing a contract line:
113
+
114
+ - Extends the current line (updates ``date_end``),
115
+ - or creates a new successor contract line.
116
+
117
+ | Field:
118
+ | ``Company > Configuration > Contracts > Create new contract line at renewal``
119
+
120
+ - | **Scheduled Actions**
121
+ | Ensure the scheduled action ``Contract Line: Auto Renew`` is
122
+ activated if you want automatic renewal without manual intervention.
123
+
124
+ Usage
125
+ =====
126
+
127
+ 1. **Select a contract** and enable the option **"Recurrence at line
128
+ level?"**.
129
+ 2. Once enabled, you will have access to several actions at the contract
130
+ line level:
131
+
132
+ - **Stop** a contract line and optionally **plan a successor**.
133
+ - **Handle temporary suspensions** and **resume** the contract line
134
+ after the suspension period.
135
+ - **Cancel** and **un-cancel** contract lines if necessary.
136
+ - **Renew** contract lines either by **extending** the current line
137
+ or by **creating a new successor line** automatically.
138
+
139
+ Bug Tracker
140
+ ===========
141
+
142
+ Bugs are tracked on `GitHub Issues <https://github.com/OCA/contract/issues>`_.
143
+ In case of trouble, please check there if your issue has already been reported.
144
+ If you spotted it first, help us to smash it by providing a detailed and welcomed
145
+ `feedback <https://github.com/OCA/contract/issues/new?body=module:%20contract_line_successor%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
146
+
147
+ Do not contact contributors directly about support or help with technical issues.
148
+
149
+ Credits
150
+ =======
151
+
152
+ Authors
153
+ -------
154
+
155
+ * ACSONE SA/NV
156
+
157
+ Contributors
158
+ ------------
159
+
160
+ - Souheil Bejaoui souheil.bejaoui@acsone.eu (ACSONE SA/NV)
161
+
162
+ Maintainers
163
+ -----------
164
+
165
+ This module is maintained by the OCA.
166
+
167
+ .. image:: https://odoo-community.org/logo.png
168
+ :alt: Odoo Community Association
169
+ :target: https://odoo-community.org
170
+
171
+ OCA, or the Odoo Community Association, is a nonprofit organization whose
172
+ mission is to support the collaborative development of Odoo features and
173
+ promote its widespread use.
174
+
175
+ .. |maintainer-sbejaoui| image:: https://github.com/sbejaoui.png?size=40px
176
+ :target: https://github.com/sbejaoui
177
+ :alt: sbejaoui
178
+
179
+ Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
180
+
181
+ |maintainer-sbejaoui|
182
+
183
+ This module is part of the `OCA/contract <https://github.com/OCA/contract/tree/18.0/contract_line_successor>`_ project on GitHub.
184
+
185
+ You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.