diff --git a/size_restriction_for_attachments/README.rst b/size_restriction_for_attachments/README.rst new file mode 100755 index 000000000..c8012490e --- /dev/null +++ b/size_restriction_for_attachments/README.rst @@ -0,0 +1,44 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: https://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +Size Restriction For Attachments +================================ +This module allow to restrict attachment uploading size for a particular user. + +Configuration +============= +*No Additional configuration is needed. + +License +------- +General Public License, Version 3 (AGPL-3). +(https://www.gnu.org/licenses/agpl-3.0-standalone.html) + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +Developer:(V15) Swetha Anand @cybrosys, 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/size_restriction_for_attachments/__init__.py b/size_restriction_for_attachments/__init__.py new file mode 100644 index 000000000..8cf942144 --- /dev/null +++ b/size_restriction_for_attachments/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Swetha Anand (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################### +from . import controllers +from . import models diff --git a/size_restriction_for_attachments/__manifest__.py b/size_restriction_for_attachments/__manifest__.py new file mode 100644 index 000000000..17960ac94 --- /dev/null +++ b/size_restriction_for_attachments/__manifest__.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Swetha Anand (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################### +{ + 'name': 'Size Restriction for Attachments', + 'version': '15.0.1.0.0', + 'category': 'Document Management', + 'summary': 'Show a error message if attachment greater than users maximum ' + 'attachment size.', + 'description': 'If the size of attachment is greater than the maximum ' + 'size assigned for that person then error message will be' + 'shown.', + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'depends': ['base', 'mail'], + 'data': { + 'views/res_users_views.xml' + }, + 'images': ['static/description/banner.png'], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/size_restriction_for_attachments/controllers/__init__.py b/size_restriction_for_attachments/controllers/__init__.py new file mode 100644 index 000000000..d5eede78d --- /dev/null +++ b/size_restriction_for_attachments/controllers/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Swetha Anand (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################### +from . import discuss diff --git a/size_restriction_for_attachments/controllers/discuss.py b/size_restriction_for_attachments/controllers/discuss.py new file mode 100644 index 000000000..2522934f9 --- /dev/null +++ b/size_restriction_for_attachments/controllers/discuss.py @@ -0,0 +1,88 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Swetha Anand (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################### +import json +from odoo import _, http +from odoo.exceptions import AccessError +from odoo.http import request +from odoo.addons.mail.controllers.discuss import DiscussController + + +class DiscussController(DiscussController): + """This class is called to override mail_attachment_upload().""" + + @http.route('/mail/attachment/upload', methods=['POST'], + type='http', auth='public') + def mail_attachment_upload(self, ufile, thread_id, + thread_model, is_pending=False, **kwargs): + """ Override the function mail_attachment_upload() to include a check + to see if the size of the attachment exceeds the user-assigned maximum + size. If true, an error message is displayed.""" + channel_partner = request.env['mail.channel.partner'] + set_restriction = request.env.user.set_restriction + max_size = request.env.user.max_size * 1024 * 1024 + if thread_model == 'mail.channel': + channel_partner = request.env[ + 'mail.channel.partner']._get_as_sudo_from_request_or_raise( + request=request, channel_id=int(thread_id)) + vals = { + 'name': ufile.filename, + 'raw': ufile.read(), + 'res_id': int(thread_id), + 'res_model': thread_model, + } + if is_pending and is_pending != 'false': + # Add this point, the message related to the uploaded file does + # not exist yet, so we use those placeholder values instead. + vals.update({ + 'res_id': 0, + 'res_model': 'mail.compose.message', + }) + if channel_partner.env.user.share: + # Only generate the access token + # if absolutely necessary (= not for internal user). + vals['access_token'] = \ + channel_partner.env['ir.attachment']._generate_access_token() + try: + attachment = channel_partner.env['ir.attachment'].create(vals) + attachment._post_add_create() + attachmentData = { + 'filename': ufile.filename, + 'id': attachment.id, + 'mimetype': attachment.mimetype, + 'name': attachment.name, + 'size': attachment.file_size + } + if attachment.access_token: + attachmentData['accessToken'] = attachment.access_token + if set_restriction: + if attachmentData['size'] > max_size: + attachmentData = {'error': _('Attachment' + ' size cannot exceed %s MB.' + ) % request.env.user.max_size} + attachment.unlink() + except AccessError: + attachmentData = {'error': _("You are not allowed " + "to upload an attachment here.")} + return request.make_response( + data=json.dumps(attachmentData), + headers=[('Content-Type', 'application/json')] + ) diff --git a/size_restriction_for_attachments/doc/RELEASE_NOTES.md b/size_restriction_for_attachments/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..0440fc5f5 --- /dev/null +++ b/size_restriction_for_attachments/doc/RELEASE_NOTES.md @@ -0,0 +1,7 @@ +## Module + +#### 05.07.2023 +#### Version 15.0.1.0.0 +#### ADD + +- Initial commit for Size Restriction For Attachments \ No newline at end of file diff --git a/size_restriction_for_attachments/models/__init__.py b/size_restriction_for_attachments/models/__init__.py new file mode 100644 index 000000000..7231409d7 --- /dev/null +++ b/size_restriction_for_attachments/models/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Swetha Anand (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################### +from .import res_users diff --git a/size_restriction_for_attachments/models/res_users.py b/size_restriction_for_attachments/models/res_users.py new file mode 100644 index 000000000..cf8908560 --- /dev/null +++ b/size_restriction_for_attachments/models/res_users.py @@ -0,0 +1,36 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Swetha Anand (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################### +from odoo import fields, models + + +class ResUsers(models.Model): + """Inherits res.users. to add new fields to set restriction on size of the + attachment to be uploaded and to set maximum size of attachment.""" + _inherit = 'res.users' + + set_restriction = fields.Boolean(string="Set Restriction", + help="If true then that person " + "will have restriction on " + "size of the attachment to " + "be uploaded.") + max_size = fields.Float(string="Maximum size(MB)", default=0.0, + help="Maximum size of attachment in MB.") diff --git a/size_restriction_for_attachments/static/description/assets/icons/check.png b/size_restriction_for_attachments/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/size_restriction_for_attachments/static/description/assets/icons/check.png differ diff --git a/size_restriction_for_attachments/static/description/assets/icons/chevron.png b/size_restriction_for_attachments/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/size_restriction_for_attachments/static/description/assets/icons/chevron.png differ diff --git a/size_restriction_for_attachments/static/description/assets/icons/cogs.png b/size_restriction_for_attachments/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/size_restriction_for_attachments/static/description/assets/icons/cogs.png differ diff --git a/size_restriction_for_attachments/static/description/assets/icons/consultation.png b/size_restriction_for_attachments/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/size_restriction_for_attachments/static/description/assets/icons/consultation.png differ diff --git a/size_restriction_for_attachments/static/description/assets/icons/ecom-black.png b/size_restriction_for_attachments/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/size_restriction_for_attachments/static/description/assets/icons/ecom-black.png differ diff --git a/size_restriction_for_attachments/static/description/assets/icons/education-black.png b/size_restriction_for_attachments/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/size_restriction_for_attachments/static/description/assets/icons/education-black.png differ diff --git a/size_restriction_for_attachments/static/description/assets/icons/hotel-black.png b/size_restriction_for_attachments/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/size_restriction_for_attachments/static/description/assets/icons/hotel-black.png differ diff --git a/size_restriction_for_attachments/static/description/assets/icons/license.png b/size_restriction_for_attachments/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/size_restriction_for_attachments/static/description/assets/icons/license.png differ diff --git a/size_restriction_for_attachments/static/description/assets/icons/lifebuoy.png b/size_restriction_for_attachments/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/size_restriction_for_attachments/static/description/assets/icons/lifebuoy.png differ diff --git a/size_restriction_for_attachments/static/description/assets/icons/manufacturing-black.png b/size_restriction_for_attachments/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/size_restriction_for_attachments/static/description/assets/icons/manufacturing-black.png differ diff --git a/size_restriction_for_attachments/static/description/assets/icons/pos-black.png b/size_restriction_for_attachments/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/size_restriction_for_attachments/static/description/assets/icons/pos-black.png differ diff --git a/size_restriction_for_attachments/static/description/assets/icons/puzzle.png b/size_restriction_for_attachments/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/size_restriction_for_attachments/static/description/assets/icons/puzzle.png differ diff --git a/size_restriction_for_attachments/static/description/assets/icons/restaurant-black.png b/size_restriction_for_attachments/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/size_restriction_for_attachments/static/description/assets/icons/restaurant-black.png differ diff --git a/size_restriction_for_attachments/static/description/assets/icons/service-black.png b/size_restriction_for_attachments/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/size_restriction_for_attachments/static/description/assets/icons/service-black.png differ diff --git a/size_restriction_for_attachments/static/description/assets/icons/trading-black.png b/size_restriction_for_attachments/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/size_restriction_for_attachments/static/description/assets/icons/trading-black.png differ diff --git a/size_restriction_for_attachments/static/description/assets/icons/training.png b/size_restriction_for_attachments/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/size_restriction_for_attachments/static/description/assets/icons/training.png differ diff --git a/size_restriction_for_attachments/static/description/assets/icons/update.png b/size_restriction_for_attachments/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/size_restriction_for_attachments/static/description/assets/icons/update.png differ diff --git a/size_restriction_for_attachments/static/description/assets/icons/user.png b/size_restriction_for_attachments/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/size_restriction_for_attachments/static/description/assets/icons/user.png differ diff --git a/size_restriction_for_attachments/static/description/assets/icons/wrench.png b/size_restriction_for_attachments/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/size_restriction_for_attachments/static/description/assets/icons/wrench.png differ diff --git a/size_restriction_for_attachments/static/description/assets/misc/categories.png b/size_restriction_for_attachments/static/description/assets/misc/categories.png new file mode 100644 index 000000000..bedf1e0b1 Binary files /dev/null and b/size_restriction_for_attachments/static/description/assets/misc/categories.png differ diff --git a/size_restriction_for_attachments/static/description/assets/misc/check-box.png b/size_restriction_for_attachments/static/description/assets/misc/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/size_restriction_for_attachments/static/description/assets/misc/check-box.png differ diff --git a/size_restriction_for_attachments/static/description/assets/misc/compass.png b/size_restriction_for_attachments/static/description/assets/misc/compass.png new file mode 100644 index 000000000..d5fed8faa Binary files /dev/null and b/size_restriction_for_attachments/static/description/assets/misc/compass.png differ diff --git a/size_restriction_for_attachments/static/description/assets/misc/corporate.png b/size_restriction_for_attachments/static/description/assets/misc/corporate.png new file mode 100644 index 000000000..2eb13edbf Binary files /dev/null and b/size_restriction_for_attachments/static/description/assets/misc/corporate.png differ diff --git a/size_restriction_for_attachments/static/description/assets/misc/customer-support.png b/size_restriction_for_attachments/static/description/assets/misc/customer-support.png new file mode 100644 index 000000000..79efc72ed Binary files /dev/null and b/size_restriction_for_attachments/static/description/assets/misc/customer-support.png differ diff --git a/size_restriction_for_attachments/static/description/assets/misc/cybrosys-logo.png b/size_restriction_for_attachments/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/size_restriction_for_attachments/static/description/assets/misc/cybrosys-logo.png differ diff --git a/size_restriction_for_attachments/static/description/assets/misc/features.png b/size_restriction_for_attachments/static/description/assets/misc/features.png new file mode 100644 index 000000000..b41769f77 Binary files /dev/null and b/size_restriction_for_attachments/static/description/assets/misc/features.png differ diff --git a/size_restriction_for_attachments/static/description/assets/misc/logo.png b/size_restriction_for_attachments/static/description/assets/misc/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/size_restriction_for_attachments/static/description/assets/misc/logo.png differ diff --git a/size_restriction_for_attachments/static/description/assets/misc/pictures.png b/size_restriction_for_attachments/static/description/assets/misc/pictures.png new file mode 100644 index 000000000..56d255fe9 Binary files /dev/null and b/size_restriction_for_attachments/static/description/assets/misc/pictures.png differ diff --git a/size_restriction_for_attachments/static/description/assets/misc/pie-chart.png b/size_restriction_for_attachments/static/description/assets/misc/pie-chart.png new file mode 100644 index 000000000..426e05244 Binary files /dev/null and b/size_restriction_for_attachments/static/description/assets/misc/pie-chart.png differ diff --git a/size_restriction_for_attachments/static/description/assets/misc/right-arrow.png b/size_restriction_for_attachments/static/description/assets/misc/right-arrow.png new file mode 100644 index 000000000..730984a06 Binary files /dev/null and b/size_restriction_for_attachments/static/description/assets/misc/right-arrow.png differ diff --git a/size_restriction_for_attachments/static/description/assets/misc/star.png b/size_restriction_for_attachments/static/description/assets/misc/star.png new file mode 100644 index 000000000..2eb9ab29f Binary files /dev/null and b/size_restriction_for_attachments/static/description/assets/misc/star.png differ diff --git a/size_restriction_for_attachments/static/description/assets/misc/support.png b/size_restriction_for_attachments/static/description/assets/misc/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/size_restriction_for_attachments/static/description/assets/misc/support.png differ diff --git a/size_restriction_for_attachments/static/description/assets/misc/whatsapp.png b/size_restriction_for_attachments/static/description/assets/misc/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/size_restriction_for_attachments/static/description/assets/misc/whatsapp.png differ diff --git a/size_restriction_for_attachments/static/description/assets/modules/1.jpg b/size_restriction_for_attachments/static/description/assets/modules/1.jpg new file mode 100644 index 000000000..8890ee31d Binary files /dev/null and b/size_restriction_for_attachments/static/description/assets/modules/1.jpg differ diff --git a/size_restriction_for_attachments/static/description/assets/modules/2.png b/size_restriction_for_attachments/static/description/assets/modules/2.png new file mode 100644 index 000000000..cb60986ec Binary files /dev/null and b/size_restriction_for_attachments/static/description/assets/modules/2.png differ diff --git a/size_restriction_for_attachments/static/description/assets/modules/3.png b/size_restriction_for_attachments/static/description/assets/modules/3.png new file mode 100644 index 000000000..30ad58232 Binary files /dev/null and b/size_restriction_for_attachments/static/description/assets/modules/3.png differ diff --git a/size_restriction_for_attachments/static/description/assets/modules/4.png b/size_restriction_for_attachments/static/description/assets/modules/4.png new file mode 100644 index 000000000..f01b10060 Binary files /dev/null and b/size_restriction_for_attachments/static/description/assets/modules/4.png differ diff --git a/size_restriction_for_attachments/static/description/assets/modules/5.png b/size_restriction_for_attachments/static/description/assets/modules/5.png new file mode 100644 index 000000000..c138dd7c2 Binary files /dev/null and b/size_restriction_for_attachments/static/description/assets/modules/5.png differ diff --git a/size_restriction_for_attachments/static/description/assets/modules/6.png b/size_restriction_for_attachments/static/description/assets/modules/6.png new file mode 100644 index 000000000..004c61a9e Binary files /dev/null and b/size_restriction_for_attachments/static/description/assets/modules/6.png differ diff --git a/size_restriction_for_attachments/static/description/assets/screenshots/hero.gif b/size_restriction_for_attachments/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..6ba2667e8 Binary files /dev/null and b/size_restriction_for_attachments/static/description/assets/screenshots/hero.gif differ diff --git a/size_restriction_for_attachments/static/description/assets/screenshots/size151_en.png b/size_restriction_for_attachments/static/description/assets/screenshots/size151_en.png new file mode 100644 index 000000000..d1daf615a Binary files /dev/null and b/size_restriction_for_attachments/static/description/assets/screenshots/size151_en.png differ diff --git a/size_restriction_for_attachments/static/description/assets/screenshots/size152_en.png b/size_restriction_for_attachments/static/description/assets/screenshots/size152_en.png new file mode 100644 index 000000000..c4aedbf73 Binary files /dev/null and b/size_restriction_for_attachments/static/description/assets/screenshots/size152_en.png differ diff --git a/size_restriction_for_attachments/static/description/assets/screenshots/size153_en.png b/size_restriction_for_attachments/static/description/assets/screenshots/size153_en.png new file mode 100644 index 000000000..8f2dc17a8 Binary files /dev/null and b/size_restriction_for_attachments/static/description/assets/screenshots/size153_en.png differ diff --git a/size_restriction_for_attachments/static/description/assets/screenshots/size154_en.png b/size_restriction_for_attachments/static/description/assets/screenshots/size154_en.png new file mode 100644 index 000000000..e5789322b Binary files /dev/null and b/size_restriction_for_attachments/static/description/assets/screenshots/size154_en.png differ diff --git a/size_restriction_for_attachments/static/description/banner.png b/size_restriction_for_attachments/static/description/banner.png new file mode 100644 index 000000000..e62836a85 Binary files /dev/null and b/size_restriction_for_attachments/static/description/banner.png differ diff --git a/size_restriction_for_attachments/static/description/icon.png b/size_restriction_for_attachments/static/description/icon.png new file mode 100644 index 000000000..b55643695 Binary files /dev/null and b/size_restriction_for_attachments/static/description/icon.png differ diff --git a/size_restriction_for_attachments/static/description/index.html b/size_restriction_for_attachments/static/description/index.html new file mode 100644 index 000000000..7fc79cdde --- /dev/null +++ b/size_restriction_for_attachments/static/description/index.html @@ -0,0 +1,542 @@ +
+ +
+ +
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+ +
+
+
+ +

+ Size Restriction For Attachments

+

If the attachment is + larger than the user's allowed attachment size, an error message is displayed.

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

Explore This + Module

+
+ + + + +
+
+ +
+

Overview +

+
+
+
+ The attachment size can be limited with the aid of this app. An error message will appear if the size of the + attachment exceeds the limit set for that user. + +
+
+ + + +
+
+ +
+

Features +

+
+
+
+ + Can limit the size of attachment files for particular users. +
+
+ + + +
+
+ +
+

Screenshots +

+
+
+
+
+

Enable Set + Restriction. +

+

Go to users and then + preferences. Enable set restriction if you wish to restrict a user's access to attach files.

+ +
+ +
+

Set Maximum Size. +

+

Set maximum file size + in MB which the user can upload.

+ +
+ +
+

Attachment.

+

If we try to attach a + file greater than the maximum size an error message is shown.

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

Suggested + 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

+
+
+
+
+
+
+
+ +
+
+
+ + diff --git a/size_restriction_for_attachments/views/res_users_views.xml b/size_restriction_for_attachments/views/res_users_views.xml new file mode 100644 index 000000000..755a3e0af --- /dev/null +++ b/size_restriction_for_attachments/views/res_users_views.xml @@ -0,0 +1,20 @@ + + + + + + res.users.view.form.inherit.size.restriction.for.attachments + + res.users + + + + + + + + + + + \ No newline at end of file