odoo-addon-project-task-parent-completion-blocking 16.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.
@@ -0,0 +1,87 @@
1
+ =======================================
2
+ Project task parent completion blocking
3
+ =======================================
4
+
5
+ ..
6
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
7
+ !! This file is generated by oca-gen-addon-readme !!
8
+ !! changes will be overwritten. !!
9
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10
+ !! source digest: sha256:d3e2eadb57ab9a1d05c17ebc2d3950a473504aebc8d4a267af34707905547ac9
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%2Fproject-lightgray.png?logo=github
20
+ :target: https://github.com/OCA/project/tree/16.0/project_task_parent_completion_blocking
21
+ :alt: OCA/project
22
+ .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
23
+ :target: https://translation.odoo-community.org/projects/project-16-0/project-16-0-project_task_parent_completion_blocking
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/project&target_branch=16.0
27
+ :alt: Try me on Runboat
28
+
29
+ |badge1| |badge2| |badge3| |badge4| |badge5|
30
+
31
+ Prevents a parent task from beeing completed if a child task isn't completed.
32
+
33
+ **Table of contents**
34
+
35
+ .. contents::
36
+ :local:
37
+
38
+ Bug Tracker
39
+ ===========
40
+
41
+ Bugs are tracked on `GitHub Issues <https://github.com/OCA/project/issues>`_.
42
+ In case of trouble, please check there if your issue has already been reported.
43
+ If you spotted it first, help us to smash it by providing a detailed and welcomed
44
+ `feedback <https://github.com/OCA/project/issues/new?body=module:%20project_task_parent_completion_blocking%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
45
+
46
+ Do not contact contributors directly about support or help with technical issues.
47
+
48
+ Credits
49
+ =======
50
+
51
+ Authors
52
+ ~~~~~~~
53
+
54
+ * Tecnativa
55
+
56
+ Contributors
57
+ ~~~~~~~~~~~~
58
+
59
+ * `Tecnativa <https://www.tecnativa.com>`_:
60
+
61
+ * Pedro M. Baeza
62
+ * David Bañón
63
+
64
+ Maintainers
65
+ ~~~~~~~~~~~
66
+
67
+ This module is maintained by the OCA.
68
+
69
+ .. image:: https://odoo-community.org/logo.png
70
+ :alt: Odoo Community Association
71
+ :target: https://odoo-community.org
72
+
73
+ OCA, or the Odoo Community Association, is a nonprofit organization whose
74
+ mission is to support the collaborative development of Odoo features and
75
+ promote its widespread use.
76
+
77
+ .. |maintainer-david-banon-tecnativa| image:: https://github.com/david-banon-tecnativa.png?size=40px
78
+ :target: https://github.com/david-banon-tecnativa
79
+ :alt: david-banon-tecnativa
80
+
81
+ Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
82
+
83
+ |maintainer-david-banon-tecnativa|
84
+
85
+ This module is part of the `OCA/project <https://github.com/OCA/project/tree/16.0/project_task_parent_completion_blocking>`_ project on GitHub.
86
+
87
+ You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
@@ -0,0 +1 @@
1
+ from . import models
@@ -0,0 +1,15 @@
1
+ # Copyright 2025 Tecnativa David Bañón
2
+ # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
3
+
4
+ {
5
+ "name": "Project task parent completion blocking",
6
+ "version": "16.0.1.0.0",
7
+ "category": "Project Management",
8
+ "summary": "Prevents a parent task from being completed if any children task isn't.",
9
+ "author": "Tecnativa, Odoo Community Association (OCA)",
10
+ "maintainers": ["david-banon-tecnativa"],
11
+ "website": "https://github.com/OCA/project",
12
+ "license": "AGPL-3",
13
+ "installable": True,
14
+ "depends": ["project"],
15
+ }
@@ -0,0 +1,30 @@
1
+ # Translation of Odoo Server.
2
+ # This file contains the translation of the following modules:
3
+ # * project_task_parent_completion_blocking
4
+ #
5
+ msgid ""
6
+ msgstr ""
7
+ "Project-Id-Version: Odoo Server 16.0\n"
8
+ "Report-Msgid-Bugs-To: \n"
9
+ "POT-Creation-Date: 2025-04-10 08:11+0000\n"
10
+ "PO-Revision-Date: 2025-04-10 10:15+0200\n"
11
+ "Last-Translator: \n"
12
+ "Language-Team: \n"
13
+ "Language: es\n"
14
+ "MIME-Version: 1.0\n"
15
+ "Content-Type: text/plain; charset=UTF-8\n"
16
+ "Content-Transfer-Encoding: 8bit\n"
17
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
18
+ "X-Generator: Poedit 3.6\n"
19
+
20
+ #. module: project_task_parent_completion_blocking
21
+ #: model:ir.model,name:project_task_parent_completion_blocking.model_project_task
22
+ msgid "Task"
23
+ msgstr "Tarea"
24
+
25
+ #. module: project_task_parent_completion_blocking
26
+ #. odoo-python
27
+ #: code:addons/project_task_parent_completion_blocking/models/project_task.py:0
28
+ #, python-format
29
+ msgid "You can't close this task because it has open subtasks."
30
+ msgstr "No puede cerrar esta tarea porque tiene subtareas abiertas."
@@ -0,0 +1,26 @@
1
+ # Translation of Odoo Server.
2
+ # This file contains the translation of the following modules:
3
+ # * project_task_parent_completion_blocking
4
+ #
5
+ msgid ""
6
+ msgstr ""
7
+ "Project-Id-Version: Odoo Server 16.0\n"
8
+ "Report-Msgid-Bugs-To: \n"
9
+ "Last-Translator: \n"
10
+ "Language-Team: \n"
11
+ "MIME-Version: 1.0\n"
12
+ "Content-Type: text/plain; charset=UTF-8\n"
13
+ "Content-Transfer-Encoding: \n"
14
+ "Plural-Forms: \n"
15
+
16
+ #. module: project_task_parent_completion_blocking
17
+ #: model:ir.model,name:project_task_parent_completion_blocking.model_project_task
18
+ msgid "Task"
19
+ msgstr ""
20
+
21
+ #. module: project_task_parent_completion_blocking
22
+ #. odoo-python
23
+ #: code:addons/project_task_parent_completion_blocking/models/project_task.py:0
24
+ #, python-format
25
+ msgid "You can't close this task because it has open subtasks."
26
+ msgstr ""
@@ -0,0 +1 @@
1
+ from . import project_task
@@ -0,0 +1,16 @@
1
+ from odoo import _, api, models
2
+ from odoo.exceptions import ValidationError
3
+
4
+
5
+ class ProjectTask(models.Model):
6
+ _inherit = "project.task"
7
+
8
+ @api.constrains("stage_id")
9
+ def _check_subtasks_done_before_closing(self):
10
+ for task in self:
11
+ if task.stage_id.fold and task.child_ids.filtered(
12
+ lambda t: not t.stage_id.fold
13
+ ):
14
+ raise ValidationError(
15
+ _("You can't close this task because it has open subtasks.")
16
+ )
@@ -0,0 +1,4 @@
1
+ * `Tecnativa <https://www.tecnativa.com>`_:
2
+
3
+ * Pedro M. Baeza
4
+ * David Bañón
@@ -0,0 +1 @@
1
+ Prevents a parent task from beeing completed if a child task isn't completed.
@@ -0,0 +1,429 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
3
+ <head>
4
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5
+ <meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
6
+ <title>Project task parent completion blocking</title>
7
+ <style type="text/css">
8
+
9
+ /*
10
+ :Author: David Goodger (goodger@python.org)
11
+ :Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
12
+ :Copyright: This stylesheet has been placed in the public domain.
13
+
14
+ Default cascading style sheet for the HTML output of Docutils.
15
+ Despite the name, some widely supported CSS2 features are used.
16
+
17
+ See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
18
+ customize this style sheet.
19
+ */
20
+
21
+ /* used to remove borders from tables and images */
22
+ .borderless, table.borderless td, table.borderless th {
23
+ border: 0 }
24
+
25
+ table.borderless td, table.borderless th {
26
+ /* Override padding for "table.docutils td" with "! important".
27
+ The right padding separates the table cells. */
28
+ padding: 0 0.5em 0 0 ! important }
29
+
30
+ .first {
31
+ /* Override more specific margin styles with "! important". */
32
+ margin-top: 0 ! important }
33
+
34
+ .last, .with-subtitle {
35
+ margin-bottom: 0 ! important }
36
+
37
+ .hidden {
38
+ display: none }
39
+
40
+ .subscript {
41
+ vertical-align: sub;
42
+ font-size: smaller }
43
+
44
+ .superscript {
45
+ vertical-align: super;
46
+ font-size: smaller }
47
+
48
+ a.toc-backref {
49
+ text-decoration: none ;
50
+ color: black }
51
+
52
+ blockquote.epigraph {
53
+ margin: 2em 5em ; }
54
+
55
+ dl.docutils dd {
56
+ margin-bottom: 0.5em }
57
+
58
+ object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
59
+ overflow: hidden;
60
+ }
61
+
62
+ /* Uncomment (and remove this text!) to get bold-faced definition list terms
63
+ dl.docutils dt {
64
+ font-weight: bold }
65
+ */
66
+
67
+ div.abstract {
68
+ margin: 2em 5em }
69
+
70
+ div.abstract p.topic-title {
71
+ font-weight: bold ;
72
+ text-align: center }
73
+
74
+ div.admonition, div.attention, div.caution, div.danger, div.error,
75
+ div.hint, div.important, div.note, div.tip, div.warning {
76
+ margin: 2em ;
77
+ border: medium outset ;
78
+ padding: 1em }
79
+
80
+ div.admonition p.admonition-title, div.hint p.admonition-title,
81
+ div.important p.admonition-title, div.note p.admonition-title,
82
+ div.tip p.admonition-title {
83
+ font-weight: bold ;
84
+ font-family: sans-serif }
85
+
86
+ div.attention p.admonition-title, div.caution p.admonition-title,
87
+ div.danger p.admonition-title, div.error p.admonition-title,
88
+ div.warning p.admonition-title, .code .error {
89
+ color: red ;
90
+ font-weight: bold ;
91
+ font-family: sans-serif }
92
+
93
+ /* Uncomment (and remove this text!) to get reduced vertical space in
94
+ compound paragraphs.
95
+ div.compound .compound-first, div.compound .compound-middle {
96
+ margin-bottom: 0.5em }
97
+
98
+ div.compound .compound-last, div.compound .compound-middle {
99
+ margin-top: 0.5em }
100
+ */
101
+
102
+ div.dedication {
103
+ margin: 2em 5em ;
104
+ text-align: center ;
105
+ font-style: italic }
106
+
107
+ div.dedication p.topic-title {
108
+ font-weight: bold ;
109
+ font-style: normal }
110
+
111
+ div.figure {
112
+ margin-left: 2em ;
113
+ margin-right: 2em }
114
+
115
+ div.footer, div.header {
116
+ clear: both;
117
+ font-size: smaller }
118
+
119
+ div.line-block {
120
+ display: block ;
121
+ margin-top: 1em ;
122
+ margin-bottom: 1em }
123
+
124
+ div.line-block div.line-block {
125
+ margin-top: 0 ;
126
+ margin-bottom: 0 ;
127
+ margin-left: 1.5em }
128
+
129
+ div.sidebar {
130
+ margin: 0 0 0.5em 1em ;
131
+ border: medium outset ;
132
+ padding: 1em ;
133
+ background-color: #ffffee ;
134
+ width: 40% ;
135
+ float: right ;
136
+ clear: right }
137
+
138
+ div.sidebar p.rubric {
139
+ font-family: sans-serif ;
140
+ font-size: medium }
141
+
142
+ div.system-messages {
143
+ margin: 5em }
144
+
145
+ div.system-messages h1 {
146
+ color: red }
147
+
148
+ div.system-message {
149
+ border: medium outset ;
150
+ padding: 1em }
151
+
152
+ div.system-message p.system-message-title {
153
+ color: red ;
154
+ font-weight: bold }
155
+
156
+ div.topic {
157
+ margin: 2em }
158
+
159
+ h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
160
+ h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
161
+ margin-top: 0.4em }
162
+
163
+ h1.title {
164
+ text-align: center }
165
+
166
+ h2.subtitle {
167
+ text-align: center }
168
+
169
+ hr.docutils {
170
+ width: 75% }
171
+
172
+ img.align-left, .figure.align-left, object.align-left, table.align-left {
173
+ clear: left ;
174
+ float: left ;
175
+ margin-right: 1em }
176
+
177
+ img.align-right, .figure.align-right, object.align-right, table.align-right {
178
+ clear: right ;
179
+ float: right ;
180
+ margin-left: 1em }
181
+
182
+ img.align-center, .figure.align-center, object.align-center {
183
+ display: block;
184
+ margin-left: auto;
185
+ margin-right: auto;
186
+ }
187
+
188
+ table.align-center {
189
+ margin-left: auto;
190
+ margin-right: auto;
191
+ }
192
+
193
+ .align-left {
194
+ text-align: left }
195
+
196
+ .align-center {
197
+ clear: both ;
198
+ text-align: center }
199
+
200
+ .align-right {
201
+ text-align: right }
202
+
203
+ /* reset inner alignment in figures */
204
+ div.align-right {
205
+ text-align: inherit }
206
+
207
+ /* div.align-center * { */
208
+ /* text-align: left } */
209
+
210
+ .align-top {
211
+ vertical-align: top }
212
+
213
+ .align-middle {
214
+ vertical-align: middle }
215
+
216
+ .align-bottom {
217
+ vertical-align: bottom }
218
+
219
+ ol.simple, ul.simple {
220
+ margin-bottom: 1em }
221
+
222
+ ol.arabic {
223
+ list-style: decimal }
224
+
225
+ ol.loweralpha {
226
+ list-style: lower-alpha }
227
+
228
+ ol.upperalpha {
229
+ list-style: upper-alpha }
230
+
231
+ ol.lowerroman {
232
+ list-style: lower-roman }
233
+
234
+ ol.upperroman {
235
+ list-style: upper-roman }
236
+
237
+ p.attribution {
238
+ text-align: right ;
239
+ margin-left: 50% }
240
+
241
+ p.caption {
242
+ font-style: italic }
243
+
244
+ p.credits {
245
+ font-style: italic ;
246
+ font-size: smaller }
247
+
248
+ p.label {
249
+ white-space: nowrap }
250
+
251
+ p.rubric {
252
+ font-weight: bold ;
253
+ font-size: larger ;
254
+ color: maroon ;
255
+ text-align: center }
256
+
257
+ p.sidebar-title {
258
+ font-family: sans-serif ;
259
+ font-weight: bold ;
260
+ font-size: larger }
261
+
262
+ p.sidebar-subtitle {
263
+ font-family: sans-serif ;
264
+ font-weight: bold }
265
+
266
+ p.topic-title {
267
+ font-weight: bold }
268
+
269
+ pre.address {
270
+ margin-bottom: 0 ;
271
+ margin-top: 0 ;
272
+ font: inherit }
273
+
274
+ pre.literal-block, pre.doctest-block, pre.math, pre.code {
275
+ margin-left: 2em ;
276
+ margin-right: 2em }
277
+
278
+ pre.code .ln { color: gray; } /* line numbers */
279
+ pre.code, code { background-color: #eeeeee }
280
+ pre.code .comment, code .comment { color: #5C6576 }
281
+ pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
282
+ pre.code .literal.string, code .literal.string { color: #0C5404 }
283
+ pre.code .name.builtin, code .name.builtin { color: #352B84 }
284
+ pre.code .deleted, code .deleted { background-color: #DEB0A1}
285
+ pre.code .inserted, code .inserted { background-color: #A3D289}
286
+
287
+ span.classifier {
288
+ font-family: sans-serif ;
289
+ font-style: oblique }
290
+
291
+ span.classifier-delimiter {
292
+ font-family: sans-serif ;
293
+ font-weight: bold }
294
+
295
+ span.interpreted {
296
+ font-family: sans-serif }
297
+
298
+ span.option {
299
+ white-space: nowrap }
300
+
301
+ span.pre {
302
+ white-space: pre }
303
+
304
+ span.problematic, pre.problematic {
305
+ color: red }
306
+
307
+ span.section-subtitle {
308
+ /* font-size relative to parent (h1..h6 element) */
309
+ font-size: 80% }
310
+
311
+ table.citation {
312
+ border-left: solid 1px gray;
313
+ margin-left: 1px }
314
+
315
+ table.docinfo {
316
+ margin: 2em 4em }
317
+
318
+ table.docutils {
319
+ margin-top: 0.5em ;
320
+ margin-bottom: 0.5em }
321
+
322
+ table.footnote {
323
+ border-left: solid 1px black;
324
+ margin-left: 1px }
325
+
326
+ table.docutils td, table.docutils th,
327
+ table.docinfo td, table.docinfo th {
328
+ padding-left: 0.5em ;
329
+ padding-right: 0.5em ;
330
+ vertical-align: top }
331
+
332
+ table.docutils th.field-name, table.docinfo th.docinfo-name {
333
+ font-weight: bold ;
334
+ text-align: left ;
335
+ white-space: nowrap ;
336
+ padding-left: 0 }
337
+
338
+ /* "booktabs" style (no vertical lines) */
339
+ table.docutils.booktabs {
340
+ border: 0px;
341
+ border-top: 2px solid;
342
+ border-bottom: 2px solid;
343
+ border-collapse: collapse;
344
+ }
345
+ table.docutils.booktabs * {
346
+ border: 0px;
347
+ }
348
+ table.docutils.booktabs th {
349
+ border-bottom: thin solid;
350
+ text-align: left;
351
+ }
352
+
353
+ h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
354
+ h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
355
+ font-size: 100% }
356
+
357
+ ul.auto-toc {
358
+ list-style-type: none }
359
+
360
+ </style>
361
+ </head>
362
+ <body>
363
+ <div class="document" id="project-task-parent-completion-blocking">
364
+ <h1 class="title">Project task parent completion blocking</h1>
365
+
366
+ <!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
367
+ !! This file is generated by oca-gen-addon-readme !!
368
+ !! changes will be overwritten. !!
369
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
370
+ !! source digest: sha256:d3e2eadb57ab9a1d05c17ebc2d3950a473504aebc8d4a267af34707905547ac9
371
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
372
+ <p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.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/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/project/tree/16.0/project_task_parent_completion_blocking"><img alt="OCA/project" src="https://img.shields.io/badge/github-OCA%2Fproject-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/project-16-0/project-16-0-project_task_parent_completion_blocking"><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/project&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
373
+ <p>Prevents a parent task from beeing completed if a child task isn’t completed.</p>
374
+ <p><strong>Table of contents</strong></p>
375
+ <div class="contents local topic" id="contents">
376
+ <ul class="simple">
377
+ <li><a class="reference internal" href="#bug-tracker" id="toc-entry-1">Bug Tracker</a></li>
378
+ <li><a class="reference internal" href="#credits" id="toc-entry-2">Credits</a><ul>
379
+ <li><a class="reference internal" href="#authors" id="toc-entry-3">Authors</a></li>
380
+ <li><a class="reference internal" href="#contributors" id="toc-entry-4">Contributors</a></li>
381
+ <li><a class="reference internal" href="#maintainers" id="toc-entry-5">Maintainers</a></li>
382
+ </ul>
383
+ </li>
384
+ </ul>
385
+ </div>
386
+ <div class="section" id="bug-tracker">
387
+ <h1><a class="toc-backref" href="#toc-entry-1">Bug Tracker</a></h1>
388
+ <p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/project/issues">GitHub Issues</a>.
389
+ In case of trouble, please check there if your issue has already been reported.
390
+ If you spotted it first, help us to smash it by providing a detailed and welcomed
391
+ <a class="reference external" href="https://github.com/OCA/project/issues/new?body=module:%20project_task_parent_completion_blocking%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
392
+ <p>Do not contact contributors directly about support or help with technical issues.</p>
393
+ </div>
394
+ <div class="section" id="credits">
395
+ <h1><a class="toc-backref" href="#toc-entry-2">Credits</a></h1>
396
+ <div class="section" id="authors">
397
+ <h2><a class="toc-backref" href="#toc-entry-3">Authors</a></h2>
398
+ <ul class="simple">
399
+ <li>Tecnativa</li>
400
+ </ul>
401
+ </div>
402
+ <div class="section" id="contributors">
403
+ <h2><a class="toc-backref" href="#toc-entry-4">Contributors</a></h2>
404
+ <ul class="simple">
405
+ <li><a class="reference external" href="https://www.tecnativa.com">Tecnativa</a>:<ul>
406
+ <li>Pedro M. Baeza</li>
407
+ <li>David Bañón</li>
408
+ </ul>
409
+ </li>
410
+ </ul>
411
+ </div>
412
+ <div class="section" id="maintainers">
413
+ <h2><a class="toc-backref" href="#toc-entry-5">Maintainers</a></h2>
414
+ <p>This module is maintained by the OCA.</p>
415
+ <a class="reference external image-reference" href="https://odoo-community.org">
416
+ <img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
417
+ </a>
418
+ <p>OCA, or the Odoo Community Association, is a nonprofit organization whose
419
+ mission is to support the collaborative development of Odoo features and
420
+ promote its widespread use.</p>
421
+ <p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainer</a>:</p>
422
+ <p><a class="reference external image-reference" href="https://github.com/david-banon-tecnativa"><img alt="david-banon-tecnativa" src="https://github.com/david-banon-tecnativa.png?size=40px" /></a></p>
423
+ <p>This module is part of the <a class="reference external" href="https://github.com/OCA/project/tree/16.0/project_task_parent_completion_blocking">OCA/project</a> project on GitHub.</p>
424
+ <p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
425
+ </div>
426
+ </div>
427
+ </div>
428
+ </body>
429
+ </html>
@@ -0,0 +1 @@
1
+ from . import test_project_task_parent_completion_blocking
@@ -0,0 +1,66 @@
1
+ from odoo.exceptions import ValidationError
2
+ from odoo.tests.common import TransactionCase
3
+
4
+
5
+ class TestParentChildBlock(TransactionCase):
6
+ @classmethod
7
+ def setUpClass(cls):
8
+ super().setUpClass()
9
+ cls.test_project = (
10
+ cls.env["project.project"]
11
+ .with_context(mail_create_nolog=True)
12
+ .create(
13
+ {
14
+ "name": "Test Project",
15
+ "privacy_visibility": "employees",
16
+ "alias_name": "project+test",
17
+ }
18
+ )
19
+ )
20
+ cls.parent_task = (
21
+ cls.env["project.task"]
22
+ .with_context(mail_create_nolog=True)
23
+ .create({"name": "Pigs UserTask", "project_id": cls.test_project.id})
24
+ )
25
+ cls.child_task = (
26
+ cls.env["project.task"]
27
+ .with_context(mail_create_nolog=True)
28
+ .create({"name": "Pigs ManagerTask", "project_id": cls.test_project.id})
29
+ )
30
+
31
+ cls.stage_pending = cls.env["project.task.type"].create(
32
+ {"name": "a", "project_ids": [(4, cls.test_project.id)], "fold": False}
33
+ )
34
+ cls.stage_done = cls.env["project.task.type"].create(
35
+ {"name": "b", "project_ids": [(4, cls.test_project.id)], "fold": True}
36
+ )
37
+ cls.child_task.parent_id = cls.parent_task
38
+ cls.parent_task.stage_id = cls.stage_pending
39
+ cls.child_task.stage_id = cls.stage_pending
40
+
41
+ def test_child_blocks_parent(self):
42
+ with self.assertRaises(ValidationError):
43
+ self.parent_task.stage_id = self.stage_done
44
+ extra_task = (
45
+ self.env["project.task"]
46
+ .with_context(mail_create_nolog=True)
47
+ .create(
48
+ {
49
+ "name": "Test Task 3",
50
+ "project_id": self.test_project.id,
51
+ }
52
+ )
53
+ )
54
+ self.parent_task.child_ids += extra_task
55
+ extra_task.stage_id = self.stage_done
56
+ with self.assertRaises(ValidationError):
57
+ self.parent_task.stage_id = self.stage_done
58
+
59
+ def test_child_not_blocks_parent(self):
60
+ self.child_task.stage_id = self.stage_done
61
+ self.parent_task.stage_id = self.stage_done
62
+ self.assertEqual(
63
+ self.parent_task.stage_id,
64
+ self.stage_done,
65
+ "Parent should be done if child is done",
66
+ )
@@ -0,0 +1,102 @@
1
+ Metadata-Version: 2.1
2
+ Name: odoo-addon-project_task_parent_completion_blocking
3
+ Version: 16.0.1.0.0.2
4
+ Summary: Prevents a parent task from being completed if any children task isn't.
5
+ Home-page: https://github.com/OCA/project
6
+ Author: Tecnativa, Odoo Community Association (OCA)
7
+ Author-email: support@odoo-community.org
8
+ License: AGPL-3
9
+ Classifier: Programming Language :: Python
10
+ Classifier: Framework :: Odoo
11
+ Classifier: Framework :: Odoo :: 16.0
12
+ Classifier: License :: OSI Approved :: GNU Affero General Public License v3
13
+ Requires-Python: >=3.10
14
+ Requires-Dist: odoo<16.1dev,>=16.0a
15
+
16
+ =======================================
17
+ Project task parent completion blocking
18
+ =======================================
19
+
20
+ ..
21
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
22
+ !! This file is generated by oca-gen-addon-readme !!
23
+ !! changes will be overwritten. !!
24
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
25
+ !! source digest: sha256:d3e2eadb57ab9a1d05c17ebc2d3950a473504aebc8d4a267af34707905547ac9
26
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
27
+
28
+ .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
29
+ :target: https://odoo-community.org/page/development-status
30
+ :alt: Beta
31
+ .. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
32
+ :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
33
+ :alt: License: AGPL-3
34
+ .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fproject-lightgray.png?logo=github
35
+ :target: https://github.com/OCA/project/tree/16.0/project_task_parent_completion_blocking
36
+ :alt: OCA/project
37
+ .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
38
+ :target: https://translation.odoo-community.org/projects/project-16-0/project-16-0-project_task_parent_completion_blocking
39
+ :alt: Translate me on Weblate
40
+ .. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
41
+ :target: https://runboat.odoo-community.org/builds?repo=OCA/project&target_branch=16.0
42
+ :alt: Try me on Runboat
43
+
44
+ |badge1| |badge2| |badge3| |badge4| |badge5|
45
+
46
+ Prevents a parent task from beeing completed if a child task isn't completed.
47
+
48
+ **Table of contents**
49
+
50
+ .. contents::
51
+ :local:
52
+
53
+ Bug Tracker
54
+ ===========
55
+
56
+ Bugs are tracked on `GitHub Issues <https://github.com/OCA/project/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/project/issues/new?body=module:%20project_task_parent_completion_blocking%0Aversion:%2016.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
+ * Tecnativa
70
+
71
+ Contributors
72
+ ~~~~~~~~~~~~
73
+
74
+ * `Tecnativa <https://www.tecnativa.com>`_:
75
+
76
+ * Pedro M. Baeza
77
+ * David Bañón
78
+
79
+ Maintainers
80
+ ~~~~~~~~~~~
81
+
82
+ This module is maintained by the OCA.
83
+
84
+ .. image:: https://odoo-community.org/logo.png
85
+ :alt: Odoo Community Association
86
+ :target: https://odoo-community.org
87
+
88
+ OCA, or the Odoo Community Association, is a nonprofit organization whose
89
+ mission is to support the collaborative development of Odoo features and
90
+ promote its widespread use.
91
+
92
+ .. |maintainer-david-banon-tecnativa| image:: https://github.com/david-banon-tecnativa.png?size=40px
93
+ :target: https://github.com/david-banon-tecnativa
94
+ :alt: david-banon-tecnativa
95
+
96
+ Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
97
+
98
+ |maintainer-david-banon-tecnativa|
99
+
100
+ This module is part of the `OCA/project <https://github.com/OCA/project/tree/16.0/project_task_parent_completion_blocking>`_ project on GitHub.
101
+
102
+ You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
@@ -0,0 +1,17 @@
1
+ odoo/addons/project_task_parent_completion_blocking/README.rst,sha256=zt1Z0EkSIRKg3QHDBDuvx-OmhSKfHmXi6hyeM92AG4M,3289
2
+ odoo/addons/project_task_parent_completion_blocking/__init__.py,sha256=X9EJGOE2GtZbS0G82PtSXmWSZ_R8jEM0rlJTDliQjp4,21
3
+ odoo/addons/project_task_parent_completion_blocking/__manifest__.py,sha256=mpLyqCbIhcQHgMn_lwZbHgbRtQ5AsQx9JdbtVR3kw68,557
4
+ odoo/addons/project_task_parent_completion_blocking/i18n/es.po,sha256=uUlmJCR-CFA4PDszTCuI_bq5KVBrrT2GTVtbECO51_Q,1011
5
+ odoo/addons/project_task_parent_completion_blocking/i18n/project_task_parent_completion_blocking.pot,sha256=8svmcqB9CTUZ8P-aQZ0amAzTl_oSX_4cl_fN__US-Wk,781
6
+ odoo/addons/project_task_parent_completion_blocking/models/__init__.py,sha256=LOAASqfG7RbE7TOGKSSvrR7lpFkwckVX0JjE27Ejb-A,27
7
+ odoo/addons/project_task_parent_completion_blocking/models/project_task.py,sha256=j6WoIJYGaDs59nQHBNApCp7y36JXdGR-sn4i_rRCBm8,513
8
+ odoo/addons/project_task_parent_completion_blocking/readme/CONTRIBUTORS.rst,sha256=I2nJqy64JiA-niMRpvu5wbk1mTBIWp530jBvD1ubwIE,82
9
+ odoo/addons/project_task_parent_completion_blocking/readme/DESCRIPTION.rst,sha256=10lE4H_lJnq-77EVaDBYXv0EojcLxgGoG69yXmvqqus,78
10
+ odoo/addons/project_task_parent_completion_blocking/static/description/icon.png,sha256=CgnOEZCwoe6f1vlLwkqFVfc2q_uwBMU0UnXN8j6X5ag,10254
11
+ odoo/addons/project_task_parent_completion_blocking/static/description/index.html,sha256=RcJMvc6hd6fC0KOuaJfYe5GRQGYY5YUyDDR2Wskgh8k,12592
12
+ odoo/addons/project_task_parent_completion_blocking/tests/__init__.py,sha256=_tt9H0JrpnwHnLURwuy-kMMSTCvIhSnrKrQ9vj8s8FY,59
13
+ odoo/addons/project_task_parent_completion_blocking/tests/test_project_task_parent_completion_blocking.py,sha256=JTlMRUSPvFmXIkCD-S_d0KGyw4_CNBaT5vSHW60PAj8,2383
14
+ odoo_addon_project_task_parent_completion_blocking-16.0.1.0.0.2.dist-info/METADATA,sha256=ZJ4VpWXBWt0S1Rn-7HM-W6QDeQv5rdg3GdjZT0hPSGM,3870
15
+ odoo_addon_project_task_parent_completion_blocking-16.0.1.0.0.2.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
16
+ odoo_addon_project_task_parent_completion_blocking-16.0.1.0.0.2.dist-info/top_level.txt,sha256=qBj40grFkGOfDZ2WDSw3y1RnDlgG0u8rP8pvGNdbz4w,5
17
+ odoo_addon_project_task_parent_completion_blocking-16.0.1.0.0.2.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: bdist_wheel (0.45.1)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+