diff --git a/hide_portal_module_by_user/.gitignore b/hide_portal_module_by_user/.gitignore deleted file mode 100644 index 6da5887..0000000 --- a/hide_portal_module_by_user/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -*.*~ -*pyc diff --git a/hide_portal_module_by_user/README.rst b/hide_portal_module_by_user/README.rst deleted file mode 100644 index 42d4eaf..0000000 --- a/hide_portal_module_by_user/README.rst +++ /dev/null @@ -1,64 +0,0 @@ -========================== -Hide Portal Module By User -========================== - -Show / Hide Specific Portal Docs on res.users - - -IMPORTANT -============= -!! IMPORTANT !! - -This module doesnt modify the access rights of the users, it only hides the documents. - -This Module will Allow to enter a specific document via URL even when the user does not have the group assigned to it. - - -REVIEW YOUR USE CASES - -Example: - -if you dont have the group assigned to it. - -- you can access to the document via URL: /my/orders/6?access_token=0f13c269-0f10-46dc-81f8-4db9682f2267 -- but not to my/orders - - -PLEASE MAKE A PR IF YOU I MISSED TO WHITELIST A ROUTE URL - -Usage -===== - -To use this module, you need to: - -#. Install and Configure the Groups and Users - -.. image:: static/description/img.png - :alt: hide_portal_module_by_user 1 - :width: 50% - -.. image:: static/description/img_1.png - :alt: hide_portal_module_by_user 2 - :width: 50% - -.. image:: static/description/img_2.png - :alt: hide_portal_module_by_user 3 - :width: 50% - -.. image:: static/description/img_3.png - :alt: hide_portal_module_by_user 24 - :width: 50% - -.. image:: static/description/img_4.png - :alt: hide_portal_module_by_user 24 - :width: 50% - -How it Works -===== -- At Installation, the module will search for all the views that inherits portal.portal_my_home and create a group based on the URL that its linked to in the anchor tag. -- Post Installation, the module will detect if a new view is created inheriting the portal home and create the group. -- We Add a validation at view level to hide the group and a validation when trying to list the portal documents. - - -Changelog -========= diff --git a/hide_portal_module_by_user/__init__.py b/hide_portal_module_by_user/__init__.py deleted file mode 100644 index 3d05e19..0000000 --- a/hide_portal_module_by_user/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -from . import models -from . import controllers -from .hooks import post_init_hook diff --git a/hide_portal_module_by_user/__manifest__.py b/hide_portal_module_by_user/__manifest__.py deleted file mode 100644 index 8dc68b5..0000000 --- a/hide_portal_module_by_user/__manifest__.py +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright 2026 Munin -# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). - -{ - 'name': 'Hide Portal Module By User', - 'description': """ - Show / Hide Specific Portal Docs on res.users""", - 'version': '16.0.1.0.0', - 'license': 'AGPL-3', - 'author': 'Munin', - 'website': 'https://github.com/AxeldelosReyes/odoo_web_modules', - 'depends': [ - 'base', 'portal','base_portal_type' - ], - 'data': [ - 'views/portal_home.xml', - 'views/res_groups.xml', - ], - 'demo': [ - ], - 'post_init_hook': 'post_init_hook', -} diff --git a/hide_portal_module_by_user/controllers/__init__.py b/hide_portal_module_by_user/controllers/__init__.py deleted file mode 100644 index 12a7e52..0000000 --- a/hide_portal_module_by_user/controllers/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from . import main diff --git a/hide_portal_module_by_user/controllers/main.py b/hide_portal_module_by_user/controllers/main.py deleted file mode 100644 index 4c22add..0000000 --- a/hide_portal_module_by_user/controllers/main.py +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright 2026 Munin -# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). - -from odoo.http import request -from odoo.addons.portal.controllers.portal import CustomerPortal -from werkzeug.exceptions import NotFound - -WHITELISTED_ROUTES = ['/my/home', '/my', '/my/account', '/my/security', '/my/payment_method'] - - -class CustomerPortalPolicy(CustomerPortal): - def _prepare_portal_layout_values(self): - vals = super()._prepare_portal_layout_values() - current_path = request.httprequest.path - if request.env.user.validate_portal_url(current_path) or current_path in WHITELISTED_ROUTES: - return vals - if '/my/' not in current_path: - return vals - raise NotFound() diff --git a/hide_portal_module_by_user/hooks.py b/hide_portal_module_by_user/hooks.py deleted file mode 100644 index 4d453b2..0000000 --- a/hide_portal_module_by_user/hooks.py +++ /dev/null @@ -1,17 +0,0 @@ -from odoo import api, SUPERUSER_ID - - -def post_init_hook(cr, registry): - """Loaded after installing the module. - This module's DB modifications will be available. - :param odoo.sql_db.Cursor cr: - Database cursor. - :param odoo.modules.registry.RegistryManager registry: - Database registry, using v7 api. - """ - env = api.Environment(cr, SUPERUSER_ID, {}) - portal_views = env['ir.ui.view'].search([('inherit_id.xml_id', '=', 'portal.portal_my_home')]) - if portal_views: - for p in portal_views: - p.create_group_from_view() - return True diff --git a/hide_portal_module_by_user/models/__init__.py b/hide_portal_module_by_user/models/__init__.py deleted file mode 100644 index 2482d64..0000000 --- a/hide_portal_module_by_user/models/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -from . import res_users -from . import ir_ui_view diff --git a/hide_portal_module_by_user/models/ir_ui_view.py b/hide_portal_module_by_user/models/ir_ui_view.py deleted file mode 100644 index f055486..0000000 --- a/hide_portal_module_by_user/models/ir_ui_view.py +++ /dev/null @@ -1,68 +0,0 @@ -# Copyright 2026 Munin -# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -from lxml import etree -from odoo import _, api, fields, models - - -class ResGroups(models.Model): - _inherit = "res.groups" - - portal_url = fields.Char(string='Portal URL', index=True) - - -class IrUiView(models.Model): - _inherit = "ir.ui.view" - - custom_portal_group = fields.Boolean(string='Custom Portal Group', default=False) - portal_group = fields.Many2one('res.groups', string='Portal Group') - - @api.model_create_multi - def create(self, vals_list): - res = super(IrUiView, self).create(vals_list) - for view in res: - if view.inherit_id.xml_id == 'portal.portal_my_home': - view.create_group_from_view() - return res - - def create_group_from_view(self): - self.ensure_one() - - def _generate_name(name): - return f"show_portal_{name}".lower().replace(' ', '_') - - view_xml = etree.fromstring(self.arch) - groups_from_view = {} - for option in view_xml.xpath("//t[@t-call='portal.portal_docs_entry']"): - has_title = option.find("t[@t-set='title']") - if has_title is not None: - title = has_title.text - else: - title = self.name - - k = _generate_name(title) - target_url = option.find("t[@t-set='url']") - if target_url is not None: - target_url = target_url.get('t-value').replace("'", '') - else: - raise ValueError(_("No target url found")) - groups_from_view[k] = target_url - - search_groups = self.env['res.groups'].sudo().search([('portal_url', 'in', list(groups_from_view.values()))]) - category_portal_type = self.env.ref('base_portal_type.category_portal_type') - base_user_group = self.env.ref('base.group_user') - - for group in groups_from_view.keys(): - portal_group = search_groups.filtered(lambda g: g.portal_url == groups_from_view[group]) - if not portal_group: - portal_group = self.env['res.groups'].sudo().create( - { - 'name': group, - 'portal_url': groups_from_view[group], - 'category_id': category_portal_type.id, - } - ) - if base_user_group and portal_group: - implied_ids = base_user_group.sudo().mapped('implied_ids.id') - if portal_group.id not in implied_ids: - base_user_group.sudo().write({'implied_ids': [(4, portal_group.id)]}) - return True diff --git a/hide_portal_module_by_user/models/res_users.py b/hide_portal_module_by_user/models/res_users.py deleted file mode 100644 index 70b5316..0000000 --- a/hide_portal_module_by_user/models/res_users.py +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright 2026 Munin -# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). - -from odoo import fields, models - - -class ResUsers(models.Model): - _inherit = "res.users" - - portal_url = fields.Char(string='Portal URL') - - def validate_portal_url(self, url): - group = self.sudo().env['res.groups'].search([('portal_url', '=', url)]) - if self.env.user in group.users: - return True - return False diff --git a/hide_portal_module_by_user/static/description/icon.png b/hide_portal_module_by_user/static/description/icon.png deleted file mode 100644 index 06c0af4..0000000 Binary files a/hide_portal_module_by_user/static/description/icon.png and /dev/null differ diff --git a/hide_portal_module_by_user/static/description/img.png b/hide_portal_module_by_user/static/description/img.png deleted file mode 100644 index 0443a9a..0000000 Binary files a/hide_portal_module_by_user/static/description/img.png and /dev/null differ diff --git a/hide_portal_module_by_user/static/description/img_1.png b/hide_portal_module_by_user/static/description/img_1.png deleted file mode 100644 index 7d8bae8..0000000 Binary files a/hide_portal_module_by_user/static/description/img_1.png and /dev/null differ diff --git a/hide_portal_module_by_user/static/description/img_2.png b/hide_portal_module_by_user/static/description/img_2.png deleted file mode 100644 index 716547f..0000000 Binary files a/hide_portal_module_by_user/static/description/img_2.png and /dev/null differ diff --git a/hide_portal_module_by_user/static/description/img_3.png b/hide_portal_module_by_user/static/description/img_3.png deleted file mode 100644 index 4c5121a..0000000 Binary files a/hide_portal_module_by_user/static/description/img_3.png and /dev/null differ diff --git a/hide_portal_module_by_user/static/description/img_4.png b/hide_portal_module_by_user/static/description/img_4.png deleted file mode 100644 index e6983ec..0000000 Binary files a/hide_portal_module_by_user/static/description/img_4.png and /dev/null differ diff --git a/hide_portal_module_by_user/static/description/index.html b/hide_portal_module_by_user/static/description/index.html deleted file mode 100644 index bbba931..0000000 --- a/hide_portal_module_by_user/static/description/index.html +++ /dev/null @@ -1,406 +0,0 @@ - - - - - - -Hide Portal Module By User - - - -
-

