diff --git a/ir_attach_image_compressor/README.rst b/ir_attach_image_compressor/README.rst new file mode 100644 index 000000000..b46babab9 --- /dev/null +++ b/ir_attach_image_compressor/README.rst @@ -0,0 +1,46 @@ +.. image:: https://img.shields.io/badge/licence-LGPL--3-blue.svg + :target: https://www.gnu.org/licenses/lgpl-3.0-standalone.html + :alt: License: LGPL-3 + +Image Attachment Converter +========================== +* A Module for compressing Image attachments to reduce storage usage. + +License +------- +General Public License, Version 3 (LGPL v3). +(https://www.odoo.com/documentation/user/16.0/legal/licenses/licenses.html) + +Installation +============ + - www.odoo.com/documentation/16.0/setup/install.html + - Install our custom addon + +Company +------- +* 'Cybrosys Techno Solutions `__ + +Credits +------- +* Developer: +(v16) Naveen Krishna T @ Cybrosys + + +Contacts +-------- +* Mail Contact : odoo@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 +========== +This module is maintained by Cybrosys Technologies. + +For support and more information, please visit https://www.cybrosys.com + +Further information +=================== +HTML Description: ``__ + diff --git a/ir_attach_image_compressor/__init__.py b/ir_attach_image_compressor/__init__.py new file mode 100644 index 000000000..6eeac8379 --- /dev/null +++ b/ir_attach_image_compressor/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# 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/ir_attach_image_compressor/__manifest__.py b/ir_attach_image_compressor/__manifest__.py new file mode 100644 index 000000000..802e20667 --- /dev/null +++ b/ir_attach_image_compressor/__manifest__.py @@ -0,0 +1,47 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# 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': 'Image Attachment Converter', + 'version': '16.0.1.0.0', + 'summary': 'A Module for image attachments format changes and compression', + 'description': 'A Module for compressing Image attachments to reduce storage usage.', + 'category': 'Extra Tools', + 'author': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'depends': [ + 'base' + ], + 'data': [ + 'data/cron.xml', + 'data/data.xml', + 'security/ir.model.access.csv', + 'views/image_compression_rule_views.xml', + 'views/file_format_views.xml', + ], + 'images': ['static/description/banner.png'], + 'license': 'LGPL-3', + 'installable': True, + 'application': False, + 'auto_install': False, +} diff --git a/ir_attach_image_compressor/data/cron.xml b/ir_attach_image_compressor/data/cron.xml new file mode 100644 index 000000000..1d2a52f8c --- /dev/null +++ b/ir_attach_image_compressor/data/cron.xml @@ -0,0 +1,16 @@ + + + + + + Image: Attachment auto Compression + + code + model._schedule_auto_compress() + 1 + days + -1 + True + + + diff --git a/ir_attach_image_compressor/data/data.xml b/ir_attach_image_compressor/data/data.xml new file mode 100644 index 000000000..ad2eb6d83 --- /dev/null +++ b/ir_attach_image_compressor/data/data.xml @@ -0,0 +1,103 @@ + + + + avif + image/avif + + + bmp + image/bmp + + + bmp + image/x-ms-bmp + + + gif + image/gif + + + ief + image/ief + + + jpg + image/jpg + + + jpe + image/jpe + + + jpeg + image/jpeg + + + heic + image/heic + + + heif + image/heif + + + png + image/png + + + svg + image/svg+xml + + + tiff + image/tiff + + + tif + image/tif + + + ico + image/vnd.microsoft.icon + + + ico + image/x-icon + + + ras + image/x-cmu-raster + + + pnm + image/x-portable-anymap + + + pbm + image/x-portable-bitmap + + + pgm + image/x-portable-graymap + + + ppm + image/x-portable-pixmap + + + rgb + image/x-rgb + + + xbm + image/x-xbitmap + + + xpm + image/x-xpixmap + + + xwd + image/x-xwindowdump + + diff --git a/ir_attach_image_compressor/doc/RELEASE_NOTES.md b/ir_attach_image_compressor/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..d5d02617d --- /dev/null +++ b/ir_attach_image_compressor/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 29.04.2025 +#### Version 16.0.1.0.0 +#### ADD +- Initial commit for Image Attachment Converter diff --git a/ir_attach_image_compressor/models/__init__.py b/ir_attach_image_compressor/models/__init__.py new file mode 100644 index 000000000..e2dd38fe5 --- /dev/null +++ b/ir_attach_image_compressor/models/__init__.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# 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 file_formats +from . import ir_attachment +from . import image_compression_rule diff --git a/ir_attach_image_compressor/models/file_formats.py b/ir_attach_image_compressor/models/file_formats.py new file mode 100644 index 000000000..9a02e14f1 --- /dev/null +++ b/ir_attach_image_compressor/models/file_formats.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# 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, fields + + +class FileFormatSource(models.Model): + """ + A class for storing Source file formats of the attachments which used for compression rules. + """ + _name = 'source.file.format' + _description = 'Source File Formats' + + name = fields.Char(string="Format Extension", required=True) + mime_type = fields.Char(string="Mime Type", help="Mime types are used to " + "identify the file type. " + "The " + "format is something like " + "image/png", required=True, + copy=False) + + _sql_constraints = [ + ('unique_mime_type', 'unique (mime_type)', 'Mime type already exists!') + ] + + def name_get(self): + result = [] + for rec in self: + result.append((rec.id, rec.name + " (" + rec.mime_type + ")")) + return result diff --git a/ir_attach_image_compressor/models/image_compression_rule.py b/ir_attach_image_compressor/models/image_compression_rule.py new file mode 100644 index 000000000..17983dd63 --- /dev/null +++ b/ir_attach_image_compressor/models/image_compression_rule.py @@ -0,0 +1,144 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# 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 . +# +############################################################################# +import base64 +import os +from datetime import datetime, timedelta +from odoo import _, api, fields, models +from odoo.exceptions import ValidationError +from odoo.osv import expression +from odoo.tools import ImageProcess + +mimetypes_global = ['image/avif', + 'image/bmp', + 'image/gif', + 'image/ief', + 'image/jpeg', + 'image/jpeg', + 'image/jpeg', + 'image/heic', + 'image/heif', + 'image/png', + 'image/svg+xml', + 'image/tiff', + 'image/tiff', + 'image/vnd.microsoft.icon', + 'image/x-cmu-raster', + 'image/x-portable-anymap', + 'image/x-portable-bitmap', + 'image/x-portable-graymap', + 'image/x-portable-pixmap', + 'image/x-rgb', + 'image/x-xbitmap', + 'image/x-xpixmap', + 'image/x-ms-bmp', + 'image/x-xwindowdump'] + + +class ImageCompressor(models.Model): + """ + A class for storing the Rules records used for attachments compression + """ + _name = "ir.image.compressor.rule" + _description = "ir_Image_Compressor_Rule" + + name = fields.Char(string="Name", required=True) + af_model_ids = fields.Many2many("ir.model", string="Model(s)", required=True, help="Models where this rule applied") + source_format_ids = fields.Many2many("source.file.format", + string="Source Format", help="The file formats of attachments to which this rule is applied.") + quality = fields.Integer(string="Quality", help="""Quality level of the compressed image in percentage. If left empty, 95% will be used as default value. + - for JPEG: 1 is worse, 95 is best. Values above 95 should be + avoided. Falsy values will fallback to 95, but only if the image + was changed, otherwise the original image is returned. + - for PNG: set falsy to prevent conversion to a WEB palette. + - for other formats: no effect.""",) + destination_format = fields.Selection([('JPEG', '.jpeg'), + ('PNG', '.png'), + ('GIF', '.gif'), + ('ICO', '.ico')], + string="Destination format", + default='JPEG', required=True, help="The format to which the source files are converted or compressed.") + active = fields.Boolean(string="Active", help="Whether the rule is active or inactive.") + minimum_size = fields.Integer(string="Minimum Size(KB)", help="The minimum size of the attachment file in KB for the rule to be applied.") + older_days = fields.Integer(string="Older than(days)", help="The age of the attachment in days for this rule to be applied.") + allow_recompress = fields.Boolean("Recompress", default=False, help="Whether to compress already compressed attachments or not.") + @api.constrains('account_type', 'reconcile') + def _check_reconcile(self): + for rule in self: + if rule.quality and not (1 <= rule.quality <= 95) and rule.destination_format == 'jpeg': + raise ValidationError( + _('The quality value should be between 1 and 95.')) + + + def _get_attachments_domain(self, model_names): + """ Method to generate dynamic domain based on the given rules """ + all_mime_types = \ + list(set(mimetypes_global).union( + set(self.env['source.file.format'].sudo(). + search([]).mapped('mime_type')))) + if not self.source_format_ids: + domains = [('mimetype', 'in', all_mime_types)] + else: + domains = [ + ('mimetype', 'in', self.source_format_ids.mapped('mime_type'))] + if model_names: + domains = expression.AND( + [domains, [('res_model', 'in', model_names)]]) + if self.minimum_size: + domains = expression.AND( + [domains, [('file_size', '>', self.minimum_size * 1024)]]) + if self.older_days: + old_day = datetime.now() + timedelta(days=-self.older_days) + domains = expression.AND( + [domains, [('create_date', '<', old_day)]]) + if not self.allow_recompress: + domains = expression.AND([domains, [('is_compressed', '=', False)]]) + return domains + + def _schedule_auto_compress(self): + """ The scheduled action method for compressing or converting the attachment files. + All converted files will replace the source files in the attachment to save storage space. """ + i_c_rules = self.env['ir.image.compressor.rule']. \ + search([('active', '=', True)]) + for record in i_c_rules: + res_models = record.af_model_ids + model_names = res_models.mapped('model') + attach_ments = self.env['ir.attachment'].search( + record._get_attachments_domain(model_names)) + for rec in attach_ments: + if rec.raw: + img = ImageProcess(rec.raw, + verify_resolution=False) + else: + img = ImageProcess(base64.b64decode(rec.datas), + verify_resolution=False) + quality = int(record.quality if record.quality else 95) + if record.destination_format: + image_data = img.image_quality(quality=quality, output_format=record.destination_format) + else: + image_data = img.image_quality(quality=quality) + if rec.raw: + rec.raw = image_data + else: + rec.datas = base64.b64encode(image_data) + if record.destination_format: + base = os.path.splitext(rec.name)[0] + rec.name = base + dict(record._fields['destination_format'].selection).get(record.destination_format) diff --git a/ir_attach_image_compressor/models/ir_attachment.py b/ir_attach_image_compressor/models/ir_attachment.py new file mode 100644 index 000000000..f60b195d9 --- /dev/null +++ b/ir_attach_image_compressor/models/ir_attachment.py @@ -0,0 +1,29 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# 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 fields, models + + +class IrAttachment(models.Model): + _inherit = 'ir.attachment' + + is_compressed = fields.Boolean(stirng="Converted", + help="if this attachment is converted or compressed.", default=False) \ No newline at end of file diff --git a/ir_attach_image_compressor/security/ir.model.access.csv b/ir_attach_image_compressor/security/ir.model.access.csv new file mode 100644 index 000000000..2a7b6b7bb --- /dev/null +++ b/ir_attach_image_compressor/security/ir.model.access.csv @@ -0,0 +1,6 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_compress_rule_user,access_compress_rule_base_user,model_ir_image_compressor_rule,,1,1,1,1 +access_compress_format_user,access_compress_format_base_user,model_source_file_format,,1,1,1,1 + + + diff --git a/ir_attach_image_compressor/static/description/assets/icons/check.png b/ir_attach_image_compressor/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/ir_attach_image_compressor/static/description/assets/icons/check.png differ diff --git a/ir_attach_image_compressor/static/description/assets/icons/chevron.png b/ir_attach_image_compressor/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/ir_attach_image_compressor/static/description/assets/icons/chevron.png differ diff --git a/ir_attach_image_compressor/static/description/assets/icons/cogs.png b/ir_attach_image_compressor/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/ir_attach_image_compressor/static/description/assets/icons/cogs.png differ diff --git a/ir_attach_image_compressor/static/description/assets/icons/consultation.png b/ir_attach_image_compressor/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/ir_attach_image_compressor/static/description/assets/icons/consultation.png differ diff --git a/ir_attach_image_compressor/static/description/assets/icons/ecom-black.png b/ir_attach_image_compressor/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/ir_attach_image_compressor/static/description/assets/icons/ecom-black.png differ diff --git a/ir_attach_image_compressor/static/description/assets/icons/education-black.png b/ir_attach_image_compressor/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/ir_attach_image_compressor/static/description/assets/icons/education-black.png differ diff --git a/ir_attach_image_compressor/static/description/assets/icons/hotel-black.png b/ir_attach_image_compressor/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/ir_attach_image_compressor/static/description/assets/icons/hotel-black.png differ diff --git a/ir_attach_image_compressor/static/description/assets/icons/license.png b/ir_attach_image_compressor/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/ir_attach_image_compressor/static/description/assets/icons/license.png differ diff --git a/ir_attach_image_compressor/static/description/assets/icons/lifebuoy.png b/ir_attach_image_compressor/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/ir_attach_image_compressor/static/description/assets/icons/lifebuoy.png differ diff --git a/ir_attach_image_compressor/static/description/assets/icons/manufacturing-black.png b/ir_attach_image_compressor/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/ir_attach_image_compressor/static/description/assets/icons/manufacturing-black.png differ diff --git a/ir_attach_image_compressor/static/description/assets/icons/pos-black.png b/ir_attach_image_compressor/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/ir_attach_image_compressor/static/description/assets/icons/pos-black.png differ diff --git a/ir_attach_image_compressor/static/description/assets/icons/puzzle.png b/ir_attach_image_compressor/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/ir_attach_image_compressor/static/description/assets/icons/puzzle.png differ diff --git a/ir_attach_image_compressor/static/description/assets/icons/restaurant-black.png b/ir_attach_image_compressor/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/ir_attach_image_compressor/static/description/assets/icons/restaurant-black.png differ diff --git a/ir_attach_image_compressor/static/description/assets/icons/service-black.png b/ir_attach_image_compressor/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/ir_attach_image_compressor/static/description/assets/icons/service-black.png differ diff --git a/ir_attach_image_compressor/static/description/assets/icons/trading-black.png b/ir_attach_image_compressor/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/ir_attach_image_compressor/static/description/assets/icons/trading-black.png differ diff --git a/ir_attach_image_compressor/static/description/assets/icons/training.png b/ir_attach_image_compressor/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/ir_attach_image_compressor/static/description/assets/icons/training.png differ diff --git a/ir_attach_image_compressor/static/description/assets/icons/update.png b/ir_attach_image_compressor/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/ir_attach_image_compressor/static/description/assets/icons/update.png differ diff --git a/ir_attach_image_compressor/static/description/assets/icons/user.png b/ir_attach_image_compressor/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/ir_attach_image_compressor/static/description/assets/icons/user.png differ diff --git a/ir_attach_image_compressor/static/description/assets/icons/wrench.png b/ir_attach_image_compressor/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/ir_attach_image_compressor/static/description/assets/icons/wrench.png differ diff --git a/ir_attach_image_compressor/static/description/assets/misc/categories.png b/ir_attach_image_compressor/static/description/assets/misc/categories.png new file mode 100644 index 000000000..bedf1e0b1 Binary files /dev/null and b/ir_attach_image_compressor/static/description/assets/misc/categories.png differ diff --git a/ir_attach_image_compressor/static/description/assets/misc/check-box.png b/ir_attach_image_compressor/static/description/assets/misc/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/ir_attach_image_compressor/static/description/assets/misc/check-box.png differ diff --git a/ir_attach_image_compressor/static/description/assets/misc/compass.png b/ir_attach_image_compressor/static/description/assets/misc/compass.png new file mode 100644 index 000000000..d5fed8faa Binary files /dev/null and b/ir_attach_image_compressor/static/description/assets/misc/compass.png differ diff --git a/ir_attach_image_compressor/static/description/assets/misc/corporate.png b/ir_attach_image_compressor/static/description/assets/misc/corporate.png new file mode 100644 index 000000000..2eb13edbf Binary files /dev/null and b/ir_attach_image_compressor/static/description/assets/misc/corporate.png differ diff --git a/ir_attach_image_compressor/static/description/assets/misc/customer-support.png b/ir_attach_image_compressor/static/description/assets/misc/customer-support.png new file mode 100644 index 000000000..79efc72ed Binary files /dev/null and b/ir_attach_image_compressor/static/description/assets/misc/customer-support.png differ diff --git a/ir_attach_image_compressor/static/description/assets/misc/cybrosys-logo.png b/ir_attach_image_compressor/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/ir_attach_image_compressor/static/description/assets/misc/cybrosys-logo.png differ diff --git a/ir_attach_image_compressor/static/description/assets/misc/features.png b/ir_attach_image_compressor/static/description/assets/misc/features.png new file mode 100644 index 000000000..b41769f77 Binary files /dev/null and b/ir_attach_image_compressor/static/description/assets/misc/features.png differ diff --git a/ir_attach_image_compressor/static/description/assets/misc/logo.png b/ir_attach_image_compressor/static/description/assets/misc/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/ir_attach_image_compressor/static/description/assets/misc/logo.png differ diff --git a/ir_attach_image_compressor/static/description/assets/misc/pictures.png b/ir_attach_image_compressor/static/description/assets/misc/pictures.png new file mode 100644 index 000000000..56d255fe9 Binary files /dev/null and b/ir_attach_image_compressor/static/description/assets/misc/pictures.png differ diff --git a/ir_attach_image_compressor/static/description/assets/misc/pie-chart.png b/ir_attach_image_compressor/static/description/assets/misc/pie-chart.png new file mode 100644 index 000000000..426e05244 Binary files /dev/null and b/ir_attach_image_compressor/static/description/assets/misc/pie-chart.png differ diff --git a/ir_attach_image_compressor/static/description/assets/misc/right-arrow.png b/ir_attach_image_compressor/static/description/assets/misc/right-arrow.png new file mode 100644 index 000000000..730984a06 Binary files /dev/null and b/ir_attach_image_compressor/static/description/assets/misc/right-arrow.png differ diff --git a/ir_attach_image_compressor/static/description/assets/misc/star.png b/ir_attach_image_compressor/static/description/assets/misc/star.png new file mode 100644 index 000000000..2eb9ab29f Binary files /dev/null and b/ir_attach_image_compressor/static/description/assets/misc/star.png differ diff --git a/ir_attach_image_compressor/static/description/assets/misc/support.png b/ir_attach_image_compressor/static/description/assets/misc/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/ir_attach_image_compressor/static/description/assets/misc/support.png differ diff --git a/ir_attach_image_compressor/static/description/assets/misc/whatsapp.png b/ir_attach_image_compressor/static/description/assets/misc/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/ir_attach_image_compressor/static/description/assets/misc/whatsapp.png differ diff --git a/ir_attach_image_compressor/static/description/assets/modules/4.png b/ir_attach_image_compressor/static/description/assets/modules/4.png new file mode 100644 index 000000000..f3c986fc1 Binary files /dev/null and b/ir_attach_image_compressor/static/description/assets/modules/4.png differ diff --git a/ir_attach_image_compressor/static/description/assets/modules/5.gif b/ir_attach_image_compressor/static/description/assets/modules/5.gif new file mode 100644 index 000000000..8f40aab85 Binary files /dev/null and b/ir_attach_image_compressor/static/description/assets/modules/5.gif differ diff --git a/ir_attach_image_compressor/static/description/assets/modules/barcode.png b/ir_attach_image_compressor/static/description/assets/modules/barcode.png new file mode 100644 index 000000000..2c8fbb83f Binary files /dev/null and b/ir_attach_image_compressor/static/description/assets/modules/barcode.png differ diff --git a/ir_attach_image_compressor/static/description/assets/modules/fatoorah.png b/ir_attach_image_compressor/static/description/assets/modules/fatoorah.png new file mode 100644 index 000000000..991fc77ec Binary files /dev/null and b/ir_attach_image_compressor/static/description/assets/modules/fatoorah.png differ diff --git a/ir_attach_image_compressor/static/description/assets/modules/integration_biometric.png b/ir_attach_image_compressor/static/description/assets/modules/integration_biometric.png new file mode 100644 index 000000000..ed11bd818 Binary files /dev/null and b/ir_attach_image_compressor/static/description/assets/modules/integration_biometric.png differ diff --git a/ir_attach_image_compressor/static/description/assets/modules/product_brand.png b/ir_attach_image_compressor/static/description/assets/modules/product_brand.png new file mode 100644 index 000000000..99298bf4b Binary files /dev/null and b/ir_attach_image_compressor/static/description/assets/modules/product_brand.png differ diff --git a/ir_attach_image_compressor/static/description/assets/modules/website_cart.png b/ir_attach_image_compressor/static/description/assets/modules/website_cart.png new file mode 100644 index 000000000..cba3c2461 Binary files /dev/null and b/ir_attach_image_compressor/static/description/assets/modules/website_cart.png differ diff --git a/ir_attach_image_compressor/static/description/assets/screenshots/hero.gif b/ir_attach_image_compressor/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..476892aa3 Binary files /dev/null and b/ir_attach_image_compressor/static/description/assets/screenshots/hero.gif differ diff --git a/ir_attach_image_compressor/static/description/assets/screenshots/image-1.png b/ir_attach_image_compressor/static/description/assets/screenshots/image-1.png new file mode 100644 index 000000000..5e64a4fc3 Binary files /dev/null and b/ir_attach_image_compressor/static/description/assets/screenshots/image-1.png differ diff --git a/ir_attach_image_compressor/static/description/assets/screenshots/image-2.png b/ir_attach_image_compressor/static/description/assets/screenshots/image-2.png new file mode 100644 index 000000000..e6bbd8862 Binary files /dev/null and b/ir_attach_image_compressor/static/description/assets/screenshots/image-2.png differ diff --git a/ir_attach_image_compressor/static/description/assets/screenshots/image-3.png b/ir_attach_image_compressor/static/description/assets/screenshots/image-3.png new file mode 100644 index 000000000..2f275d98f Binary files /dev/null and b/ir_attach_image_compressor/static/description/assets/screenshots/image-3.png differ diff --git a/ir_attach_image_compressor/static/description/assets/screenshots/image-4.png b/ir_attach_image_compressor/static/description/assets/screenshots/image-4.png new file mode 100644 index 000000000..35e2e2bc3 Binary files /dev/null and b/ir_attach_image_compressor/static/description/assets/screenshots/image-4.png differ diff --git a/ir_attach_image_compressor/static/description/assets/screenshots/image-5.png b/ir_attach_image_compressor/static/description/assets/screenshots/image-5.png new file mode 100644 index 000000000..81f0b1c33 Binary files /dev/null and b/ir_attach_image_compressor/static/description/assets/screenshots/image-5.png differ diff --git a/ir_attach_image_compressor/static/description/assets/screenshots/image-6.png b/ir_attach_image_compressor/static/description/assets/screenshots/image-6.png new file mode 100644 index 000000000..daff4bd7d Binary files /dev/null and b/ir_attach_image_compressor/static/description/assets/screenshots/image-6.png differ diff --git a/ir_attach_image_compressor/static/description/assets/screenshots/image-7.png b/ir_attach_image_compressor/static/description/assets/screenshots/image-7.png new file mode 100644 index 000000000..7afecdd1d Binary files /dev/null and b/ir_attach_image_compressor/static/description/assets/screenshots/image-7.png differ diff --git a/ir_attach_image_compressor/static/description/assets/screenshots/image-8.png b/ir_attach_image_compressor/static/description/assets/screenshots/image-8.png new file mode 100644 index 000000000..74242154b Binary files /dev/null and b/ir_attach_image_compressor/static/description/assets/screenshots/image-8.png differ diff --git a/ir_attach_image_compressor/static/description/banner.jpg b/ir_attach_image_compressor/static/description/banner.jpg new file mode 100644 index 000000000..a3314d713 Binary files /dev/null and b/ir_attach_image_compressor/static/description/banner.jpg differ diff --git a/ir_attach_image_compressor/static/description/icon.png b/ir_attach_image_compressor/static/description/icon.png new file mode 100644 index 000000000..942e6196a Binary files /dev/null and b/ir_attach_image_compressor/static/description/icon.png differ diff --git a/ir_attach_image_compressor/static/description/index.html b/ir_attach_image_compressor/static/description/index.html new file mode 100644 index 000000000..9651c05c5 --- /dev/null +++ b/ir_attach_image_compressor/static/description/index.html @@ -0,0 +1,606 @@ +
+ +
+ +
+
+ Community +
+
+ Enterprise +
+ +
+
+ + + + +
+
+
+ +

