diff --git a/project_task_description_portal/README.rst b/project_task_description_portal/README.rst new file mode 100644 index 0000000000..2a4f8157d8 --- /dev/null +++ b/project_task_description_portal/README.rst @@ -0,0 +1,125 @@ +.. image:: https://odoo-community.org/readme-banner-image + :target: https://odoo-community.org/get-involved?utm_source=readme + :alt: Odoo Community Association + +======================= +Task Description Portal +======================= + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:55e80ba6201112a988c371689ef7571f36368b8993001e9ec73a0a7afbece80b + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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/license-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/19.0/project_task_description_portal + :alt: OCA/project +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/project-19-0/project-19-0-project_task_description_portal + :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=19.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module allows to add a dedicated task description that will be +shown to portal users. + +**Table of contents** + +.. contents:: + :local: + +Use Cases / Context +=================== + +Sometimes you need to provide a separate task description for portal +users. Eg original description contains some confidential information or +is simply too technical for a client. + +Configuration +============= + +No configuration is required. + +Usage +===== + +On the task form enable the "Use Portal Description" checkbox located in +the "Description" tab of the notebook. + +|Use Portal Description| + +A new tab "Portal Description" will become visible. Put task description +that you would like to show to portal users in that tab. + +|Portal Description| + +If "Use Portal Description" is disabled standard task description will +be show to portal users as before. + +|Portal View| + +.. |Use Portal Description| image:: https://raw.githubusercontent.com/OCA/project/19.0/project_task_description_portal/static/description/img/use_portal_description.png +.. |Portal Description| image:: https://raw.githubusercontent.com/OCA/project/19.0/project_task_description_portal/static/description/img/portal_description.png +.. |Portal View| image:: https://raw.githubusercontent.com/OCA/project/19.0/project_task_description_portal/static/description/img/portal_view.png + +Known issues / Roadmap +====================== + +TODO + +Would be nice to have this feature working for projects shared in "Edit +mode". + +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 +------- + +* Cetmix + +Contributors +------------ + +Cetmix https://www.cetmix.com + +- Ivan Sokolov + +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_task_description_portal/__init__.py b/project_task_description_portal/__init__.py new file mode 100644 index 0000000000..0650744f6b --- /dev/null +++ b/project_task_description_portal/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/project_task_description_portal/__manifest__.py b/project_task_description_portal/__manifest__.py new file mode 100644 index 0000000000..b45e193720 --- /dev/null +++ b/project_task_description_portal/__manifest__.py @@ -0,0 +1,16 @@ +{ + "name": "Task Description Portal", + "summary": "Dedicated task description for portal users", + "version": "19.0.1.0.0", + "category": "Project", + "website": "https://github.com/OCA/project", + "author": "Cetmix, Odoo Community Association (OCA)", + "license": "AGPL-3", + "depends": ["project"], + "data": [ + "views/project_task_views.xml", + "views/project_portal_templates.xml", + ], + "installable": True, + "application": False, +} diff --git a/project_task_description_portal/controllers/__init__.py b/project_task_description_portal/controllers/__init__.py new file mode 100644 index 0000000000..8c3feb6f56 --- /dev/null +++ b/project_task_description_portal/controllers/__init__.py @@ -0,0 +1 @@ +from . import portal diff --git a/project_task_description_portal/controllers/portal.py b/project_task_description_portal/controllers/portal.py new file mode 100644 index 0000000000..3cf9660402 --- /dev/null +++ b/project_task_description_portal/controllers/portal.py @@ -0,0 +1,12 @@ +# Copyright (C) 2025 Cetmix OÜ +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). +from odoo.addons.project.controllers.portal import ProjectCustomerPortal + + +class ProjectCustomerPortalInherit(ProjectCustomerPortal): + def _task_get_page_view_values(self, task, access_token, **kwargs): + """Override to return portal description if enabled.""" + values = super()._task_get_page_view_values(task, access_token, **kwargs) + if task.use_portal_description: + values["description"] = task.portal_description + return values diff --git a/project_task_description_portal/i18n/it.po b/project_task_description_portal/i18n/it.po new file mode 100644 index 0000000000..fa976c1b21 --- /dev/null +++ b/project_task_description_portal/i18n/it.po @@ -0,0 +1,56 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * project_task_description_portal +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2025-03-18 19:06+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 5.10.2\n" + +#. module: project_task_description_portal +#: model_terms:ir.ui.view,arch_db:project_task_description_portal.view_task_form2_inherit +msgid "Add a description for portal users..." +msgstr "Aggiungi una descrizione per utenti portale..." + +#. module: project_task_description_portal +#: model:ir.model.fields,help:project_task_description_portal.field_project_task__portal_description +msgid "" +"Description that will be shown to portal users if 'Use Portal Description' " +"is enabled" +msgstr "" +"Descrizione che verrà visualizzata dagli utenti portale se 'Usa descrizione " +"portale' è abilitata" + +#. module: project_task_description_portal +#: model:ir.model.fields,help:project_task_description_portal.field_project_task__use_portal_description +msgid "" +"If enabled, portal users will see the portal description instead of the " +"standard one" +msgstr "" +"Se abilitata, gli utenti portale vedranno la descrizione portale al posto di " +"quella standard" + +#. module: project_task_description_portal +#: model:ir.model.fields,field_description:project_task_description_portal.field_project_task__portal_description +#: model_terms:ir.ui.view,arch_db:project_task_description_portal.view_task_form2_inherit +msgid "Portal Description" +msgstr "Descrizione portale" + +#. module: project_task_description_portal +#: model:ir.model,name:project_task_description_portal.model_project_task +msgid "Task" +msgstr "Lavoro" + +#. module: project_task_description_portal +#: model:ir.model.fields,field_description:project_task_description_portal.field_project_task__use_portal_description +msgid "Use Portal Description" +msgstr "Usa descrizione portale" diff --git a/project_task_description_portal/i18n/project_task_description_portal.pot b/project_task_description_portal/i18n/project_task_description_portal.pot new file mode 100644 index 0000000000..f407f0e579 --- /dev/null +++ b/project_task_description_portal/i18n/project_task_description_portal.pot @@ -0,0 +1,49 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * project_task_description_portal +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 18.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_task_description_portal +#: model_terms:ir.ui.view,arch_db:project_task_description_portal.view_task_form2_inherit +msgid "Add a description for portal users..." +msgstr "" + +#. module: project_task_description_portal +#: model:ir.model.fields,help:project_task_description_portal.field_project_task__portal_description +msgid "" +"Description that will be shown to portal users if 'Use Portal Description' " +"is enabled" +msgstr "" + +#. module: project_task_description_portal +#: model:ir.model.fields,help:project_task_description_portal.field_project_task__use_portal_description +msgid "" +"If enabled, portal users will see the portal description instead of the " +"standard one" +msgstr "" + +#. module: project_task_description_portal +#: model:ir.model.fields,field_description:project_task_description_portal.field_project_task__portal_description +#: model_terms:ir.ui.view,arch_db:project_task_description_portal.view_task_form2_inherit +msgid "Portal Description" +msgstr "" + +#. module: project_task_description_portal +#: model:ir.model,name:project_task_description_portal.model_project_task +msgid "Task" +msgstr "" + +#. module: project_task_description_portal +#: model:ir.model.fields,field_description:project_task_description_portal.field_project_task__use_portal_description +msgid "Use Portal Description" +msgstr "" diff --git a/project_task_description_portal/i18n/pt.po b/project_task_description_portal/i18n/pt.po new file mode 100644 index 0000000000..352f1b99f7 --- /dev/null +++ b/project_task_description_portal/i18n/pt.po @@ -0,0 +1,56 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * project_task_description_portal +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2025-03-17 18:07+0000\n" +"Last-Translator: Peter Romão \n" +"Language-Team: none\n" +"Language: pt\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.10.2\n" + +#. module: project_task_description_portal +#: model_terms:ir.ui.view,arch_db:project_task_description_portal.view_task_form2_inherit +msgid "Add a description for portal users..." +msgstr "Adicionar uma descrição para utilizadores de portal..." + +#. module: project_task_description_portal +#: model:ir.model.fields,help:project_task_description_portal.field_project_task__portal_description +msgid "" +"Description that will be shown to portal users if 'Use Portal Description' " +"is enabled" +msgstr "" +"Descrição que será exibida aos utilizadores de portal caso 'Utilizar " +"Descrição de Portal' esteja habilitado" + +#. module: project_task_description_portal +#: model:ir.model.fields,help:project_task_description_portal.field_project_task__use_portal_description +msgid "" +"If enabled, portal users will see the portal description instead of the " +"standard one" +msgstr "" +"Se ativado, os utilizadores de portal verão a descrição para portal em vez " +"da padrão" + +#. module: project_task_description_portal +#: model:ir.model.fields,field_description:project_task_description_portal.field_project_task__portal_description +#: model_terms:ir.ui.view,arch_db:project_task_description_portal.view_task_form2_inherit +msgid "Portal Description" +msgstr "Descrição de Portal" + +#. module: project_task_description_portal +#: model:ir.model,name:project_task_description_portal.model_project_task +msgid "Task" +msgstr "Tarefa" + +#. module: project_task_description_portal +#: model:ir.model.fields,field_description:project_task_description_portal.field_project_task__use_portal_description +msgid "Use Portal Description" +msgstr "Utilizar Descrição de Portal" diff --git a/project_task_description_portal/models/__init__.py b/project_task_description_portal/models/__init__.py new file mode 100644 index 0000000000..edf2d36b9c --- /dev/null +++ b/project_task_description_portal/models/__init__.py @@ -0,0 +1 @@ +from . import project_task diff --git a/project_task_description_portal/models/project_task.py b/project_task_description_portal/models/project_task.py new file mode 100644 index 0000000000..d32a8df4cb --- /dev/null +++ b/project_task_description_portal/models/project_task.py @@ -0,0 +1,17 @@ +# Copyright (C) 2025 Cetmix OÜ +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). +from odoo import fields, models + + +class ProjectTask(models.Model): + _inherit = "project.task" + + use_portal_description = fields.Boolean( + help="If enabled, portal users will see the portal description" + " instead of the standard one", + ) + portal_description = fields.Html( + sanitize_attributes=False, + help="Description that will be shown to portal users if " + "'Use Portal Description' is enabled", + ) diff --git a/project_task_description_portal/pyproject.toml b/project_task_description_portal/pyproject.toml new file mode 100644 index 0000000000..4231d0cccb --- /dev/null +++ b/project_task_description_portal/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/project_task_description_portal/readme/CONFIGURE.md b/project_task_description_portal/readme/CONFIGURE.md new file mode 100644 index 0000000000..cd5aaa25c8 --- /dev/null +++ b/project_task_description_portal/readme/CONFIGURE.md @@ -0,0 +1 @@ +No configuration is required. \ No newline at end of file diff --git a/project_task_description_portal/readme/CONTEXT.md b/project_task_description_portal/readme/CONTEXT.md new file mode 100644 index 0000000000..bcc0707055 --- /dev/null +++ b/project_task_description_portal/readme/CONTEXT.md @@ -0,0 +1 @@ +Sometimes you need to provide a separate task description for portal users. Eg original description contains some confidential information or is simply too technical for a client. \ No newline at end of file diff --git a/project_task_description_portal/readme/CONTRIBUTORS.md b/project_task_description_portal/readme/CONTRIBUTORS.md new file mode 100644 index 0000000000..55064661ae --- /dev/null +++ b/project_task_description_portal/readme/CONTRIBUTORS.md @@ -0,0 +1,3 @@ +Cetmix + +- Ivan Sokolov \ No newline at end of file diff --git a/project_task_description_portal/readme/DESCRIPTION.md b/project_task_description_portal/readme/DESCRIPTION.md new file mode 100644 index 0000000000..cc7ddc5c50 --- /dev/null +++ b/project_task_description_portal/readme/DESCRIPTION.md @@ -0,0 +1 @@ +This module allows to add a dedicated task description that will be shown to portal users. \ No newline at end of file diff --git a/project_task_description_portal/readme/ROADMAP.md b/project_task_description_portal/readme/ROADMAP.md new file mode 100644 index 0000000000..26d9cc8a6f --- /dev/null +++ b/project_task_description_portal/readme/ROADMAP.md @@ -0,0 +1,3 @@ +TODO + +Would be nice to have this feature working for projects shared in "Edit mode". \ No newline at end of file diff --git a/project_task_description_portal/readme/USAGE.md b/project_task_description_portal/readme/USAGE.md new file mode 100644 index 0000000000..5ef211f436 --- /dev/null +++ b/project_task_description_portal/readme/USAGE.md @@ -0,0 +1,11 @@ +On the task form enable the "Use Portal Description" checkbox located in the "Description" tab of the notebook. + +![Use Portal Description](../static/description/img/use_portal_description.png) + +A new tab "Portal Description" will become visible. Put task description that you would like to show to portal users in that tab. + +![Portal Description](../static/description/img/portal_description.png) + +If "Use Portal Description" is disabled standard task description will be show to portal users as before. + +![Portal View](../static/description/img/portal_view.png) \ No newline at end of file diff --git a/project_task_description_portal/static/description/icon.png b/project_task_description_portal/static/description/icon.png new file mode 100644 index 0000000000..1dcc49c24f Binary files /dev/null and b/project_task_description_portal/static/description/icon.png differ diff --git a/project_task_description_portal/static/description/img/portal_description.png b/project_task_description_portal/static/description/img/portal_description.png new file mode 100644 index 0000000000..4f0946a6e4 Binary files /dev/null and b/project_task_description_portal/static/description/img/portal_description.png differ diff --git a/project_task_description_portal/static/description/img/portal_view.png b/project_task_description_portal/static/description/img/portal_view.png new file mode 100644 index 0000000000..4df49075fd Binary files /dev/null and b/project_task_description_portal/static/description/img/portal_view.png differ diff --git a/project_task_description_portal/static/description/img/use_portal_description.png b/project_task_description_portal/static/description/img/use_portal_description.png new file mode 100644 index 0000000000..420a1700d9 Binary files /dev/null and b/project_task_description_portal/static/description/img/use_portal_description.png differ diff --git a/project_task_description_portal/static/description/index.html b/project_task_description_portal/static/description/index.html new file mode 100644 index 0000000000..833c4c0bf0 --- /dev/null +++ b/project_task_description_portal/static/description/index.html @@ -0,0 +1,463 @@ + + + + + +README.rst + + + +
+ + + +Odoo Community Association + +
+