Hide Portal Module By User

- -

Show / Hide Specific Portal Docs on res.users

-
-

IMPORTANT

-

!! IMPORTANT !!

-

This module doesnt modify the access rights of the users, it only hides the documents.

-

This Module will Allow to enter a specific document via URL even when the user does not have the group assigned to it.

-

REVIEW YOUR USE CASES

-

Example:

-

if you dont have the group assigned to it.

- -

PLEASE MAKE A PR IF YOU I MISSED TO WHITELIST A ROUTE URL

-
-
-

Usage

-

To use this module, you need to:

-
    -
  1. Install and Configure the Groups and Users
  2. -
-hide_portal_module_by_user 1 -hide_portal_module_by_user 2 -hide_portal_module_by_user 3 -hide_portal_module_by_user 24 -hide_portal_module_by_user 24 -
-
-

How it Works

- -
-
-

Changelog

-
-
- - diff --git a/hide_portal_module_by_user/views/portal_home.xml b/hide_portal_module_by_user/views/portal_home.xml deleted file mode 100644 index 8e74a28..0000000 --- a/hide_portal_module_by_user/views/portal_home.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/hide_portal_module_by_user/views/res_groups.xml b/hide_portal_module_by_user/views/res_groups.xml deleted file mode 100644 index 886168c..0000000 --- a/hide_portal_module_by_user/views/res_groups.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - res.groups.form (in hide_portal_module_by_user) - res.groups - - - - - - - - - res.groups.search (in hide_portal_module_by_user) - res.groups - - - - - - - - diff --git a/mail_message_copy_in_partner/README.rst b/mail_message_copy_in_partner/README.rst deleted file mode 100644 index 7f8ca63..0000000 --- a/mail_message_copy_in_partner/README.rst +++ /dev/null @@ -1,52 +0,0 @@ -==================== -mail_message_copy_in_partner -==================== - -Installation -============ -Use Odoo normal module installation procedure to install ``mail_message_copy_in_partner``. - - -Configuration -============= - -Nothing to do - - -Usage -===== -If module is installed, notes will never send email to partners not linked to internal users. - - -Known issues / Roadmap -====================== - -None yet. - -Bug Tracker -=========== - -Bugs are tracked on `our issues website `_. In case of -trouble, please check there if your issue has already been -reported. If you spotted it first, help us smashing it by providing a -detailed and welcomed feedback. - -Credits -======= - -Contributors ------------- - -* Clément Thomas - -Funders -------- - -The development of this module has been financially supported by: -* Elabore (https://elabore.coop) - - -Maintainer ----------- - -This module is maintained by Elabore. \ No newline at end of file diff --git a/mail_message_copy_in_partner/__init__.py b/mail_message_copy_in_partner/__init__.py deleted file mode 100644 index e991714..0000000 --- a/mail_message_copy_in_partner/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -# -*- coding: utf-8 -*- -# Part of Odoo. See LICENSE file for full copyright and licensing details. - -from . import models \ No newline at end of file diff --git a/mail_message_copy_in_partner/__manifest__.py b/mail_message_copy_in_partner/__manifest__.py deleted file mode 100644 index 0fb401c..0000000 --- a/mail_message_copy_in_partner/__manifest__.py +++ /dev/null @@ -1,89 +0,0 @@ -# Copyright 2022 Laetitia Élabore (Elabore) -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). - -{ - "name": "mail_message_copy_in_partner", - "version": "16.0.1.0.0", - "author": "Elabore", - "website": "https://github.com/elabore-coop/ux-tools", - "maintainer": "Clément", - "license": "AGPL-3", - "category": "Tools", - "summary": "If current model has partner_id field, all messages will be copied in partner's chatter", - "description": """ - :image: https://img.shields.io/badge/licence-AGPL--3-blue.svg - :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html - :alt: License: AGPL-3 -================= -mail_message_copy_in_partner -================= -If current model has partner_id field, all messages will be copied in partner's chatter -New message is a note without recipients - - -Installation -============ - -Install ``mail_message_copy_in_partner``, all dependencies will be installed by default. - -Known issues / Roadmap -====================== - -None yet. - -Bug Tracker -=========== - -Bugs are tracked on `our issues website -`_. In case of -trouble, please check there if your issue has already been -reported. If you spotted it first, help us smashing it by providing a -detailed and welcomed feedback. - -Credits -======= - -Images ------- - -* Elabore: `Icon `_. - -Contributors ------------- - -* Clément Thomas - -Funders -------- - -The development of this module has been financially supported by: -* Elabore (https://elabore.coop) - - -Maintainer ----------- -This module is maintained by Elabore. - -""", - # any module necessary for this one to work correctly - 'depends' : ['base_setup'], - "qweb": [ - # "static/src/xml/*.xml", - ], - "external_dependencies": { - "python": [], - }, - # always loaded - "data": [ - - ], - # only loaded in demonstration mode - "demo": [], - "js": [], - "css": [], - "installable": True, - # Install this module automatically if all dependency have been previously - # and independently installed. Used for synergetic or glue modules. - "auto_install": False, - "application": False, -} diff --git a/mail_message_copy_in_partner/models/__init__.py b/mail_message_copy_in_partner/models/__init__.py deleted file mode 100644 index db2c259..0000000 --- a/mail_message_copy_in_partner/models/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from . import mail_thread \ No newline at end of file diff --git a/mail_message_copy_in_partner/models/mail_thread.py b/mail_message_copy_in_partner/models/mail_thread.py deleted file mode 100644 index 5191657..0000000 --- a/mail_message_copy_in_partner/models/mail_thread.py +++ /dev/null @@ -1,24 +0,0 @@ -from odoo import api, models, _ - - -class MailThread(models.AbstractModel): - _inherit = 'mail.thread' - - @api.returns('mail.message', lambda value: value.id) - def message_post(self, body='', **kwargs): - #send message to related partner - if hasattr(self, 'partner_id') and self.partner_id: - msg = _('[%(object)s] %(body)s',object=self._get_html_link(), body=body) - - new_kwargs = kwargs.copy() - - #new message is a note - new_kwargs['subtype_xmlid'] = "mail.mt_note" - - #do not send anything - new_kwargs['partner_ids'] = [] - - self.partner_id.message_post(body=msg, **new_kwargs) - - return super(MailThread, self).message_post(body=body, **kwargs) - \ No newline at end of file diff --git a/mail_prevent_send_note_to_external/README.rst b/mail_prevent_send_note_to_external/README.rst deleted file mode 100644 index d93a02e..0000000 --- a/mail_prevent_send_note_to_external/README.rst +++ /dev/null @@ -1,52 +0,0 @@ -==================== -mail_prevent_send_note_to_external -==================== - -Installation -============ -Use Odoo normal module installation procedure to install ``mail_prevent_send_note_to_external``. - - -Configuration -============= - -Nothing to do - - -Usage -===== -If module is installed, notes will never send email to partners not linked to internal users. - - -Known issues / Roadmap -====================== - -None yet. - -Bug Tracker -=========== - -Bugs are tracked on `our issues website `_. In case of -trouble, please check there if your issue has already been -reported. If you spotted it first, help us smashing it by providing a -detailed and welcomed feedback. - -Credits -======= - -Contributors ------------- - -* Clément Thomas - -Funders -------- - -The development of this module has been financially supported by: -* Elabore (https://elabore.coop) - - -Maintainer ----------- - -This module is maintained by Elabore. \ No newline at end of file diff --git a/mail_prevent_send_note_to_external/__init__.py b/mail_prevent_send_note_to_external/__init__.py deleted file mode 100644 index e991714..0000000 --- a/mail_prevent_send_note_to_external/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -# -*- coding: utf-8 -*- -# Part of Odoo. See LICENSE file for full copyright and licensing details. - -from . import models \ No newline at end of file diff --git a/mail_prevent_send_note_to_external/__manifest__.py b/mail_prevent_send_note_to_external/__manifest__.py deleted file mode 100644 index 923f07d..0000000 --- a/mail_prevent_send_note_to_external/__manifest__.py +++ /dev/null @@ -1,88 +0,0 @@ -# Copyright 2022 Laetitia Élabore (Elabore) -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). - -{ - "name": "mail_prevent_send_note_to_external", - "version": "16.0.1.0.0", - "author": "Elabore", - "website": "https://github.com/elabore-coop/ux-tools", - "maintainer": "Clément", - "license": "AGPL-3", - "category": "Tools", - "summary": "Prevent chatter note to send email to external partner", - "description": """ - :image: https://img.shields.io/badge/licence-AGPL--3-blue.svg - :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html - :alt: License: AGPL-3 -================= -mail_prevent_send_note_to_external -================= - -Prevent chatter note to send email to external partner - -Installation -============ - -Install ``mail_prevent_send_note_to_external``, all dependencies will be installed by default. - -Known issues / Roadmap -====================== - -None yet. - -Bug Tracker -=========== - -Bugs are tracked on `our issues website -`_. In case of -trouble, please check there if your issue has already been -reported. If you spotted it first, help us smashing it by providing a -detailed and welcomed feedback. - -Credits -======= - -Images ------- - -* Elabore: `Icon `_. - -Contributors ------------- - -* Clément Thomas - -Funders -------- - -The development of this module has been financially supported by: -* Elabore (https://elabore.coop) - - -Maintainer ----------- -This module is maintained by Elabore. - -""", - # any module necessary for this one to work correctly - 'depends' : ['base_setup'], - "qweb": [ - # "static/src/xml/*.xml", - ], - "external_dependencies": { - "python": [], - }, - # always loaded - "data": [ - - ], - # only loaded in demonstration mode - "demo": [], - "js": [], - "css": [], - "installable": True, - # Install this module automatically if all dependency have been previously - # and independently installed. Used for synergetic or glue modules. - "auto_install": False, - "application": False, -} diff --git a/mail_prevent_send_note_to_external/models/__init__.py b/mail_prevent_send_note_to_external/models/__init__.py deleted file mode 100644 index db2c259..0000000 --- a/mail_prevent_send_note_to_external/models/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from . import mail_thread \ No newline at end of file diff --git a/mail_prevent_send_note_to_external/models/mail_thread.py b/mail_prevent_send_note_to_external/models/mail_thread.py deleted file mode 100644 index 6ea55d3..0000000 --- a/mail_prevent_send_note_to_external/models/mail_thread.py +++ /dev/null @@ -1,19 +0,0 @@ -from odoo import api, models, _ - - -class MailThread(models.AbstractModel): - _inherit = 'mail.thread' - - @api.returns('mail.message', lambda value: value.id) - def message_post(self, **kwargs): - #check subtype_xmlid and partner_ids, and remove external partners if subtype is "note" - if kwargs.get("subtype_xmlid") == 'mail.mt_note' and "partner_ids" in kwargs: - new_partner_ids = [] - for partner_id in kwargs["partner_ids"]: - user = self.env["res.users"].search([('partner_id','=',partner_id)]) - if user.active and user.has_group('base.group_user'): - new_partner_ids.append(partner_id) - kwargs["partner_ids"] = new_partner_ids - - message = super(MailThread, self).message_post(**kwargs) - return message \ No newline at end of file