diff --git a/mail_message_access/README.rst b/mail_message_access/README.rst new file mode 100755 index 000000000..2d43b69ea --- /dev/null +++ b/mail_message_access/README.rst @@ -0,0 +1,53 @@ +.. image:: https://img.shields.io/badge/license-LGPL--3-blue.svg + :target: https://www.gnu.org/licenses/lgpl-3.0-standalone.html + :alt: License: LGPL-3 + +Mail Message Access +=================== +Implement the restriction on chatter messages for the users + +Configuration +============= +In Odoo's chatter, you can restrict chatter messages for users by implementing access rights. +By setting specific access permissions, you can control who can send messages and what actions +they can perform within the chatter. + +Installation +============ + - www.odoo.com/documentation/16.0/setup/install.html + - Install our custom addon + +License +------- +General Public License, Version 3 (LGPL v3). +(https://www.gnu.org/licenses/lgpl-3.0-standalone.html) + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +Developer: (V16) Ahammed Harshad P, Contact: odoo@cybrosys.com + +Contacts +-------- +* Mail Contact : odoo@cybrosys.com +* Website : https://cybrosys.com + +Bug Tracker +----------- +Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. + +Maintainer +========== +.. image:: https://cybrosys.com/images/logo.png + :target: https://cybrosys.com + +This module is maintained by Cybrosys Technologies. + +For support and more information, please visit `Our Website `__ + +Further information +=================== +HTML Description: ``__ diff --git a/mail_message_access/__init__.py b/mail_message_access/__init__.py new file mode 100644 index 000000000..1404ddd85 --- /dev/null +++ b/mail_message_access/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Ahammed Harshad p() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from . import models diff --git a/mail_message_access/__manifest__.py b/mail_message_access/__manifest__.py new file mode 100644 index 000000000..36f5632f5 --- /dev/null +++ b/mail_message_access/__manifest__.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Ahammed Harshad p() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +{ + 'name': 'Mail Message Access', + 'version': '16.0.1.0.0', + 'category': 'Extra Tools', + 'summary': 'Implement the restriction on chatter messages for the users', + 'description': 'In Odoo chatter, you can restrict chatter messages for ' + 'users by implementing access rights. By setting specific ' + 'access permissions, you can control who can send messages ' + 'and what actions they you to ensure a secure and ' + 'controlled messaging environment, maintaining data ' + 'integrity and promoting efficient collaboration within ' + 'the platform.', + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': "https://www.cybrosys.com", + 'depends': ['base_setup', 'mail'], + 'data': [ + 'security/mail_message_access_groups.xml', + ], + 'assets': { + 'web.assets_backend': [ + 'mail_message_access/static/src/models/chatter.js', + 'mail_message_access/static/src/components/chatter_topbar/chatter_topbar.xml' + ] + }, + 'images': [ + 'static/description/banner.jpg', + 'static/description/icon.png', + ], + 'license': 'LGPL-3', + 'installable': True, + 'application': False, + 'auto_install': False, +} diff --git a/mail_message_access/doc/RELEASE_NOTES.md b/mail_message_access/doc/RELEASE_NOTES.md new file mode 100755 index 000000000..aebb1fa72 --- /dev/null +++ b/mail_message_access/doc/RELEASE_NOTES.md @@ -0,0 +1,7 @@ +## Module + +#### 05.01.2024 +#### Version 16.0.1.0.0 +#### ADD + +- Initial commit for Mail Message Access diff --git a/mail_message_access/models/__init__.py b/mail_message_access/models/__init__.py new file mode 100644 index 000000000..0172dc3e5 --- /dev/null +++ b/mail_message_access/models/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Ahammed Harshad p() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from . import ir_http diff --git a/mail_message_access/models/ir_http.py b/mail_message_access/models/ir_http.py new file mode 100644 index 000000000..5a28113eb --- /dev/null +++ b/mail_message_access/models/ir_http.py @@ -0,0 +1,38 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Ahammed Harshad p() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import models + + +class Http(models.AbstractModel): + """Class inherits Http to update user group values.""" + _inherit = 'ir.http' + + def session_info(self): + """Overwrite the function to update user group values in session""" + res = super(Http, self).session_info() + res.update({ + 'access_send_message_btn': True if self.env.user.has_group( + 'mail_message_access.group_allow_send_message_btn') else False, + 'access_log_note_btn': True if self.env.user.has_group( + 'mail_message_access.group_allow_log_note_btn') else False + }) + return res diff --git a/mail_message_access/security/mail_message_access_groups.xml b/mail_message_access/security/mail_message_access_groups.xml new file mode 100644 index 000000000..8b23f8f9f --- /dev/null +++ b/mail_message_access/security/mail_message_access_groups.xml @@ -0,0 +1,19 @@ + + + + Allow Send Message + + Allow user to access to the Send message button in chatter. + + + Allow Log Note + + Allow user to access to the Log note button in chatter. + + + + + + diff --git a/mail_message_access/static/description/assets/icons/check.png b/mail_message_access/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/mail_message_access/static/description/assets/icons/check.png differ diff --git a/mail_message_access/static/description/assets/icons/chevron.png b/mail_message_access/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/mail_message_access/static/description/assets/icons/chevron.png differ diff --git a/mail_message_access/static/description/assets/icons/cogs.png b/mail_message_access/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/mail_message_access/static/description/assets/icons/cogs.png differ diff --git a/mail_message_access/static/description/assets/icons/consultation.png b/mail_message_access/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/mail_message_access/static/description/assets/icons/consultation.png differ diff --git a/mail_message_access/static/description/assets/icons/ecom-black.png b/mail_message_access/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/mail_message_access/static/description/assets/icons/ecom-black.png differ diff --git a/mail_message_access/static/description/assets/icons/education-black.png b/mail_message_access/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/mail_message_access/static/description/assets/icons/education-black.png differ diff --git a/mail_message_access/static/description/assets/icons/hotel-black.png b/mail_message_access/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/mail_message_access/static/description/assets/icons/hotel-black.png differ diff --git a/mail_message_access/static/description/assets/icons/license.png b/mail_message_access/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/mail_message_access/static/description/assets/icons/license.png differ diff --git a/mail_message_access/static/description/assets/icons/lifebuoy.png b/mail_message_access/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/mail_message_access/static/description/assets/icons/lifebuoy.png differ diff --git a/mail_message_access/static/description/assets/icons/logo.png b/mail_message_access/static/description/assets/icons/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/mail_message_access/static/description/assets/icons/logo.png differ diff --git a/mail_message_access/static/description/assets/icons/manufacturing-black.png b/mail_message_access/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/mail_message_access/static/description/assets/icons/manufacturing-black.png differ diff --git a/mail_message_access/static/description/assets/icons/pos-black.png b/mail_message_access/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/mail_message_access/static/description/assets/icons/pos-black.png differ diff --git a/mail_message_access/static/description/assets/icons/puzzle.png b/mail_message_access/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/mail_message_access/static/description/assets/icons/puzzle.png differ diff --git a/mail_message_access/static/description/assets/icons/restaurant-black.png b/mail_message_access/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/mail_message_access/static/description/assets/icons/restaurant-black.png differ diff --git a/mail_message_access/static/description/assets/icons/service-black.png b/mail_message_access/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/mail_message_access/static/description/assets/icons/service-black.png differ diff --git a/mail_message_access/static/description/assets/icons/trading-black.png b/mail_message_access/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/mail_message_access/static/description/assets/icons/trading-black.png differ diff --git a/mail_message_access/static/description/assets/icons/training.png b/mail_message_access/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/mail_message_access/static/description/assets/icons/training.png differ diff --git a/mail_message_access/static/description/assets/icons/update.png b/mail_message_access/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/mail_message_access/static/description/assets/icons/update.png differ diff --git a/mail_message_access/static/description/assets/icons/user.png b/mail_message_access/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/mail_message_access/static/description/assets/icons/user.png differ diff --git a/mail_message_access/static/description/assets/icons/wrench.png b/mail_message_access/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/mail_message_access/static/description/assets/icons/wrench.png differ diff --git a/mail_message_access/static/description/assets/misc/categories.png b/mail_message_access/static/description/assets/misc/categories.png new file mode 100644 index 000000000..bedf1e0b1 Binary files /dev/null and b/mail_message_access/static/description/assets/misc/categories.png differ diff --git a/mail_message_access/static/description/assets/misc/check-box.png b/mail_message_access/static/description/assets/misc/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/mail_message_access/static/description/assets/misc/check-box.png differ diff --git a/mail_message_access/static/description/assets/misc/compass.png b/mail_message_access/static/description/assets/misc/compass.png new file mode 100644 index 000000000..d5fed8faa Binary files /dev/null and b/mail_message_access/static/description/assets/misc/compass.png differ diff --git a/mail_message_access/static/description/assets/misc/corporate.png b/mail_message_access/static/description/assets/misc/corporate.png new file mode 100644 index 000000000..2eb13edbf Binary files /dev/null and b/mail_message_access/static/description/assets/misc/corporate.png differ diff --git a/mail_message_access/static/description/assets/misc/customer-support.png b/mail_message_access/static/description/assets/misc/customer-support.png new file mode 100644 index 000000000..79efc72ed Binary files /dev/null and b/mail_message_access/static/description/assets/misc/customer-support.png differ diff --git a/mail_message_access/static/description/assets/misc/cybrosys-logo.png b/mail_message_access/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/mail_message_access/static/description/assets/misc/cybrosys-logo.png differ diff --git a/mail_message_access/static/description/assets/misc/features.png b/mail_message_access/static/description/assets/misc/features.png new file mode 100644 index 000000000..b41769f77 Binary files /dev/null and b/mail_message_access/static/description/assets/misc/features.png differ diff --git a/mail_message_access/static/description/assets/misc/logo.png b/mail_message_access/static/description/assets/misc/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/mail_message_access/static/description/assets/misc/logo.png differ diff --git a/mail_message_access/static/description/assets/misc/pictures.png b/mail_message_access/static/description/assets/misc/pictures.png new file mode 100644 index 000000000..56d255fe9 Binary files /dev/null and b/mail_message_access/static/description/assets/misc/pictures.png differ diff --git a/mail_message_access/static/description/assets/misc/pie-chart.png b/mail_message_access/static/description/assets/misc/pie-chart.png new file mode 100644 index 000000000..426e05244 Binary files /dev/null and b/mail_message_access/static/description/assets/misc/pie-chart.png differ diff --git a/mail_message_access/static/description/assets/misc/right-arrow.png b/mail_message_access/static/description/assets/misc/right-arrow.png new file mode 100644 index 000000000..730984a06 Binary files /dev/null and b/mail_message_access/static/description/assets/misc/right-arrow.png differ diff --git a/mail_message_access/static/description/assets/misc/star.png b/mail_message_access/static/description/assets/misc/star.png new file mode 100644 index 000000000..2eb9ab29f Binary files /dev/null and b/mail_message_access/static/description/assets/misc/star.png differ diff --git a/mail_message_access/static/description/assets/misc/support.png b/mail_message_access/static/description/assets/misc/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/mail_message_access/static/description/assets/misc/support.png differ diff --git a/mail_message_access/static/description/assets/misc/whatsapp.png b/mail_message_access/static/description/assets/misc/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/mail_message_access/static/description/assets/misc/whatsapp.png differ diff --git a/mail_message_access/static/description/assets/modules/l1.png b/mail_message_access/static/description/assets/modules/l1.png new file mode 100644 index 000000000..9de1176ad Binary files /dev/null and b/mail_message_access/static/description/assets/modules/l1.png differ diff --git a/mail_message_access/static/description/assets/modules/l2.jpg b/mail_message_access/static/description/assets/modules/l2.jpg new file mode 100644 index 000000000..8d99e8c68 Binary files /dev/null and b/mail_message_access/static/description/assets/modules/l2.jpg differ diff --git a/mail_message_access/static/description/assets/modules/l3.png b/mail_message_access/static/description/assets/modules/l3.png new file mode 100644 index 000000000..fa1717f3b Binary files /dev/null and b/mail_message_access/static/description/assets/modules/l3.png differ diff --git a/mail_message_access/static/description/assets/modules/l4.png b/mail_message_access/static/description/assets/modules/l4.png new file mode 100644 index 000000000..690323d0b Binary files /dev/null and b/mail_message_access/static/description/assets/modules/l4.png differ diff --git a/mail_message_access/static/description/assets/modules/l5.jpg b/mail_message_access/static/description/assets/modules/l5.jpg new file mode 100644 index 000000000..073ede3e3 Binary files /dev/null and b/mail_message_access/static/description/assets/modules/l5.jpg differ diff --git a/mail_message_access/static/description/assets/modules/l6.png b/mail_message_access/static/description/assets/modules/l6.png new file mode 100644 index 000000000..3415917c2 Binary files /dev/null and b/mail_message_access/static/description/assets/modules/l6.png differ diff --git a/mail_message_access/static/description/assets/screenshots/hero.gif b/mail_message_access/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..b7963a997 Binary files /dev/null and b/mail_message_access/static/description/assets/screenshots/hero.gif differ diff --git a/mail_message_access/static/description/assets/screenshots/mma_01.png b/mail_message_access/static/description/assets/screenshots/mma_01.png new file mode 100644 index 000000000..e82fa1e62 Binary files /dev/null and b/mail_message_access/static/description/assets/screenshots/mma_01.png differ diff --git a/mail_message_access/static/description/assets/screenshots/mma_02.png b/mail_message_access/static/description/assets/screenshots/mma_02.png new file mode 100644 index 000000000..ecb9c7e5a Binary files /dev/null and b/mail_message_access/static/description/assets/screenshots/mma_02.png differ diff --git a/mail_message_access/static/description/assets/screenshots/mma_03.png b/mail_message_access/static/description/assets/screenshots/mma_03.png new file mode 100644 index 000000000..8ff478457 Binary files /dev/null and b/mail_message_access/static/description/assets/screenshots/mma_03.png differ diff --git a/mail_message_access/static/description/assets/screenshots/mma_04.png b/mail_message_access/static/description/assets/screenshots/mma_04.png new file mode 100644 index 000000000..2a52741eb Binary files /dev/null and b/mail_message_access/static/description/assets/screenshots/mma_04.png differ diff --git a/mail_message_access/static/description/banner.jpg b/mail_message_access/static/description/banner.jpg new file mode 100644 index 000000000..422e7190c Binary files /dev/null and b/mail_message_access/static/description/banner.jpg differ diff --git a/mail_message_access/static/description/icon.png b/mail_message_access/static/description/icon.png new file mode 100644 index 000000000..1214cc988 Binary files /dev/null and b/mail_message_access/static/description/icon.png differ diff --git a/mail_message_access/static/description/index.html b/mail_message_access/static/description/index.html new file mode 100644 index 000000000..512a2f45b --- /dev/null +++ b/mail_message_access/static/description/index.html @@ -0,0 +1,635 @@ +
+ +
+ +
+
+ Community +
+
+ Enterprise +
+
+
+ + + +
+
+
+

