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..e3a997b58 --- /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': '14.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', + 'images': ['static/description/banner.jpg'], + 'website': 'https://www.cybrosys.com', + 'depends': ['base', 'web'], + 'data': { + 'views/res_users.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..ae553bbbb --- /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 main diff --git a/size_restriction_for_attachments/controllers/main.py b/size_restriction_for_attachments/controllers/main.py new file mode 100644 index 000000000..14e7b349e --- /dev/null +++ b/size_restriction_for_attachments/controllers/main.py @@ -0,0 +1,93 @@ +# -*- 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 base64 +import logging +import json +import unicodedata + +from odoo.exceptions import AccessError +from odoo.http import request +from odoo import _, http +from odoo.addons.web.controllers.main import Binary + +_logger = logging.getLogger(__name__) + + +def clean(name): return name.replace('\x3c', '') + + +class Binary(Binary): + """This class is called to override upload_attachment().""" + @http.route('/web/binary/upload_attachment', type='http', auth="user") + def upload_attachment(self, model, id, ufile, callback=None): + """ + Override the function upload_attachment() 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. + """ + files = request.httprequest.files.getlist('ufile') + Model = request.env['ir.attachment'] + out = """""" + args = [] + max_size = request.env.user.max_size * 1024 * 1024 + for ufile in files: + filename = ufile.filename + if request.httprequest.user_agent.browser == 'safari': + # Safari sends NFD UTF-8 + # (where é is composed by 'e' and [accent]) + # we need to send it the same stuff, otherwise it'll fail + filename = unicodedata.normalize('NFD', ufile.filename) + try: + attachment = Model.create({ + 'name': filename, + 'datas': base64.encodebytes(ufile.read()), + 'res_model': model, + 'res_id': int(id) + }) + attachment._post_add_create() + except AccessError: + args.append({'error': _( + "You are not allowed to upload an attachment here.")}) + except Exception: + args.append({'error': _("Something horrible happened")}) + _logger.exception("Fail to upload attachment %s" + % ufile.filename) + else: + args.append({ + 'filename': clean(filename), + 'mimetype': ufile.content_type, + 'id': attachment.id, + 'size': attachment.file_size + }) + for dict in args: + if dict.get('size'): + if dict.get('size') > max_size: + args.append({'error': _( + 'Attachment size cannot exceed %s MB.') + % request.env.user.max_size}) + attachment.unlink() + return out % (json.dumps(clean(callback)), json.dumps( + args)) if callback else json.dumps(args) 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..00495f849 --- /dev/null +++ b/size_restriction_for_attachments/doc/RELEASE_NOTES.md @@ -0,0 +1,7 @@ +## Module + +#### 19.04.2023 +#### Version 14.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..3bce3ce81 --- /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 ResUSer(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.png b/size_restriction_for_attachments/static/description/assets/modules/1.png new file mode 100644 index 000000000..4e4ea0e51 Binary files /dev/null and b/size_restriction_for_attachments/static/description/assets/modules/1.png 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..844b870eb 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..0f0d5d3c2 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..713d6dee5 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..6d11dfe59 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.gif b/size_restriction_for_attachments/static/description/assets/modules/6.gif new file mode 100644 index 000000000..474c6e6b9 Binary files /dev/null and b/size_restriction_for_attachments/static/description/assets/modules/6.gif 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..add58c240 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/size141_en.png b/size_restriction_for_attachments/static/description/assets/screenshots/size141_en.png new file mode 100644 index 000000000..0ee4c409d Binary files /dev/null and b/size_restriction_for_attachments/static/description/assets/screenshots/size141_en.png differ diff --git a/size_restriction_for_attachments/static/description/assets/screenshots/size142_en.png b/size_restriction_for_attachments/static/description/assets/screenshots/size142_en.png new file mode 100644 index 000000000..8a9b2fb3c Binary files /dev/null and b/size_restriction_for_attachments/static/description/assets/screenshots/size142_en.png differ diff --git a/size_restriction_for_attachments/static/description/assets/screenshots/size143_en.png b/size_restriction_for_attachments/static/description/assets/screenshots/size143_en.png new file mode 100644 index 000000000..b12b1c2ce Binary files /dev/null and b/size_restriction_for_attachments/static/description/assets/screenshots/size143_en.png differ diff --git a/size_restriction_for_attachments/static/description/assets/screenshots/size144_en.png b/size_restriction_for_attachments/static/description/assets/screenshots/size144_en.png new file mode 100644 index 000000000..055af2b7c Binary files /dev/null and b/size_restriction_for_attachments/static/description/assets/screenshots/size144_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..41e3b981a 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..442e65cdb 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..8808a8934 --- /dev/null +++ b/size_restriction_for_attachments/static/description/index.html @@ -0,0 +1,534 @@ +
+ +
+ +
+
+ Community +
+
+ Enterprise +
+
+
+ +
+
+
+ +

+ Size Restriction For Attachments

+

Shows a warning 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.xml b/size_restriction_for_attachments/views/res_users.xml new file mode 100644 index 000000000..49641cc68 --- /dev/null +++ b/size_restriction_for_attachments/views/res_users.xml @@ -0,0 +1,17 @@ + + + + + res.users.view.form.inherit.size.restriction.for.attachments + res.users + + + + + + + \ No newline at end of file