+ Image Attachment Converter

+

Module for compressing Image attachments to reduce storage usage.

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

Explore This + Module

+
+ + + + +
+
+ +
+

Overview +

+
+
+
+ This module helps to reduce the size of your image attachments automatically on regular interval of times + based on the configured rules. + The compressed images can be stored as JPEG, PNG, GIF or ICO file. + User can enable and configure required compression rules based on the requirements. + Using Image Attachment Converter module user can re-generate and store images in + different formats with reduced size and configured quality. +
+
+
+ + + +
+
+ +
+

Features +

+
+
+
+
+ + Compress images based on a set of rules +
+ +
+ + + Different Destination formats available for compression of images such as JPEG, PNG, GIF and ICO. + +
+ +
+
+
+ + Flexible rules for compression: +
+ +
    +
  • By model where images are uploaded
  • +
  • By mimetype; a regular expression that allows to filter what type of images to compress
  • +
  • By size; it allows to compress images having a bigger size than the configured size
  • +
  • Compress attachments older than specific days
  • +
+
+
+
+ + + +
+
+ +
+

Screenshots +

+
+
+
+ +
+

Image Compression Rules Menu

+

+ Go to Setting --> Technical --> image compression rules to configure Rules

+ +
+ +
+

Crate New Compression Rule