+ Mail Message Access +

+

+ Implement the restriction on chatter messages for the users. +

+ +
+
+
+ +
+ +
+
+ +
+

+ Explore This + Module

+
+ + + + +
+
+ +
+

+ Overview +

+
+
+
+ Using mail message access you can restrict chatter messages for users by + implementing access rights. + By setting specific access permissions, you can control who can send + messages and what actions + they can perform within the chatter,Access rights in Odoo's chatter + enable you to ensure a secure + and controlled messaging environment. +
+
+ + + +
+
+ +
+

+ Features +

+
+
+
+
+ + Restrict Messaging for Users. +
+
+ + Configurate per Users. +
+
+ + Configure Access to the Buttons. +
+
+
+ + + +
+
+ +
+

+ Screenshots +

+
+
+
+ +
+

+ Configure the Settings based on User.

+

Configuration for "Log Note" access + Button.

+ +

Configuration for "Send Message" access + Button.

+ +
+
+

+ Chatter View

+

No Access to the "Send Message" + Button.

+ +

No Access to the "Log Note" + Button.

+ +
+
+
+ + + +
+
+ +
+

+ Related + Products +

+
+
+
+ +
+
+ + + + +
+
+ +
+

+ Our Services +

+
+ +
+
+
+
+ +
+
+ Odoo + Customization
+
+ +
+
+ +
+
+ Odoo + Implementation
+
+ +
+
+ +
+
+ Odoo + Support
+
+ + +
+
+ +
+
+ Hire + Odoo + Developer
+
+ +
+
+ +
+
+ Odoo + Integration
+
+ +
+
+ +
+
+ Odoo + Migration
+
+ + +
+
+ +
+
+ Odoo + Consultancy
+
+ +
+
+ +
+
+ Odoo + Implementation
+
+ +
+
+ +
+
+ Odoo + Licensing Consultancy
+
+
+ +
+ + + + + +
+
+ +
+

