Skip to content
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
87 changes: 87 additions & 0 deletions web_discuss_portal/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

==================
Web Discuss Portal
==================

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

.. |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-LGPL--3-blue.png
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
:alt: License: LGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github
:target: https://github.com/OCA/web/tree/19.0/web_discuss_portal
:alt: OCA/web
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/web-19-0/web-19-0-web_discuss_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/web&target_branch=19.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module gives portal users access to Discuss from the website
portal.

It adds a *Discuss* entry to *My Account* (``/my``) listing the channels
the portal user has joined. Selecting one opens the standard Discuss
interface.

**Table of contents**

.. contents::
:local:

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/web/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/web/issues/new?body=module:%20web_discuss_portal%0Aversion:%2019.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
-------

* Vortex Dimensión Digital

Contributors
------------

- `Vortex Dimensión Digital <https://www.dimensionvortex.com/>`__:

- Jorge Rosado Julián <jorge.rosado@dimensionvortex.com>

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/web <https://github.com/OCA/web/tree/19.0/web_discuss_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 web_discuss_portal/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import controllers
17 changes: 17 additions & 0 deletions web_discuss_portal/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "Web Discuss Portal",
"version": "19.0.1.0.0",
"summary": "Give portal users access to their Discuss channels",
"author": "Vortex Dimensión Digital, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/web",
"license": "LGPL-3",
"category": "Portal",
"depends": ["mail", "portal"],
"data": ["views/portal.xml"],
"images": [
"static/description/icon.png",
],
"installable": True,
"application": False,
"auto_install": False,
}
1 change: 1 addition & 0 deletions web_discuss_portal/controllers/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import main
42 changes: 42 additions & 0 deletions web_discuss_portal/controllers/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
from odoo import http
from odoo.http import request

from odoo.addons.portal.controllers.portal import CustomerPortal
from odoo.addons.portal.controllers.portal import pager as portal_pager


class DiscussPortal(CustomerPortal):
def _get_discuss_channel_domain(self):
return [
("channel_type", "=", "channel"),
("parent_channel_id", "=", False),
("is_member", "=", True),
]

@http.route(
["/my/discuss", "/my/discuss/page/<int:page>"],
type="http",
auth="user",
website=True,
)
def discuss_portal(self, page=1, **kw):
Channel = request.env["discuss.channel"]
domain = self._get_discuss_channel_domain()
pager_values = portal_pager(
url="/my/discuss",
total=Channel.search_count(domain),
page=page,
step=self._items_per_page,
)
channels = Channel.search(
domain, limit=self._items_per_page, offset=pager_values["offset"]
)
return request.render(
"web_discuss_portal.discuss_portal",
{
"channels": channels,
"page_name": "discuss",
"pager": pager_values,
"default_url": "/my/discuss",
},
)
33 changes: 33 additions & 0 deletions web_discuss_portal/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * web_discuss_portal
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 19.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-07-21 08:15+0000\n"
"PO-Revision-Date: 2026-07-21 08:15+0000\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: web_discuss_portal
#: model_terms:ir.ui.view,arch_db:web_discuss_portal.portal_template
msgid "Chat with us"
msgstr "Habla con nosotros"

#. module: web_discuss_portal
#: model_terms:ir.ui.view,arch_db:web_discuss_portal.discuss_portal
#: model_terms:ir.ui.view,arch_db:web_discuss_portal.portal_breadcrumbs
#: model_terms:ir.ui.view,arch_db:web_discuss_portal.portal_template
msgid "Discuss"
msgstr "Conversaciones"

#. module: web_discuss_portal
#: model_terms:ir.ui.view,arch_db:web_discuss_portal.discuss_portal
msgid "There are no channels available for you yet."
msgstr "Todavía no hay canales disponibles para ti."
33 changes: 33 additions & 0 deletions web_discuss_portal/i18n/web_discuss_portal.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * web_discuss_portal
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 19.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-07-21 08:15+0000\n"
"PO-Revision-Date: 2026-07-21 08:15+0000\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: web_discuss_portal
#: model_terms:ir.ui.view,arch_db:web_discuss_portal.portal_template
msgid "Chat with us"
msgstr ""

#. module: web_discuss_portal
#: model_terms:ir.ui.view,arch_db:web_discuss_portal.discuss_portal
#: model_terms:ir.ui.view,arch_db:web_discuss_portal.portal_breadcrumbs
#: model_terms:ir.ui.view,arch_db:web_discuss_portal.portal_template
msgid "Discuss"
msgstr ""

#. module: web_discuss_portal
#: model_terms:ir.ui.view,arch_db:web_discuss_portal.discuss_portal
msgid "There are no channels available for you yet."
msgstr ""
3 changes: 3 additions & 0 deletions web_discuss_portal/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
2 changes: 2 additions & 0 deletions web_discuss_portal/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- [Vortex Dimensión Digital](https://www.dimensionvortex.com/):
- Jorge Rosado Julián \<<jorge.rosado@dimensionvortex.com>\>
4 changes: 4 additions & 0 deletions web_discuss_portal/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
This module gives portal users access to Discuss from the website portal.

It adds a *Discuss* entry to *My Account* (`/my`) listing the channels the
portal user has joined. Selecting one opens the standard Discuss interface.
Binary file added web_discuss_portal/static/description/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading