diff --git a/project_stage_extra_info/README.rst b/project_stage_extra_info/README.rst new file mode 100644 index 0000000000..d1cc91da2c --- /dev/null +++ b/project_stage_extra_info/README.rst @@ -0,0 +1,88 @@ +======================== +Project Stage Extra Info +======================== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:ea463355a8edddcf03a39101533e41d9e470c5c0bcad939f77269b2a89d82bc9 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png + :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/18.0/project_stage_extra_info + :alt: OCA/project +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/project-18-0/project-18-0-project_stage_extra_info + :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=18.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module adds a Description and Is closed stage field on Project +stages. Also adds its filters on Project. + +**Table of contents** + +.. contents:: + :local: + +Usage +===== + +To use this module, you need to: + +1. Have Manager rights for Project group to create project stages. +2. To enable Project Stages goto Settings > Project > enable Project + Stages. +3. Go to *Project > Configuration > Project Statuses*. +4. When creating a project or editing it, select the status + +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 `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +------- + +* InitOS GmbH + +Contributors +------------ + +- Dhara Solanki + +Maintainers +----------- + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +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. + +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_stage_extra_info/__init__.py b/project_stage_extra_info/__init__.py new file mode 100644 index 0000000000..0650744f6b --- /dev/null +++ b/project_stage_extra_info/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/project_stage_extra_info/__manifest__.py b/project_stage_extra_info/__manifest__.py new file mode 100644 index 0000000000..fb6300de35 --- /dev/null +++ b/project_stage_extra_info/__manifest__.py @@ -0,0 +1,17 @@ +{ + "name": "Project Stage Extra Info", + "summary": """ + Project Stage Extra Info""", + "author": "InitOS GmbH, Odoo Community Association (OCA)", + "website": "https://github.com/OCA/project", + "category": "Project Management", + "version": "18.0.1.0.0", + "license": "AGPL-3", + "depends": ["project"], + "data": [ + "views/project_stage_view.xml", + "views/project_view.xml", + ], + "application": False, + "development_status": "Beta", +} diff --git a/project_stage_extra_info/i18n/ca.po b/project_stage_extra_info/i18n/ca.po new file mode 100644 index 0000000000..d400dd25d4 --- /dev/null +++ b/project_stage_extra_info/i18n/ca.po @@ -0,0 +1,47 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * project_stage_extra_info +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2024-07-23 15:58+0000\n" +"Last-Translator: Eugeni Chafer \n" +"Language-Team: none\n" +"Language: ca\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 5.6.2\n" + +#. module: project_stage_extra_info +#: model_terms:ir.ui.view,arch_db:project_stage_extra_info.view_project_project_filter +msgid "Closed" +msgstr "Tancat" + +#. module: project_stage_extra_info +#: model:ir.model.fields,field_description:project_stage_extra_info.field_project_project_stage__description +msgid "Description" +msgstr "Descripció" + +#. module: project_stage_extra_info +#: model:ir.model.fields,field_description:project_stage_extra_info.field_project_project_stage__is_closed +msgid "Is Closed Stage" +msgstr "És una etapa tancada" + +#. module: project_stage_extra_info +#: model_terms:ir.ui.view,arch_db:project_stage_extra_info.view_project_project_filter +msgid "Not Closed" +msgstr "No tancat" + +#. module: project_stage_extra_info +#: model:ir.model,name:project_stage_extra_info.model_project_project_stage +msgid "Project Stage" +msgstr "Etapa de projecte" + +#. module: project_stage_extra_info +#: model:ir.model.fields,help:project_stage_extra_info.field_project_project_stage__is_closed +msgid "Specify if this is a closing stage." +msgstr "Especificar si és una etapa tancada." diff --git a/project_stage_extra_info/i18n/it.po b/project_stage_extra_info/i18n/it.po new file mode 100644 index 0000000000..c8fe6ceb9b --- /dev/null +++ b/project_stage_extra_info/i18n/it.po @@ -0,0 +1,47 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * project_stage_extra_info +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2024-01-24 17:36+0000\n" +"Last-Translator: mymage \n" +"Language-Team: none\n" +"Language: it\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.17\n" + +#. module: project_stage_extra_info +#: model_terms:ir.ui.view,arch_db:project_stage_extra_info.view_project_project_filter +msgid "Closed" +msgstr "Chiuso" + +#. module: project_stage_extra_info +#: model:ir.model.fields,field_description:project_stage_extra_info.field_project_project_stage__description +msgid "Description" +msgstr "Descrizione" + +#. module: project_stage_extra_info +#: model:ir.model.fields,field_description:project_stage_extra_info.field_project_project_stage__is_closed +msgid "Is Closed Stage" +msgstr "È fase chiusa" + +#. module: project_stage_extra_info +#: model_terms:ir.ui.view,arch_db:project_stage_extra_info.view_project_project_filter +msgid "Not Closed" +msgstr "Non chiuso" + +#. module: project_stage_extra_info +#: model:ir.model,name:project_stage_extra_info.model_project_project_stage +msgid "Project Stage" +msgstr "Fase progetto" + +#. module: project_stage_extra_info +#: model:ir.model.fields,help:project_stage_extra_info.field_project_project_stage__is_closed +msgid "Specify if this is a closing stage." +msgstr "Indicare se questo è uno stato di chiusura." diff --git a/project_stage_extra_info/i18n/project_stage_extra_info.pot b/project_stage_extra_info/i18n/project_stage_extra_info.pot new file mode 100644 index 0000000000..73007344dd --- /dev/null +++ b/project_stage_extra_info/i18n/project_stage_extra_info.pot @@ -0,0 +1,44 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * project_stage_extra_info +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: project_stage_extra_info +#: model_terms:ir.ui.view,arch_db:project_stage_extra_info.view_project_project_filter +msgid "Closed" +msgstr "" + +#. module: project_stage_extra_info +#: model:ir.model.fields,field_description:project_stage_extra_info.field_project_project_stage__description +msgid "Description" +msgstr "" + +#. module: project_stage_extra_info +#: model:ir.model.fields,field_description:project_stage_extra_info.field_project_project_stage__is_closed +msgid "Is Closed Stage" +msgstr "" + +#. module: project_stage_extra_info +#: model_terms:ir.ui.view,arch_db:project_stage_extra_info.view_project_project_filter +msgid "Not Closed" +msgstr "" + +#. module: project_stage_extra_info +#: model:ir.model,name:project_stage_extra_info.model_project_project_stage +msgid "Project Stage" +msgstr "" + +#. module: project_stage_extra_info +#: model:ir.model.fields,help:project_stage_extra_info.field_project_project_stage__is_closed +msgid "Specify if this is a closing stage." +msgstr "" diff --git a/project_stage_extra_info/models/__init__.py b/project_stage_extra_info/models/__init__.py new file mode 100644 index 0000000000..5311dca7de --- /dev/null +++ b/project_stage_extra_info/models/__init__.py @@ -0,0 +1 @@ +from . import project_project_stage diff --git a/project_stage_extra_info/models/project_project_stage.py b/project_stage_extra_info/models/project_project_stage.py new file mode 100644 index 0000000000..bdcb9c0fd0 --- /dev/null +++ b/project_stage_extra_info/models/project_project_stage.py @@ -0,0 +1,11 @@ +from odoo import fields, models + + +class ProjectProjectStage(models.Model): + _inherit = "project.project.stage" + + description = fields.Char(translate=True) + is_closed = fields.Boolean( + string="Is Closed Stage", + help="Specify if this is a closing stage.", + ) diff --git a/project_stage_extra_info/pyproject.toml b/project_stage_extra_info/pyproject.toml new file mode 100644 index 0000000000..4231d0cccb --- /dev/null +++ b/project_stage_extra_info/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/project_stage_extra_info/readme/CONTRIBUTORS.md b/project_stage_extra_info/readme/CONTRIBUTORS.md new file mode 100644 index 0000000000..3feed4b608 --- /dev/null +++ b/project_stage_extra_info/readme/CONTRIBUTORS.md @@ -0,0 +1 @@ +- Dhara Solanki \<\> diff --git a/project_stage_extra_info/readme/DESCRIPTION.md b/project_stage_extra_info/readme/DESCRIPTION.md new file mode 100644 index 0000000000..e0b4576800 --- /dev/null +++ b/project_stage_extra_info/readme/DESCRIPTION.md @@ -0,0 +1,2 @@ +This module adds a Description and Is closed stage field on Project +stages. Also adds its filters on Project. diff --git a/project_stage_extra_info/readme/USAGE.md b/project_stage_extra_info/readme/USAGE.md new file mode 100644 index 0000000000..70ac021777 --- /dev/null +++ b/project_stage_extra_info/readme/USAGE.md @@ -0,0 +1,7 @@ +To use this module, you need to: + +1. Have Manager rights for Project group to create project stages. +2. To enable Project Stages goto Settings \> Project \> enable Project + Stages. +3. Go to *Project \> Configuration \> Project Statuses*. +4. When creating a project or editing it, select the status diff --git a/project_stage_extra_info/static/description/icon.png b/project_stage_extra_info/static/description/icon.png new file mode 100644 index 0000000000..3a0328b516 Binary files /dev/null and b/project_stage_extra_info/static/description/icon.png differ diff --git a/project_stage_extra_info/static/description/index.html b/project_stage_extra_info/static/description/index.html new file mode 100644 index 0000000000..5abb65f0cb --- /dev/null +++ b/project_stage_extra_info/static/description/index.html @@ -0,0 +1,436 @@ + + + + + +Project Stage Extra Info + + + +
+

Project Stage Extra Info

+ + +

Beta License: AGPL-3 OCA/project Translate me on Weblate Try me on Runboat

+

This module adds a Description and Is closed stage field on Project +stages. Also adds its filters on Project.

+

Table of contents

+ +
+

Usage

+

To use this module, you need to:

+
    +
  1. Have Manager rights for Project group to create project stages.
  2. +
  3. To enable Project Stages goto Settings > Project > enable Project +Stages.
  4. +
  5. Go to Project > Configuration > Project Statuses.
  6. +
  7. When creating a project or editing it, select the status
  8. +
+
+
+

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.

+

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

+
+
+

Credits

+
+

Authors

+
    +
  • InitOS GmbH
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+ +Odoo Community Association + +

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.

+

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_stage_extra_info/tests/__init__.py b/project_stage_extra_info/tests/__init__.py new file mode 100644 index 0000000000..0c9dbb8580 --- /dev/null +++ b/project_stage_extra_info/tests/__init__.py @@ -0,0 +1 @@ +from . import test_project_stage_extra_info diff --git a/project_stage_extra_info/tests/test_project_stage_extra_info.py b/project_stage_extra_info/tests/test_project_stage_extra_info.py new file mode 100644 index 0000000000..f27c45bf45 --- /dev/null +++ b/project_stage_extra_info/tests/test_project_stage_extra_info.py @@ -0,0 +1,28 @@ +from odoo.tests.common import TransactionCase + + +class TestProjectStageExtraInfo(TransactionCase): + def setUp(self): + super().setUp() + + self.stage_to_do = self.env["project.project.stage"].create({"name": "To Do"}) + self.stage_done = self.env["project.project.stage"].create( + {"name": "Done", "is_closed": True} + ) + self.project = self.env["project.project"].create({"name": "Project"}) + + def test_project_stages(self): + """Test to verify the behavior of project stages' and is_closed field.""" + self.project.stage_id = self.stage_to_do + self.assertEqual( + self.project.stage_id.is_closed, + False, + "The project stage 'To Do' should not be marked as closed.", + ) + + self.project.stage_id = self.stage_done + self.assertEqual( + self.project.stage_id.is_closed, + True, + "The project stage 'Done' should be marked as closed.", + ) diff --git a/project_stage_extra_info/views/project_stage_view.xml b/project_stage_extra_info/views/project_stage_view.xml new file mode 100644 index 0000000000..583b100975 --- /dev/null +++ b/project_stage_extra_info/views/project_stage_view.xml @@ -0,0 +1,14 @@ + + + + project.project.stage.view.list + project.project.stage + + + + + + + + + diff --git a/project_stage_extra_info/views/project_view.xml b/project_stage_extra_info/views/project_view.xml new file mode 100644 index 0000000000..ecf7554fc4 --- /dev/null +++ b/project_stage_extra_info/views/project_view.xml @@ -0,0 +1,23 @@ + + + + project.status.filter + project.project + + + + + + + + + +