diff --git a/project_task_add_very_high/README.rst b/project_task_add_very_high/README.rst
index 86c65d47dc..412fb5e591 100644
--- a/project_task_add_very_high/README.rst
+++ b/project_task_add_very_high/README.rst
@@ -17,13 +17,13 @@ Project Task Add Very High
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fproject-lightgray.png?logo=github
- :target: https://github.com/OCA/project/tree/17.0/project_task_add_very_high
+ :target: https://github.com/OCA/project/tree/18.0/project_task_add_very_high
:alt: OCA/project
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
- :target: https://translation.odoo-community.org/projects/project-17-0/project-17-0-project_task_add_very_high
+ :target: https://translation.odoo-community.org/projects/project-18-0/project-18-0-project_task_add_very_high
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
- :target: https://runboat.odoo-community.org/builds?repo=OCA/project&target_branch=17.0
+ :target: https://runboat.odoo-community.org/builds?repo=OCA/project&target_branch=18.0
:alt: Try me on Runboat
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -82,7 +82,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues `_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
-`feedback `_.
+`feedback `_.
Do not contact contributors directly about support or help with technical issues.
@@ -97,8 +97,9 @@ Authors
Contributors
------------
-- Andrea Stirpe
-- Yves Goldberg (Ygol InternetWork) yves@ygol.com
+- Andrea Stirpe
+- Yves Goldberg (Ygol InternetWork) yves@ygol.com
+- ``Heliconia Solutions Pvt. Ltd. ``\ \_
Maintainers
-----------
@@ -121,6 +122,6 @@ Current `maintainer `__:
|maintainer-astirpe|
-This module is part of the `OCA/project `_ project on GitHub.
+This module is part of the `OCA/project `_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
diff --git a/project_task_add_very_high/__manifest__.py b/project_task_add_very_high/__manifest__.py
index 4fc61adf7d..06ae4dd1d5 100644
--- a/project_task_add_very_high/__manifest__.py
+++ b/project_task_add_very_high/__manifest__.py
@@ -4,7 +4,7 @@
{
"name": "Project Task Add Very High",
"summary": "Adds extra options 'High' and 'Very High' on tasks",
- "version": "17.0.1.0.0",
+ "version": "18.0.1.0.0",
"development_status": "Production/Stable",
"author": "Onestein, Odoo Community Association (OCA)",
"maintainers": ["astirpe"],
diff --git a/project_task_add_very_high/readme/CONTRIBUTORS.md b/project_task_add_very_high/readme/CONTRIBUTORS.md
index 0c0159c609..98b35dd62f 100644
--- a/project_task_add_very_high/readme/CONTRIBUTORS.md
+++ b/project_task_add_very_high/readme/CONTRIBUTORS.md
@@ -1,2 +1,3 @@
- Andrea Stirpe \<\>
- Yves Goldberg (Ygol InternetWork)
+- `Heliconia Solutions Pvt. Ltd. `_
diff --git a/project_task_add_very_high/static/description/index.html b/project_task_add_very_high/static/description/index.html
index f739e19680..517093f885 100644
--- a/project_task_add_very_high/static/description/index.html
+++ b/project_task_add_very_high/static/description/index.html
@@ -8,10 +8,11 @@
/*
:Author: David Goodger (goodger@python.org)
-:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
+:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
:Copyright: This stylesheet has been placed in the public domain.
Default cascading style sheet for the HTML output of Docutils.
+Despite the name, some widely supported CSS2 features are used.
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
customize this style sheet.
@@ -274,7 +275,7 @@
margin-left: 2em ;
margin-right: 2em }
-pre.code .ln { color: grey; } /* line numbers */
+pre.code .ln { color: gray; } /* line numbers */
pre.code, code { background-color: #eeeeee }
pre.code .comment, code .comment { color: #5C6576 }
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
@@ -300,7 +301,7 @@
span.pre {
white-space: pre }
-span.problematic {
+span.problematic, pre.problematic {
color: red }
span.section-subtitle {
@@ -368,7 +369,7 @@ Project Task Add Very High
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:ae55a9b6aa58ebee08506e9cf834e58d37bc6cae4e77fab50c4963138e9c730e
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
-
+
This module extends the field priority in project tasks, adding two new
levels of priority. The two new levels of priority are: High and Very
High.
@@ -415,7 +416,7 @@
Bugs are tracked on GitHub Issues.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
-feedback.
+feedback.
Do not contact contributors directly about support or help with technical issues.
This module is maintained by the OCA.
-
+
+
+
OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.
Current maintainer:
-
This module is part of the OCA/project project on GitHub.
+
This module is part of the OCA/project project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
diff --git a/project_task_add_very_high/tests/__init__.py b/project_task_add_very_high/tests/__init__.py
new file mode 100644
index 0000000000..0d764e32c8
--- /dev/null
+++ b/project_task_add_very_high/tests/__init__.py
@@ -0,0 +1 @@
+from . import test_project_task
diff --git a/project_task_add_very_high/tests/test_project_task.py b/project_task_add_very_high/tests/test_project_task.py
new file mode 100644
index 0000000000..a1ce2e3725
--- /dev/null
+++ b/project_task_add_very_high/tests/test_project_task.py
@@ -0,0 +1,74 @@
+from odoo.tests.common import TransactionCase
+
+
+class TestProjectTaskPriority(TransactionCase):
+ def setUp(self):
+ super().setUp()
+ self.project_task_model = self.env["project.task"]
+
+ def test_priority_selection(self):
+ """Test that the priority field includes the new options."""
+ # Get the priority field definition
+ priority_field = self.project_task_model.fields_get(allfields=["priority"])[
+ "priority"
+ ]
+
+ # Verify the new priority options are included
+ expected_options = [("2", "Very High"), ("3", "Most Important")]
+ for option in expected_options:
+ self.assertIn(
+ option,
+ priority_field["selection"],
+ f"{option} not found in priority selection",
+ )
+
+ def test_create_task_with_new_priority(self):
+ """Test creating tasks with the new priorities."""
+ # Create a task with the new priority "Very High"
+ task = self.project_task_model.create(
+ {
+ "name": "Test Very High Priority Task",
+ "priority": "2",
+ }
+ )
+ self.assertEqual(task.priority, "2", "Task priority should be '2' (Very High)")
+
+ # Create a task with the new priority "Most Important"
+ task = self.project_task_model.create(
+ {
+ "name": "Test Most Important Priority Task",
+ "priority": "3",
+ }
+ )
+ self.assertEqual(
+ task.priority, "3", "Task priority should be '3' (Most Important)"
+ )
+
+ def test_update_priority(self):
+ """Test updating task priority."""
+ # Create a task with a default priority
+ task = self.project_task_model.create({"name": "Test Task"})
+ self.assertEqual(task.priority, "0", "Default task priority should be '0'")
+
+ # Update the priority to "Very High"
+ task.write({"priority": "2"})
+ self.assertEqual(
+ task.priority, "2", "Task priority should be updated to '2' (Very High)"
+ )
+
+ # Update the priority to "Most Important"
+ task.write({"priority": "3"})
+ self.assertEqual(
+ task.priority,
+ "3",
+ "Task priority should be updated to '3' (Most Important)",
+ )
+
+ def test_invalid_priority(self):
+ """Test that an invalid priority value raises an error."""
+ with self.assertRaises(
+ ValueError, msg="Invalid priority should raise ValueError"
+ ):
+ self.project_task_model.create(
+ {"name": "Invalid Priority Task", "priority": "99"}
+ )