odoo-addon-contract 18.0.2.1.1.1__py3-none-any.whl → 18.0.2.1.3__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.
- odoo/addons/contract/README.rst +1 -1
- odoo/addons/contract/__manifest__.py +1 -1
- odoo/addons/contract/models/contract_line.py +20 -0
- odoo/addons/contract/static/description/index.html +1 -1
- odoo/addons/contract/tests/test_contract.py +17 -0
- odoo/addons/contract/views/contract_portal_templates.xml +5 -2
- {odoo_addon_contract-18.0.2.1.1.1.dist-info → odoo_addon_contract-18.0.2.1.3.dist-info}/METADATA +2 -2
- {odoo_addon_contract-18.0.2.1.1.1.dist-info → odoo_addon_contract-18.0.2.1.3.dist-info}/RECORD +10 -10
- {odoo_addon_contract-18.0.2.1.1.1.dist-info → odoo_addon_contract-18.0.2.1.3.dist-info}/WHEEL +0 -0
- {odoo_addon_contract-18.0.2.1.1.1.dist-info → odoo_addon_contract-18.0.2.1.3.dist-info}/top_level.txt +0 -0
odoo/addons/contract/README.rst
CHANGED
|
@@ -11,7 +11,7 @@ Recurring - Contracts Management
|
|
|
11
11
|
!! This file is generated by oca-gen-addon-readme !!
|
|
12
12
|
!! changes will be overwritten. !!
|
|
13
13
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
14
|
-
!! source digest: sha256:
|
|
14
|
+
!! source digest: sha256:0adf39a4fdc6cae53a64d10e241e495a15206999bca5af77a1e6ed738ffe73c7
|
|
15
15
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
16
16
|
|
|
17
17
|
.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png
|
|
@@ -69,6 +69,26 @@ class ContractLine(models.Model):
|
|
|
69
69
|
max_date_end=False,
|
|
70
70
|
)
|
|
71
71
|
|
|
72
|
+
def _get_analytic_distribution_arguments(self):
|
|
73
|
+
self.ensure_one()
|
|
74
|
+
partner_categ_ids = self.contract_id.partner_id.category_id.ids
|
|
75
|
+
return {
|
|
76
|
+
"product_id": self.product_id.id,
|
|
77
|
+
"product_categ_id": self.product_id.categ_id.id,
|
|
78
|
+
"partner_id": self.contract_id.partner_id.id,
|
|
79
|
+
"partner_category_id": partner_categ_ids,
|
|
80
|
+
"company_id": self.company_id.id,
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
@api.depends("contract_id.partner_id", "product_id")
|
|
84
|
+
def _compute_analytic_distribution(self):
|
|
85
|
+
for line in self:
|
|
86
|
+
if not line.display_type:
|
|
87
|
+
distribution = line.env[
|
|
88
|
+
"account.analytic.distribution.model"
|
|
89
|
+
]._get_distribution(line._get_analytic_distribution_arguments())
|
|
90
|
+
line.analytic_distribution = distribution or line.analytic_distribution
|
|
91
|
+
|
|
72
92
|
@api.constrains("recurring_next_date", "date_start")
|
|
73
93
|
def _check_recurring_next_date_start_date(self):
|
|
74
94
|
for line in self:
|
|
@@ -372,7 +372,7 @@ ul.auto-toc {
|
|
|
372
372
|
!! This file is generated by oca-gen-addon-readme !!
|
|
373
373
|
!! changes will be overwritten. !!
|
|
374
374
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
375
|
-
!! source digest: sha256:
|
|
375
|
+
!! source digest: sha256:0adf39a4fdc6cae53a64d10e241e495a15206999bca5af77a1e6ed738ffe73c7
|
|
376
376
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
|
377
377
|
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Production/Stable" src="https://img.shields.io/badge/maturity-Production%2FStable-green.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/license-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/contract/tree/18.0/contract"><img alt="OCA/contract" src="https://img.shields.io/badge/github-OCA%2Fcontract-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/contract-18-0/contract-18-0-contract"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/contract&target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
|
|
378
378
|
<p>This module enables contracts management with recurring invoicing
|
|
@@ -1593,3 +1593,20 @@ class TestContract(TestContractBase):
|
|
|
1593
1593
|
# Case 4: two contract lines, each one with one analytic account
|
|
1594
1594
|
new_contract_line.analytic_distribution = {self.analytic_account_2.id: 100}
|
|
1595
1595
|
self.assertFalse(self.contract.group_id)
|
|
1596
|
+
|
|
1597
|
+
def test_analytic_distribution(self):
|
|
1598
|
+
# Create an analytic distribution model for product 1
|
|
1599
|
+
analytic_plan = self.env["account.analytic.plan"].create({"name": "Plan"})
|
|
1600
|
+
analytic_account = self.env["account.analytic.account"].create(
|
|
1601
|
+
{"name": "Test", "plan_id": analytic_plan.id}
|
|
1602
|
+
)
|
|
1603
|
+
self.env["account.analytic.distribution.model"].create(
|
|
1604
|
+
{
|
|
1605
|
+
"product_id": self.product_1.id,
|
|
1606
|
+
"analytic_distribution": {str(analytic_account.id): 100},
|
|
1607
|
+
}
|
|
1608
|
+
)
|
|
1609
|
+
new_contract_line = self.env["contract.line"].create(self.line_vals)
|
|
1610
|
+
self.assertEqual(
|
|
1611
|
+
new_contract_line.analytic_distribution, {str(analytic_account.id): 100}
|
|
1612
|
+
)
|
|
@@ -228,7 +228,7 @@
|
|
|
228
228
|
<tbody class="contract_tbody">
|
|
229
229
|
<t t-foreach="contract.contract_line_ids" t-as="line">
|
|
230
230
|
<tr
|
|
231
|
-
t-att-class="'bg-200 font-weight-bold o_line_section' if line.display_type == 'line_section' else 'font-italic o_line_note' if line.display_type == 'line_note' else ''"
|
|
231
|
+
t-att-class="'bg-200 font-weight-bold o_line_section' if line.display_type == 'line_section' else 'font-italic o_line_note' if line.display_type == 'line_note' else 'text-muted' if line.is_canceled else ''"
|
|
232
232
|
>
|
|
233
233
|
<t t-if="not line.display_type">
|
|
234
234
|
<td name="td_name">
|
|
@@ -263,7 +263,10 @@
|
|
|
263
263
|
name="td_recurring_next_date"
|
|
264
264
|
class="text-right"
|
|
265
265
|
>
|
|
266
|
-
<span
|
|
266
|
+
<span
|
|
267
|
+
t-field="line.recurring_next_date"
|
|
268
|
+
t-if="not line.is_canceled"
|
|
269
|
+
/>
|
|
267
270
|
</td>
|
|
268
271
|
</t>
|
|
269
272
|
<t t-if="line.display_type == 'line_section'">
|
{odoo_addon_contract-18.0.2.1.1.1.dist-info → odoo_addon_contract-18.0.2.1.3.dist-info}/METADATA
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: odoo-addon-contract
|
|
3
|
-
Version: 18.0.2.1.
|
|
3
|
+
Version: 18.0.2.1.3
|
|
4
4
|
Requires-Python: >=3.10
|
|
5
5
|
Requires-Dist: odoo==18.0.*
|
|
6
6
|
Summary: Recurring - Contracts Management
|
|
@@ -28,7 +28,7 @@ Recurring - Contracts Management
|
|
|
28
28
|
!! This file is generated by oca-gen-addon-readme !!
|
|
29
29
|
!! changes will be overwritten. !!
|
|
30
30
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
31
|
-
!! source digest: sha256:
|
|
31
|
+
!! source digest: sha256:0adf39a4fdc6cae53a64d10e241e495a15206999bca5af77a1e6ed738ffe73c7
|
|
32
32
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
33
33
|
|
|
34
34
|
.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png
|
{odoo_addon_contract-18.0.2.1.1.1.dist-info → odoo_addon_contract-18.0.2.1.3.dist-info}/RECORD
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
odoo/addons/contract/README.rst,sha256=
|
|
1
|
+
odoo/addons/contract/README.rst,sha256=747JZ19LPL5aN6RVgMtddZUW_-uErnBqRRfE3WNVQ0c,6176
|
|
2
2
|
odoo/addons/contract/__init__.py,sha256=dnUeA_K1torbiMNF3tt2dtECdk-FkWm01DByr9MBMIA,69
|
|
3
|
-
odoo/addons/contract/__manifest__.py,sha256=
|
|
3
|
+
odoo/addons/contract/__manifest__.py,sha256=VN2nSStXlJ9kIgQqfNWfbV2PSssuLQ9ku4hpPqR83Mk,1777
|
|
4
4
|
odoo/addons/contract/controllers/__init__.py,sha256=ZAYSY9pxyJjumL2QVLuxqtBzjLwKPiQsVXMBAWvNGGY,85
|
|
5
5
|
odoo/addons/contract/controllers/main.py,sha256=fvOq4YUZvZX9AHlXXIj5u_Lv3W7l-zxEKRXgnLaojjw,3931
|
|
6
6
|
odoo/addons/contract/data/contract_cron.xml,sha256=yYTdn4fmIU5zsfFEgx-H_55M9nwc0WfJ3Q6ufxQKPt8,549
|
|
@@ -85,7 +85,7 @@ odoo/addons/contract/models/__init__.py,sha256=n3UpKXb_Oi-2ebHho6pWrd6kw_cMK6GG1
|
|
|
85
85
|
odoo/addons/contract/models/account_move.py,sha256=QdSF_E5cifIgOiPiZ1PKXxuA5y9y4PC-kkUurDdGKo4,387
|
|
86
86
|
odoo/addons/contract/models/account_move_line.py,sha256=X-GJ66Q_6BySwImRLMpFxgIqfhsOaEUb6xLSQveB0uc,396
|
|
87
87
|
odoo/addons/contract/models/contract.py,sha256=2zUJmp8-4ZhOxVJ4sLE9q1dotjXbeXsolA8PZx2LxGc,26533
|
|
88
|
-
odoo/addons/contract/models/contract_line.py,sha256=
|
|
88
|
+
odoo/addons/contract/models/contract_line.py,sha256=2kfxbiIW5xAniMO43Vz5j2oG39aMIjbX4217XH-nADs,11539
|
|
89
89
|
odoo/addons/contract/models/contract_modification.py,sha256=d0tv2Zn6_WrR633pmzwAavzC2I3sLYmGokOKtMn7AYY,1147
|
|
90
90
|
odoo/addons/contract/models/contract_recurring_mixin.py,sha256=KE4sMLd241v1RgTtdPGHbak-RD2sJmSLYsKNPWaQ8Mg,9278
|
|
91
91
|
odoo/addons/contract/models/contract_tag.py,sha256=h5Up3F6ijIhQbYSB6xCqZVVUtyLYxfj4MsAIKv2Q5-Q,434
|
|
@@ -103,7 +103,7 @@ odoo/addons/contract/security/contract_security.xml,sha256=HZuxPZMX-EMf8QtXdwbnL
|
|
|
103
103
|
odoo/addons/contract/security/contract_tag.xml,sha256=cetorNv2M6tHKHcnfwUeX85EZyT3tpoBLF8W-XZ7sK8,890
|
|
104
104
|
odoo/addons/contract/security/ir.model.access.csv,sha256=icelaOGF35WgUrxB2l18IVfcUNlPuJnzy4LG676_zt0,1569
|
|
105
105
|
odoo/addons/contract/static/description/icon.png,sha256=6xBPJauaFOF0KDHfHgQopSc28kKvxMaeoQFQWZtfZDo,9455
|
|
106
|
-
odoo/addons/contract/static/description/index.html,sha256=
|
|
106
|
+
odoo/addons/contract/static/description/index.html,sha256=fVWQTXGDJsRjhuQM6RuyTzUsMzTkNXXLRHdzqWVlDY0,17445
|
|
107
107
|
odoo/addons/contract/static/src/img/contract_icon.svg,sha256=2IFs70Oy9WtE9of2SO4Vj08mwzcw-I5s_LL3UvtKlus,9643
|
|
108
108
|
odoo/addons/contract/static/src/js/contract_portal_tour.esm.js,sha256=ULRzpiiKOhvKx0P-SBoMVBJzGtOQfi70yf2-1djxFuk,589
|
|
109
109
|
odoo/addons/contract/static/src/screenshots/portal-detail.png,sha256=8pMCU4nqwnSM-rbWZd3iJxXdYLBiYzuWNvT_NKslcoo,113399
|
|
@@ -111,13 +111,13 @@ odoo/addons/contract/static/src/screenshots/portal-list.png,sha256=gWSW4rlncFZem
|
|
|
111
111
|
odoo/addons/contract/static/src/screenshots/portal-my.png,sha256=YrtvTDjoc839Eka5zSZ8FQhtzoMEeW4FrXGrYAwAkS4,22985
|
|
112
112
|
odoo/addons/contract/static/src/scss/frontend.scss,sha256=LilfXNOwW8D2eXOMY0ZgrEv8hU5Vn1u9inCEIJp8D0g,1863
|
|
113
113
|
odoo/addons/contract/tests/__init__.py,sha256=iive8lH1QtzKmbhBBzzU4AQgSAgWxdJF1mMLEFOiA4c,138
|
|
114
|
-
odoo/addons/contract/tests/test_contract.py,sha256=
|
|
114
|
+
odoo/addons/contract/tests/test_contract.py,sha256=TpmiEFHrNyn34_7wEyjqAra8niA5NjD1_byzdWDwcjo,69371
|
|
115
115
|
odoo/addons/contract/tests/test_contract_manually_create_invoice.py,sha256=GfA-hDaI4mSztE-2zQgFE_bQM-nsKzFhQRybi8EGeLo,2541
|
|
116
116
|
odoo/addons/contract/tests/test_multicompany.py,sha256=0CPfv0-JSFsXRInazugzzYrogSZFa6lrdNwuBLbaTX8,4552
|
|
117
117
|
odoo/addons/contract/tests/test_portal.py,sha256=pyhXyzB5o-jdzJW6x10tF7pRuIUQWLQXTSUsB7nUB2k,1298
|
|
118
118
|
odoo/addons/contract/views/contract.xml,sha256=A2ac8FZ5Yv3A8R6NdDlSLsSInA2bxicSER35r7Ed-aE,27247
|
|
119
119
|
odoo/addons/contract/views/contract_line.xml,sha256=lv4yMV7z6viOdRbjKAovbuk0if8rc8ORG6qrn4Zv7RQ,11368
|
|
120
|
-
odoo/addons/contract/views/contract_portal_templates.xml,sha256=
|
|
120
|
+
odoo/addons/contract/views/contract_portal_templates.xml,sha256=ZGEXay6ETChCPpTh97ilzNTAj0crwfX02zGlmjbzpaI,17178
|
|
121
121
|
odoo/addons/contract/views/contract_tag.xml,sha256=rgaNYk1wJxX9Jm0W0qOYEUJSBUdD3emL5_RuQYJtUI8,1678
|
|
122
122
|
odoo/addons/contract/views/contract_template.xml,sha256=3AT-3amt3J3qePo9cYXDusPlRi46yQUY73FAerURxrE,7864
|
|
123
123
|
odoo/addons/contract/views/contract_template_line.xml,sha256=ZJHlC7crsjjp0qm4MzWMItCKhR8MKdP9hexyJhLr5Pc,3929
|
|
@@ -126,7 +126,7 @@ odoo/addons/contract/views/res_partner_view.xml,sha256=v7RAxXm0japPQeOsf2zLgieZH
|
|
|
126
126
|
odoo/addons/contract/wizards/__init__.py,sha256=ZSirPz2XSS6FGPESnPJHqIJamHdHrdL7j2oYu_kglTs,47
|
|
127
127
|
odoo/addons/contract/wizards/contract_manually_create_invoice.py,sha256=LIOStLcchRqOeRbHCPnEmrEj1c9_8BSW6HixsBmU57Y,2986
|
|
128
128
|
odoo/addons/contract/wizards/contract_manually_create_invoice.xml,sha256=JPgtH9mDP74PhTgsJ0lZ1zmn8P3WWRRKp9QUWn38W-4,3730
|
|
129
|
-
odoo_addon_contract-18.0.2.1.
|
|
130
|
-
odoo_addon_contract-18.0.2.1.
|
|
131
|
-
odoo_addon_contract-18.0.2.1.
|
|
132
|
-
odoo_addon_contract-18.0.2.1.
|
|
129
|
+
odoo_addon_contract-18.0.2.1.3.dist-info/METADATA,sha256=rF5tfdGK6us7n1O65MBJwW9oRvrOmxjicqLTpfYT-co,6785
|
|
130
|
+
odoo_addon_contract-18.0.2.1.3.dist-info/WHEEL,sha256=ZhOvUsYhy81Dx67gN3TV0RchQWBIIzutDZaJODDg2Vo,81
|
|
131
|
+
odoo_addon_contract-18.0.2.1.3.dist-info/top_level.txt,sha256=QE6RBQ0QX5f4eFuUcGgU5Kbq1A_qJcDs-e_vpr6pmfU,4
|
|
132
|
+
odoo_addon_contract-18.0.2.1.3.dist-info/RECORD,,
|
{odoo_addon_contract-18.0.2.1.1.1.dist-info → odoo_addon_contract-18.0.2.1.3.dist-info}/WHEEL
RENAMED
|
File without changes
|
|
File without changes
|