Task Description Portal

+ +

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

+

This module allows to add a dedicated task description that will be +shown to portal users.

+

Table of contents

+ +
+

Use Cases / Context

+

Sometimes you need to provide a separate task description for portal +users. Eg original description contains some confidential information or +is simply too technical for a client.

+
+
+

Configuration

+

No configuration is required.

+
+
+

Usage

+

On the task form enable the “Use Portal Description” checkbox located in +the “Description” tab of the notebook.

+

Use Portal Description

+

A new tab “Portal Description” will become visible. Put task description +that you would like to show to portal users in that tab.

+

Portal Description

+

If “Use Portal Description” is disabled standard task description will +be show to portal users as before.

+

Portal View

+
+
+

Known issues / Roadmap

+

TODO

+

Would be nice to have this feature working for projects shared in “Edit +mode”.

+
+
+

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

+
    +
  • Cetmix
  • +
+
+
+

Contributors

+

Cetmix https://www.cetmix.com

+
    +
  • Ivan Sokolov
  • +
+
+
+

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_task_description_portal/views/project_portal_templates.xml b/project_task_description_portal/views/project_portal_templates.xml new file mode 100644 index 0000000000..06c2235090 --- /dev/null +++ b/project_task_description_portal/views/project_portal_templates.xml @@ -0,0 +1,19 @@ + + + + diff --git a/project_task_description_portal/views/project_task_views.xml b/project_task_description_portal/views/project_task_views.xml new file mode 100644 index 0000000000..23ea4b9c13 --- /dev/null +++ b/project_task_description_portal/views/project_task_views.xml @@ -0,0 +1,30 @@ + + + + + project.task.form.inherit.portal.description + + project.task + + + + + + + + + + + + + + + +