+

+ Enter the model name. specify source file types,destination format, minimum size etc. based on your needs. +

+ +
+ +
+

Add New Source Formats

+

+ You can add new source file formats which can be used for attachment filtering. + Go to Setting --> Technical --> image formats to configure source formats with their mime types. +

+ + +
+ +
+

Scheduled action for Image compression

+

There is a preconfigured scheduled activity for running the compression methods based on rules periodically. + You can configure it for your needs.

+ + +
+ +
+

Before and After

+

After the successful run of the scheduled action, the attached file will be converted.

+ + +
+
+
+ + + +
+
+

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

+
+
+
+
+
+
+
+ +
+
+
+ \ No newline at end of file diff --git a/ir_attach_image_compressor/views/file_format_views.xml b/ir_attach_image_compressor/views/file_format_views.xml new file mode 100644 index 000000000..0bbdd2913 --- /dev/null +++ b/ir_attach_image_compressor/views/file_format_views.xml @@ -0,0 +1,36 @@ + + + + ir.image.compression.format.tree + source.file.format + + + + + + + + + + ir.image.compression.format.form + source.file.format + +
+ + + + +
+
+
+ + + Image Formats + source.file.format + tree,form + + + +
\ No newline at end of file diff --git a/ir_attach_image_compressor/views/image_compression_rule_views.xml b/ir_attach_image_compressor/views/image_compression_rule_views.xml new file mode 100644 index 000000000..1f69d73c4 --- /dev/null +++ b/ir_attach_image_compressor/views/image_compression_rule_views.xml @@ -0,0 +1,61 @@ + + + + + ir.image.compression.rule.tree + ir.image.compressor.rule + + + + + + + + + + + + ir.image.compression.rule.form + ir.image.compressor.rule + +
+ +
+
+ + + + + + + + + + + + +
+
+
+
+ + + Rules + ir.image.compressor.rule + tree,form + +

+ Click create to define a new Rules. +

+
+
+ + + +
\ No newline at end of file