diff --git a/size_restriction_for_attachments/README.rst b/size_restriction_for_attachments/README.rst new file mode 100755 index 000000000..a6e956133 --- /dev/null +++ b/size_restriction_for_attachments/README.rst @@ -0,0 +1,40 @@ +.. 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 + +Size Restriction For Attachments +================================ +This module allow to restrict attachment uploading size for a particular user. +Configuration +============= +*No Additional configuration is needed. + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +Developer: 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..99d687792 --- /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 models +from . import controllers diff --git a/size_restriction_for_attachments/__manifest__.py b/size_restriction_for_attachments/__manifest__.py new file mode 100644 index 000000000..a0c92a1de --- /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': '16.0.1.0.0', + 'category': 'Document Management', + 'summary': 'Shows an 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', + 'images': ['static/description/banner.jpg'], + 'website': 'https://www.cybrosys.com', + 'depends': ['base', 'mail'], + 'data': { + 'views/res_users_views.xml' + }, + '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..6e4c3c9ba --- /dev/null +++ b/size_restriction_for_attachments/controllers/discuss.py @@ -0,0 +1,85 @@ +# -*- 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.exceptions import AccessError +from odoo.http import request +from odoo import _ +from odoo.addons.mail.controllers.discuss import DiscussController + + +class DiscussController(DiscussController): + """This class is called to override mail_attachment_upload().""" + + 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_member = request.env['mail.channel.member'] + set_restriction = request.env.user.set_restriction + max_size = request.env.user.max_size * 1024 * 1024 + if thread_model == 'mail.channel': + channel_member = request.env['mail.channel.member']. \ + _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_member.env.user.share: + # Only generate the access token if absolutely + # necessary (= not for internal user). + vals['access_token'] = \ + channel_member.env['ir.attachment']._generate_access_token() + try: + attachment = channel_member.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_json_response(attachmentData) 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..2ca03bce8 --- /dev/null +++ b/size_restriction_for_attachments/doc/RELEASE_NOTES.md @@ -0,0 +1,7 @@ +## Module + +#### 18.04.2023 +#### Version 16.0.1.0.0 +#### ADD + +- Initial commit for Size Restriction For Attachments 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..f5132d73d --- /dev/null +++ b/size_restriction_for_attachments/models/res_users.py @@ -0,0 +1,35 @@ +# -*- 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.user.""" + _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.gif b/size_restriction_for_attachments/static/description/assets/modules/1.gif new file mode 100644 index 000000000..db040e0de Binary files /dev/null and b/size_restriction_for_attachments/static/description/assets/modules/1.gif 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..3415917c2 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..a29119785 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..b55ddc812 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..25ed3e0b6 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..15b141248 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..da08bf5dc 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/size_161_en.png b/size_restriction_for_attachments/static/description/assets/screenshots/size_161_en.png new file mode 100644 index 000000000..ee94feee7 Binary files /dev/null and b/size_restriction_for_attachments/static/description/assets/screenshots/size_161_en.png differ diff --git a/size_restriction_for_attachments/static/description/assets/screenshots/size_162_en.png b/size_restriction_for_attachments/static/description/assets/screenshots/size_162_en.png new file mode 100644 index 000000000..6869e17f6 Binary files /dev/null and b/size_restriction_for_attachments/static/description/assets/screenshots/size_162_en.png differ diff --git a/size_restriction_for_attachments/static/description/assets/screenshots/size_163_en.png b/size_restriction_for_attachments/static/description/assets/screenshots/size_163_en.png new file mode 100644 index 000000000..d90509a58 Binary files /dev/null and b/size_restriction_for_attachments/static/description/assets/screenshots/size_163_en.png differ diff --git a/size_restriction_for_attachments/static/description/assets/screenshots/size_164_en.png b/size_restriction_for_attachments/static/description/assets/screenshots/size_164_en.png new file mode 100644 index 000000000..1ad7bce25 Binary files /dev/null and b/size_restriction_for_attachments/static/description/assets/screenshots/size_164_en.png differ diff --git a/size_restriction_for_attachments/static/description/banner.jpg b/size_restriction_for_attachments/static/description/banner.jpg new file mode 100644 index 000000000..89b592097 Binary files /dev/null and b/size_restriction_for_attachments/static/description/banner.jpg 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..6344a9839 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..0a6af2691 --- /dev/null +++ b/size_restriction_for_attachments/static/description/index.html @@ -0,0 +1,631 @@ +
+ +
+ +
+
+ Community +
+
+ Enterprise +
+
+
+ +
+
+
+ +

+ Size Restriction For Attachments

+

+ Shows an error message if attachment greater than users + maximum attachment size.

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

+ Explore This + Module

+
+ + + + +
+
+ +
+

+ Overview +

+
+
+
+ This App will help to restrict the attachment size. If the size of + attachment is greater than + the maximum size assigned for that person then error message will be + shown. + +
+
+ + + +
+
+ +
+

+ Features +

+
+
+
+ + Can set restriction to the size of attachment file. +
+
+ + + + +
+
+ +
+

+ Screenshots +

+
+
+
+
+

+ Enable Set Restriction. +

+

+ Go to users and under access rights if we want to set + restriction for a user then enable set restriction.

+ +
+ +
+

+ 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..cd191520e --- /dev/null +++ b/size_restriction_for_attachments/views/res_users_views.xml @@ -0,0 +1,16 @@ + + + + res.users.view.form.inherit.size.restriction.for.attachments + res.users + + + + + + +