Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[16.0][ADD] project_task_description_portal #1439

Open
wants to merge 1 commit into
base: 16.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
121 changes: 121 additions & 0 deletions project_task_description_portal/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
=======================
Task Description Portal
=======================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:8f634a83c4656ed33b8a571951eca31268781ef8527fac611eb3c3fe97b37a73
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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/16.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-16-0/project-16-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=16.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/16.0/project_task_description_portal/static/description/img/use_portal_description.png
.. |Portal Description| image:: https://raw.githubusercontent.com/OCA/project/16.0/project_task_description_portal/static/description/img/portal_description.png
.. |Portal View| image:: https://raw.githubusercontent.com/OCA/project/16.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 <https://github.com/OCA/project/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 <https://github.com/OCA/project/issues/new?body=module:%20project_task_description_portal%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

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 <https://github.com/OCA/project/tree/16.0/project_task_description_portal>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions project_task_description_portal/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
16 changes: 16 additions & 0 deletions project_task_description_portal/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "Task Description Portal",
"summary": "Dedicated task description for portal users",
"version": "16.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,
}
1 change: 1 addition & 0 deletions project_task_description_portal/controllers/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import portal
12 changes: 12 additions & 0 deletions project_task_description_portal/controllers/portal.py
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions project_task_description_portal/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import project_task
17 changes: 17 additions & 0 deletions project_task_description_portal/models/project_task.py
Original file line number Diff line number Diff line change
@@ -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",
)
1 change: 1 addition & 0 deletions project_task_description_portal/readme/CONFIGURE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
No configuration is required.
1 change: 1 addition & 0 deletions project_task_description_portal/readme/CONTEXT.md
Original file line number Diff line number Diff line change
@@ -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.
3 changes: 3 additions & 0 deletions project_task_description_portal/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Cetmix <https://www.cetmix.com>

- Ivan Sokolov
1 change: 1 addition & 0 deletions project_task_description_portal/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This module allows to add a dedicated task description that will be shown to portal users.
3 changes: 3 additions & 0 deletions project_task_description_portal/readme/ROADMAP.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
TODO

Would be nice to have this feature working for projects shared in "Edit mode".
11 changes: 11 additions & 0 deletions project_task_description_portal/readme/USAGE.md
Original file line number Diff line number Diff line change
@@ -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)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading