Skip to content

Commit c710c94

Browse files
[18.0][ADD] contract_line_defer_successor: bridge module
1 parent 0f980f5 commit c710c94

File tree

13 files changed

+607
-0
lines changed

13 files changed

+607
-0
lines changed
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
=============================
2+
Contract Line Defer Successor
3+
=============================
4+
5+
..
6+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
7+
!! This file is generated by oca-gen-addon-readme !!
8+
!! changes will be overwritten. !!
9+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10+
!! source digest: sha256:dc2117b9d018df465a375442508641276d32f337a4f8423d361ff6b7165ea348
11+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
12+
13+
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
14+
:target: https://odoo-community.org/page/development-status
15+
:alt: Beta
16+
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
17+
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
18+
:alt: License: AGPL-3
19+
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fcontract-lightgray.png?logo=github
20+
:target: https://github.com/OCA/contract/tree/18.0/contract_line_defer_successor
21+
:alt: OCA/contract
22+
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
23+
:target: https://translation.odoo-community.org/projects/contract-18-0/contract-18-0-contract_line_defer_successor
24+
:alt: Translate me on Weblate
25+
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
26+
:target: https://runboat.odoo-community.org/builds?repo=OCA/contract&target_branch=18.0
27+
:alt: Try me on Runboat
28+
29+
|badge1| |badge2| |badge3| |badge4| |badge5|
30+
31+
Bridge module between contract_line_defer and contract_line_successor
32+
33+
**Table of contents**
34+
35+
.. contents::
36+
:local:
37+
38+
Use Cases / Context
39+
===================
40+
41+
BUSINESS NEED:
42+
43+
- Requiring contract_line_defer and contract_line_successor
44+
45+
APPROACH: Bridge module to make the two modules work together.
46+
47+
Usage
48+
=====
49+
50+
When a contract line is deferred, the line-successor functions are not
51+
available.
52+
53+
Bug Tracker
54+
===========
55+
56+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/contract/issues>`_.
57+
In case of trouble, please check there if your issue has already been reported.
58+
If you spotted it first, help us to smash it by providing a detailed and welcomed
59+
`feedback <https://github.com/OCA/contract/issues/new?body=module:%20contract_line_defer_successor%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
60+
61+
Do not contact contributors directly about support or help with technical issues.
62+
63+
Credits
64+
=======
65+
66+
Authors
67+
-------
68+
69+
* ACSONE SA/NV
70+
71+
Contributors
72+
------------
73+
74+
- Tobias Zehntner [email protected] (ACSONE SA/NV)
75+
76+
Maintainers
77+
-----------
78+
79+
This module is maintained by the OCA.
80+
81+
.. image:: https://odoo-community.org/logo.png
82+
:alt: Odoo Community Association
83+
:target: https://odoo-community.org
84+
85+
OCA, or the Odoo Community Association, is a nonprofit organization whose
86+
mission is to support the collaborative development of Odoo features and
87+
promote its widespread use.
88+
89+
This module is part of the `OCA/contract <https://github.com/OCA/contract/tree/18.0/contract_line_defer_successor>`_ project on GitHub.
90+
91+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from . import models
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Copyright 2025 ACSONE SA/NV
2+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
3+
4+
{
5+
"name": "Contract Line Defer Successor",
6+
"summary": """Bridge Module contract_line_defer / contract_line_successor""",
7+
"version": "18.0.1.0.0",
8+
"license": "AGPL-3",
9+
"author": "ACSONE SA/NV,Odoo Community Association (OCA)",
10+
"website": "https://github.com/OCA/contract",
11+
"depends": [
12+
"contract_line_defer",
13+
"contract_line_successor",
14+
],
15+
"data": [
16+
"views/contract_line.xml",
17+
],
18+
"auto_install": True,
19+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from . import contract_line
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Copyright 2025 ACSONE SA/NV
2+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
3+
4+
from odoo import api, models
5+
6+
7+
class ContractLine(models.Model):
8+
_inherit = "contract.line"
9+
10+
@api.depends("is_deferred")
11+
def _compute_allowed(self):
12+
res = super()._compute_allowed()
13+
for line in self:
14+
if line.is_deferred:
15+
line.update(
16+
{
17+
"is_plan_successor_allowed": False,
18+
"is_stop_plan_successor_allowed": False,
19+
"is_stop_allowed": False,
20+
"is_cancel_allowed": False,
21+
"is_un_cancel_allowed": False,
22+
}
23+
)
24+
return res
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[build-system]
2+
requires = ["whool"]
3+
build-backend = "whool.buildapi"
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
BUSINESS NEED:
2+
- Requiring contract_line_defer and contract_line_successor
3+
4+
APPROACH:
5+
Bridge module to make the two modules work together.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Tobias Zehntner <[email protected]> (ACSONE SA/NV)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Bridge module between contract_line_defer and contract_line_successor
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
When a contract line is deferred, the line-successor functions are not available.

0 commit comments

Comments
 (0)