+ Our + Industries +

+
+ +
+
+
+
+ +
+ Trading +
+

+ Easily procure + and + sell your products

+
+
+ +
+
+ +
+ POS +
+

+ Easy + configuration + and convivial experience

+
+
+ +
+
+ +
+ Education +
+

+ A platform for + educational management

+
+
+ +
+
+ +
+ Manufacturing +
+

+ Plan, track and + schedule your operations

+
+
+ +
+
+ +
+ E-commerce & Website +
+

+ Mobile + friendly, + awe-inspiring product pages

+
+
+ +
+
+ +
+ Service Management +
+

+ Keep track of + services and invoice

+
+
+ +
+
+ +
+ Restaurant +
+

+ Run your bar or + restaurant methodically

+
+
+ +
+
+ +
+ Hotel Management +
+

+ An + all-inclusive + hotel management application

+
+
+
+
+ + + + +
+
+ +
+

+ Support +

+
+
+
+
+
+
+ +
+
+

Need Help?

+

Got questions or need help? + Get in touch.

+ +

+ odoo@cybrosys.com

+
+
+
+
+
+
+
+ +
+
+

WhatsApp

+

Say hi to us on WhatsApp!

+ +

+ +91 86068 + 27707

+
+
+
+
+
+
+
+ +
+
+
+ \ No newline at end of file diff --git a/mail_message_access/static/src/components/chatter_topbar/chatter_topbar.xml b/mail_message_access/static/src/components/chatter_topbar/chatter_topbar.xml new file mode 100644 index 000000000..600158dbc --- /dev/null +++ b/mail_message_access/static/src/components/chatter_topbar/chatter_topbar.xml @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + diff --git a/mail_message_access/static/src/models/chatter.js b/mail_message_access/static/src/models/chatter.js new file mode 100644 index 000000000..05c16bd29 --- /dev/null +++ b/mail_message_access/static/src/models/chatter.js @@ -0,0 +1,21 @@ +/** @odoo-module **/ + +import { registerPatch } from '@mail/model/model_core'; +import { session } from '@web/session'; +import { attr } from '@mail/model/model_field'; + +registerPatch({ + name : 'Chatter', + /** + * @returns + * -Boolean: access values from the session. + **/ + fields : { + AllowSendMessageBtn: attr({ + default: session.access_send_message_btn + }), + AllowLogNoteBtn: attr({ + default: session.access_log_note_btn + }) + } +})