Skip to content

Commit 90103ce

Browse files
kg-ucsAbranes
authored andcommitted
[MIG] project_task_code: Migration to 16.0
1 parent 7a3d633 commit 90103ce

File tree

7 files changed

+23
-21
lines changed

7 files changed

+23
-21
lines changed

project_task_code/README.rst

+7-7
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ Sequential Code for Tasks
1414
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
1515
:alt: License: AGPL-3
1616
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fproject-lightgray.png?logo=github
17-
:target: https://github.com/OCA/project/tree/15.0/project_task_code
17+
:target: https://github.com/OCA/project/tree/16.0/project_task_code
1818
:alt: OCA/project
1919
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
20-
:target: https://translation.odoo-community.org/projects/project-15-0/project-15-0-project_task_code
20+
:target: https://translation.odoo-community.org/projects/project-16-0/project-16-0-project_task_code
2121
:alt: Translate me on Weblate
22-
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
23-
:target: https://runbot.odoo-community.org/runbot/140/15.0
24-
:alt: Try me on Runbot
22+
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
23+
:target: https://runboat.odoo-community.org/webui/builds.html?repo=OCA/project&target_branch=16.0
24+
:alt: Try me on Runboat
2525

2626
|badge1| |badge2| |badge3| |badge4| |badge5|
2727

@@ -56,7 +56,7 @@ Bug Tracker
5656
Bugs are tracked on `GitHub Issues <https://github.com/OCA/project/issues>`_.
5757
In case of trouble, please check there if your issue has already been reported.
5858
If you spotted it first, help us smashing it by providing a detailed and welcomed
59-
`feedback <https://github.com/OCA/project/issues/new?body=module:%20project_task_code%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
59+
`feedback <https://github.com/OCA/project/issues/new?body=module:%20project_task_code%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
6060

6161
Do not contact contributors directly about support or help with technical issues.
6262

@@ -100,6 +100,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
100100
mission is to support the collaborative development of Odoo features and
101101
promote its widespread use.
102102

103-
This module is part of the `OCA/project <https://github.com/OCA/project/tree/15.0/project_task_code>`_ project on GitHub.
103+
This module is part of the `OCA/project <https://github.com/OCA/project/tree/16.0/project_task_code>`_ project on GitHub.
104104

105105
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

project_task_code/__manifest__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
{
55
"name": "Sequential Code for Tasks",
6-
"version": "15.0.1.0.4",
6+
"version": "16.0.1.0.0",
77
"category": "Project Management",
88
"author": "OdooMRP team, "
99
"AvanzOSC, "

project_task_code/models/project_task.py

+3-8
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,12 @@ class ProjectTask(models.Model):
2121

2222
@api.model_create_multi
2323
def create(self, vals_list):
24-
new_list = []
2524
for vals in vals_list:
2625
if vals.get("code", "/") == "/":
27-
new_vals = dict(
28-
vals,
29-
code=self.env["ir.sequence"].next_by_code("project.task") or "/",
26+
vals["code"] = (
27+
self.env["ir.sequence"].next_by_code("project.task") or "/"
3028
)
31-
else:
32-
new_vals = vals
33-
new_list.append(new_vals)
34-
return super().create(new_list)
29+
return super().create(vals_list)
3530

3631
def name_get(self):
3732
result = super().name_get()

project_task_code/static/description/index.html

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
44
<head>
55
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6-
<meta name="generator" content="Docutils 0.15.1: http://docutils.sourceforge.net/" />
6+
<meta name="generator" content="Docutils: http://docutils.sourceforge.net/" />
77
<title>Sequential Code for Tasks</title>
88
<style type="text/css">
99

@@ -367,7 +367,7 @@ <h1 class="title">Sequential Code for Tasks</h1>
367367
!! This file is generated by oca-gen-addon-readme !!
368368
!! changes will be overwritten. !!
369369
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
370-
<p><a class="reference external" 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" 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" href="https://github.com/OCA/project/tree/15.0/project_task_code"><img alt="OCA/project" src="https://img.shields.io/badge/github-OCA%2Fproject-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/project-15-0/project-15-0-project_task_code"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/140/15.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
370+
<p><a class="reference external" 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" 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" href="https://github.com/OCA/project/tree/16.0/project_task_code"><img alt="OCA/project" src="https://img.shields.io/badge/github-OCA%2Fproject-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/project-16-0/project-16-0-project_task_code"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runboat.odoo-community.org/webui/builds.html?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>
371371
<p>This module adds a sequential code for tasks.</p>
372372
<p><strong>Table of contents</strong></p>
373373
<div class="contents local topic" id="contents">
@@ -404,7 +404,7 @@ <h1><a class="toc-backref" href="#id3">Bug Tracker</a></h1>
404404
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/project/issues">GitHub Issues</a>.
405405
In case of trouble, please check there if your issue has already been reported.
406406
If you spotted it first, help us smashing it by providing a detailed and welcomed
407-
<a class="reference external" href="https://github.com/OCA/project/issues/new?body=module:%20project_task_code%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
407+
<a class="reference external" href="https://github.com/OCA/project/issues/new?body=module:%20project_task_code%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
408408
<p>Do not contact contributors directly about support or help with technical issues.</p>
409409
</div>
410410
<div class="section" id="credits">
@@ -442,7 +442,7 @@ <h2><a class="toc-backref" href="#id7">Maintainers</a></h2>
442442
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
443443
mission is to support the collaborative development of Odoo features and
444444
promote its widespread use.</p>
445-
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/project/tree/15.0/project_task_code">OCA/project</a> project on GitHub.</p>
445+
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/project/tree/16.0/project_task_code">OCA/project</a> project on GitHub.</p>
446446
<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>
447447
</div>
448448
</div>

project_task_code/tests/test_project_task_code.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def setUp(self):
1010
self.project_task_model = self.env["project.task"]
1111
self.ir_sequence_model = self.env["ir.sequence"]
1212
self.task_sequence = self.env.ref("project_task_code.sequence_task")
13-
self.project_task = self.env.ref("project.project_task_1")
13+
self.project_task = self.env.ref("project.project_1_task_1")
1414

1515
def test_old_task_code_assign(self):
1616
project_tasks = self.project_task_model.search([])
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../../project_task_code

setup/project_task_code/setup.py

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import setuptools
2+
3+
setuptools.setup(
4+
setup_requires=['setuptools-odoo'],
5+
odoo_addon=True,
6+
)

0 commit comments

Comments
 (0)