diff --git a/chatter_attachments_manager/README.rst b/chatter_attachments_manager/README.rst new file mode 100644 index 000000000..fcdc4d6fb --- /dev/null +++ b/chatter_attachments_manager/README.rst @@ -0,0 +1,49 @@ +.. image:: https://img.shields.io/badge/license-AGPL--3-blue.svg + :target: https://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +Chatter Attachment Manager +========================== +This module helps to manage attachments in chatter and in discuss + +Configuration +============= +* No Additional configuration is needed. + +License +------- +Gnu Affero General Public License, Version 3 (AGPL v3). +(https://www.gnu.org/licenses/agpl-3.0-standalone.html) + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +* Developer: (V16) Anagha S, + (V17) Sabeel B, + (V18) Nikhil M +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/chatter_attachments_manager/__init__.py b/chatter_attachments_manager/__init__.py new file mode 100644 index 000000000..c373cde8d --- /dev/null +++ b/chatter_attachments_manager/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Nikhil M (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +################################################################################ +from . import controllers +from . import models diff --git a/chatter_attachments_manager/__manifest__.py b/chatter_attachments_manager/__manifest__.py new file mode 100644 index 000000000..320583db2 --- /dev/null +++ b/chatter_attachments_manager/__manifest__.py @@ -0,0 +1,61 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Nikhil M (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': 'Chatter Attachment Manager', + 'version': '18.0.1.0.0', + 'category': 'Discuss, Document Management', + 'summary': 'This module help to manage attachments', + 'description': """This module helps to enhance the attachment management + capabilities within Odoo.Can easily edit,read, save, preview your documents + inside odoo. Module works in discuss, chat and chatter of any record""", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': "https://www.cybrosys.com", + 'depends': ['base', 'mail', 'web'], + 'data': [ + 'security/ir.model.access.csv', + 'views/ir_attachment_views.xml', + 'report/chatter_attachments_manager_report_templates.xml', + ], + 'assets': { + 'web.assets_backend': [ + 'https://cdnjs.cloudflare.com/ajax/libs/fabric.js/3.6.0/fabric.js', + 'https://uicdn.toast.com/tui.code-snippet/v1.5.0/tui-code-snippet.min.js', + 'https://uicdn.toast.com/tui-color-picker/v2.2.6/tui-color-picker.js', + 'https://cdnjs.cloudflare.com/ajax/libs/FileSaver.js/1.3.3/FileSaver.min.js', + 'https://uicdn.toast.com/tui-image-editor/latest/tui-image-editor.js', + 'https://uicdn.toast.com/tui-image-editor/latest/tui-image-editor.css', + 'chatter_attachments_manager/static/src/attachment_control_panel/**/*', + 'chatter_attachments_manager/static/src/attachment_image/**/*', + 'chatter_attachments_manager/static/src/css/**/*', + 'chatter_attachments_manager/static/src/registry/**/*', + ], + }, + 'external_dependencies': {'python': ['pandas','qrcode','python-docx']}, + 'images': [ + 'static/description/banner.png', + ], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False +} diff --git a/chatter_attachments_manager/controllers/__init__.py b/chatter_attachments_manager/controllers/__init__.py new file mode 100644 index 000000000..38981c1c3 --- /dev/null +++ b/chatter_attachments_manager/controllers/__init__.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Nikhil M (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 chatter_attachment_manager diff --git a/chatter_attachments_manager/controllers/chatter_attachment_manager.py b/chatter_attachments_manager/controllers/chatter_attachment_manager.py new file mode 100644 index 000000000..8e49ae5f3 --- /dev/null +++ b/chatter_attachments_manager/controllers/chatter_attachment_manager.py @@ -0,0 +1,62 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Nikhil M (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 zipfile +from datetime import datetime + +try: + from BytesIO import BytesIO +except ImportError: + from io import BytesIO + +from odoo import http +from odoo.http import request, content_disposition + +class Binary(http.Controller): + """Attachment downloading binary class.""" + + @http.route('/web/binary/download_document', type='http', + auth='public') + def download_zip(self, **kwargs): + """This method used to download all chatter attachments inside a record + as a zip file.""" + model = kwargs.get('param1', 0) + tab_id = int(kwargs.get('param2', 0)) + attachment_ids = request.env['ir.attachment'].search( + [('res_model', '=', model), ('res_id', '=', tab_id)]) + file_dict = {} + for attachment_id in attachment_ids: + file_store = attachment_id.store_fname + if file_store: + file_name = attachment_id.name + file_path = attachment_id._full_path(file_store) + file_dict[f"{file_store}:{file_name}"] = { + 'path': file_path, 'name': file_name} + zip_filename = datetime.now() + zip_filename = f"{zip_filename}.zip" + bit_io = BytesIO() + with zipfile.ZipFile(bit_io, "w", + zipfile.ZIP_DEFLATED) as zip_file: + for file_info in file_dict.values(): + zip_file.write(file_info["path"], file_info["name"]) + zip_file.close() + return request.make_response(bit_io.getvalue(), headers=[ + ('Content-Type', 'application/zip'), + ('Content-Disposition', http.content_disposition(zip_filename))]) \ No newline at end of file diff --git a/chatter_attachments_manager/doc/RELEASE_NOTES.md b/chatter_attachments_manager/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..1fdeec838 --- /dev/null +++ b/chatter_attachments_manager/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 02.11.2024 +#### Version 18.0.1.0.0 +#### ADD +- Initial commit for Chatter Attachment Manager diff --git a/chatter_attachments_manager/models/__init__.py b/chatter_attachments_manager/models/__init__.py new file mode 100644 index 000000000..58ea536b7 --- /dev/null +++ b/chatter_attachments_manager/models/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Nikhil M (odoo@cybrosys.com) +# +# This program is under the terms of the Odoo Proprietary License v1.0 (OPL-1) +# It is forbidden to publish, distribute, sublicense, or sell copies of the +# Software or modified copies of the Software. +# +# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. +# +############################################################################### +from . import ir_attachment +from . import ir_attachment_tag diff --git a/chatter_attachments_manager/models/ir_attachment.py b/chatter_attachments_manager/models/ir_attachment.py new file mode 100644 index 000000000..808bba1d1 --- /dev/null +++ b/chatter_attachments_manager/models/ir_attachment.py @@ -0,0 +1,112 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Nikhil M (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 io +import base64 +from io import BytesIO + +import pandas as pd +from docx import Document as DocxDocument +import qrcode +from odoo import api, fields, models + + +class IrAttachment(models.Model): + """Extended Attachment Model (Inherited from 'ir.attachment') + + This class represents an extension of the original 'ir.attachment' model in + Odoo. The 'ir.attachment' model is a built-in Odoo model that handles file + attachments to various records, such as documents, emails, or notes. + + In this custom model, we extend the functionality of 'ir.attachment' to add + new fields and custom methods to cater to specific requirements of our + application. + """ + _inherit = 'ir.attachment' + + tags_ids = fields.Many2many(comodel_name='ir.attachment.tag', + string='Tags', help="Tags for attachments") + + @api.model + def decode_content(self, attach_id, doc_type): + """Decode XLSX or DOC File Data. + This method takes a binary file data from an attachment and decodes + the content of the file for XLSX and DOC file formats. + :param int attach_id: id of attachment. + :param str doc_type: the type of the given attachment either 'xlsx' or + 'doc' + :return: return the decoded data.""" + attachment = self.sudo().browse(attach_id) + xlsx_data = base64.b64decode(attachment.datas) + if doc_type in ['xlsx', 'xls', 'docx']: + try: + if doc_type == 'xlsx': + content = pd.read_excel(BytesIO(xlsx_data), + engine='openpyxl', + converters={'A': str}) + elif doc_type == 'xls': + content = pd.read_excel(BytesIO(xlsx_data), engine='xlrd', + converters={'A': str}) + elif doc_type == 'docx': + doc = DocxDocument(io.BytesIO(xlsx_data)) + paragraphs = [p.text for p in doc.paragraphs] + return paragraphs + else: + raise ValueError("Unsupported file format") + html_table = content.to_html(index=False) + return html_table + except TypeError: + return ("

" + "No preview available

") + text = "Cant Preview" + return text + + @api.model + def save_edited_image(self, attachment_id, myImage): + """The image is replaced by image from Toast image editor + :param int attach_id: id of attachment. + :param str image: new image data + :return file containing image + """ + file = self.sudo().browse(attachment_id) + file.write({'datas': myImage.strip('data:image/png;base64')}) + return file + + @api.model + def generate_qr_code(self, attach_id): + """Generate qr code for attachment tha allow anyone to download it.""" + base_url = self.env['ir.config_parameter'].sudo().get_param( + 'web.base.url') + data = {} + download_url = f"mail/channel/1/attachment/{attach_id}?download=true" + if qrcode and base64: + attach_qr = qrcode.QRCode( + version=3, + error_correction=qrcode.constants.ERROR_CORRECT_L, + box_size=4, border=4) + attach_qr.add_data(base_url + download_url) + attach_qr.make(fit=True) + img = attach_qr.make_image() + temp = BytesIO() + img.save(temp, format="PNG") + qr_image = base64.b64encode(temp.getvalue()) + data.update({'image': qr_image, + 'company': self.env.company.name}) + return data diff --git a/chatter_attachments_manager/models/ir_attachment_tag.py b/chatter_attachments_manager/models/ir_attachment_tag.py new file mode 100644 index 000000000..a660ba30f --- /dev/null +++ b/chatter_attachments_manager/models/ir_attachment_tag.py @@ -0,0 +1,39 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Nikhil M (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 random import randint +from odoo import fields, models + + +class AttachmentTag(models.Model): + """Attachment tag model.""" + _name = "ir.attachment.tag" + _description = "Attachment Tag" + + def _get_default_color(self): + """To get default color for tags.""" + return randint(1, 11) + + name = fields.Char(string='Tag Name', required=True, translate=True, + help='Name of tags.') + color = fields.Integer(string='Color', default=_get_default_color, + help="Tag color.") + _sql_constraints = [ + ('name_uniq', 'unique (name)', "Tag name already exists !"),] diff --git a/chatter_attachments_manager/report/chatter_attachments_manager_report_templates.xml b/chatter_attachments_manager/report/chatter_attachments_manager_report_templates.xml new file mode 100644 index 000000000..f6616f3d2 --- /dev/null +++ b/chatter_attachments_manager/report/chatter_attachments_manager_report_templates.xml @@ -0,0 +1,27 @@ + + + + + Attachment QR Code + ir.attachment + qweb-pdf + chatter_attachments_manager.attachment_qr_report_template + chatter_attachments_manager.attachment_qr_report_template + + + + diff --git a/chatter_attachments_manager/security/ir.model.access.csv b/chatter_attachments_manager/security/ir.model.access.csv new file mode 100644 index 000000000..34105b255 --- /dev/null +++ b/chatter_attachments_manager/security/ir.model.access.csv @@ -0,0 +1,2 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_ir_attachment_tag_user,access.ir.attachment.tag.user,model_ir_attachment_tag,base.group_user,1,1,1,1 diff --git a/chatter_attachments_manager/static/description/assets/cybro-icon.png b/chatter_attachments_manager/static/description/assets/cybro-icon.png new file mode 100644 index 000000000..06e73e11d Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/cybro-icon.png differ diff --git a/chatter_attachments_manager/static/description/assets/cybro-odoo.png b/chatter_attachments_manager/static/description/assets/cybro-odoo.png new file mode 100644 index 000000000..ed02e07a4 Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/cybro-odoo.png differ diff --git a/chatter_attachments_manager/static/description/assets/h2.png b/chatter_attachments_manager/static/description/assets/h2.png new file mode 100644 index 000000000..0bfc4707d Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/h2.png differ diff --git a/chatter_attachments_manager/static/description/assets/icons/arrows-repeat.svg b/chatter_attachments_manager/static/description/assets/icons/arrows-repeat.svg new file mode 100644 index 000000000..1d7efabc5 --- /dev/null +++ b/chatter_attachments_manager/static/description/assets/icons/arrows-repeat.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/chatter_attachments_manager/static/description/assets/icons/banner-1.png b/chatter_attachments_manager/static/description/assets/icons/banner-1.png new file mode 100644 index 000000000..c180db172 Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/icons/banner-1.png differ diff --git a/chatter_attachments_manager/static/description/assets/icons/banner-2.svg b/chatter_attachments_manager/static/description/assets/icons/banner-2.svg new file mode 100644 index 000000000..e606d97d9 --- /dev/null +++ b/chatter_attachments_manager/static/description/assets/icons/banner-2.svg @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/chatter_attachments_manager/static/description/assets/icons/banner-bg.png b/chatter_attachments_manager/static/description/assets/icons/banner-bg.png new file mode 100644 index 000000000..a8238d3c0 Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/icons/banner-bg.png differ diff --git a/chatter_attachments_manager/static/description/assets/icons/banner-bg.svg b/chatter_attachments_manager/static/description/assets/icons/banner-bg.svg new file mode 100644 index 000000000..b1378103e --- /dev/null +++ b/chatter_attachments_manager/static/description/assets/icons/banner-bg.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/chatter_attachments_manager/static/description/assets/icons/banner-call.svg b/chatter_attachments_manager/static/description/assets/icons/banner-call.svg new file mode 100644 index 000000000..96c687e81 --- /dev/null +++ b/chatter_attachments_manager/static/description/assets/icons/banner-call.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/chatter_attachments_manager/static/description/assets/icons/banner-mail.svg b/chatter_attachments_manager/static/description/assets/icons/banner-mail.svg new file mode 100644 index 000000000..cbf0d158d --- /dev/null +++ b/chatter_attachments_manager/static/description/assets/icons/banner-mail.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/chatter_attachments_manager/static/description/assets/icons/banner-pattern.svg b/chatter_attachments_manager/static/description/assets/icons/banner-pattern.svg new file mode 100644 index 000000000..9c1c7e101 --- /dev/null +++ b/chatter_attachments_manager/static/description/assets/icons/banner-pattern.svg @@ -0,0 +1,343 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/chatter_attachments_manager/static/description/assets/icons/banner-promo.svg b/chatter_attachments_manager/static/description/assets/icons/banner-promo.svg new file mode 100644 index 000000000..d52791b11 --- /dev/null +++ b/chatter_attachments_manager/static/description/assets/icons/banner-promo.svg @@ -0,0 +1,147 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/chatter_attachments_manager/static/description/assets/icons/brand-pair.svg b/chatter_attachments_manager/static/description/assets/icons/brand-pair.svg new file mode 100644 index 000000000..d8db7fc1e --- /dev/null +++ b/chatter_attachments_manager/static/description/assets/icons/brand-pair.svg @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/chatter_attachments_manager/static/description/assets/icons/capture (1).png b/chatter_attachments_manager/static/description/assets/icons/capture (1).png new file mode 100644 index 000000000..8824deafc Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/icons/capture (1).png differ diff --git a/chatter_attachments_manager/static/description/assets/icons/check.png b/chatter_attachments_manager/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/icons/check.png differ diff --git a/chatter_attachments_manager/static/description/assets/icons/chevron.png b/chatter_attachments_manager/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/icons/chevron.png differ diff --git a/chatter_attachments_manager/static/description/assets/icons/close-icon.svg b/chatter_attachments_manager/static/description/assets/icons/close-icon.svg new file mode 100644 index 000000000..df8cce37a --- /dev/null +++ b/chatter_attachments_manager/static/description/assets/icons/close-icon.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/chatter_attachments_manager/static/description/assets/icons/cogs.png b/chatter_attachments_manager/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/icons/cogs.png differ diff --git a/chatter_attachments_manager/static/description/assets/icons/collabarate-icon.svg b/chatter_attachments_manager/static/description/assets/icons/collabarate-icon.svg new file mode 100644 index 000000000..dd4e10518 --- /dev/null +++ b/chatter_attachments_manager/static/description/assets/icons/collabarate-icon.svg @@ -0,0 +1,3 @@ + + + diff --git a/chatter_attachments_manager/static/description/assets/icons/consultation.png b/chatter_attachments_manager/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/icons/consultation.png differ diff --git a/chatter_attachments_manager/static/description/assets/icons/cybro-logo.png b/chatter_attachments_manager/static/description/assets/icons/cybro-logo.png new file mode 100644 index 000000000..ff4b78220 Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/icons/cybro-logo.png differ diff --git a/chatter_attachments_manager/static/description/assets/icons/down.svg b/chatter_attachments_manager/static/description/assets/icons/down.svg new file mode 100644 index 000000000..f21c36271 --- /dev/null +++ b/chatter_attachments_manager/static/description/assets/icons/down.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/chatter_attachments_manager/static/description/assets/icons/ecom-black.png b/chatter_attachments_manager/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/icons/ecom-black.png differ diff --git a/chatter_attachments_manager/static/description/assets/icons/education-black.png b/chatter_attachments_manager/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/icons/education-black.png differ diff --git a/chatter_attachments_manager/static/description/assets/icons/faq.png b/chatter_attachments_manager/static/description/assets/icons/faq.png new file mode 100644 index 000000000..4250b5b81 Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/icons/faq.png differ diff --git a/chatter_attachments_manager/static/description/assets/icons/feature-icon.svg b/chatter_attachments_manager/static/description/assets/icons/feature-icon.svg new file mode 100644 index 000000000..fa0ea6850 --- /dev/null +++ b/chatter_attachments_manager/static/description/assets/icons/feature-icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/chatter_attachments_manager/static/description/assets/icons/feature.png b/chatter_attachments_manager/static/description/assets/icons/feature.png new file mode 100644 index 000000000..ac7a785c0 Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/icons/feature.png differ diff --git a/chatter_attachments_manager/static/description/assets/icons/gear.svg b/chatter_attachments_manager/static/description/assets/icons/gear.svg new file mode 100644 index 000000000..0cc66b6ea --- /dev/null +++ b/chatter_attachments_manager/static/description/assets/icons/gear.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/chatter_attachments_manager/static/description/assets/icons/hero.gif b/chatter_attachments_manager/static/description/assets/icons/hero.gif new file mode 100644 index 000000000..12cc26d86 Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/icons/hero.gif differ diff --git a/chatter_attachments_manager/static/description/assets/icons/hire-odoo.svg b/chatter_attachments_manager/static/description/assets/icons/hire-odoo.svg new file mode 100644 index 000000000..e1ac089b0 --- /dev/null +++ b/chatter_attachments_manager/static/description/assets/icons/hire-odoo.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/chatter_attachments_manager/static/description/assets/icons/hotel-black.png b/chatter_attachments_manager/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/icons/hotel-black.png differ diff --git a/chatter_attachments_manager/static/description/assets/icons/img.png b/chatter_attachments_manager/static/description/assets/icons/img.png new file mode 100644 index 000000000..70197f477 Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/icons/img.png differ diff --git a/chatter_attachments_manager/static/description/assets/icons/license.png b/chatter_attachments_manager/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/icons/license.png differ diff --git a/chatter_attachments_manager/static/description/assets/icons/life-ring-icon.svg b/chatter_attachments_manager/static/description/assets/icons/life-ring-icon.svg new file mode 100644 index 000000000..3ae6e1d89 --- /dev/null +++ b/chatter_attachments_manager/static/description/assets/icons/life-ring-icon.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/chatter_attachments_manager/static/description/assets/icons/lifebuoy.png b/chatter_attachments_manager/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/icons/lifebuoy.png differ diff --git a/chatter_attachments_manager/static/description/assets/icons/logo.png b/chatter_attachments_manager/static/description/assets/icons/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/icons/logo.png differ diff --git a/chatter_attachments_manager/static/description/assets/icons/mail.svg b/chatter_attachments_manager/static/description/assets/icons/mail.svg new file mode 100644 index 000000000..1eedde695 --- /dev/null +++ b/chatter_attachments_manager/static/description/assets/icons/mail.svg @@ -0,0 +1,3 @@ + + + diff --git a/chatter_attachments_manager/static/description/assets/icons/manufacturing-black.png b/chatter_attachments_manager/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/icons/manufacturing-black.png differ diff --git a/chatter_attachments_manager/static/description/assets/icons/modules/5.gif b/chatter_attachments_manager/static/description/assets/icons/modules/5.gif new file mode 100644 index 000000000..8f40aab85 Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/icons/modules/5.gif differ diff --git a/chatter_attachments_manager/static/description/assets/icons/modules/barcode.png b/chatter_attachments_manager/static/description/assets/icons/modules/barcode.png new file mode 100644 index 000000000..618e3e6c4 Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/icons/modules/barcode.png differ diff --git a/chatter_attachments_manager/static/description/assets/icons/modules/fatoorah.png b/chatter_attachments_manager/static/description/assets/icons/modules/fatoorah.png new file mode 100644 index 000000000..991fc77ec Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/icons/modules/fatoorah.png differ diff --git a/chatter_attachments_manager/static/description/assets/icons/modules/integration_biometric.png b/chatter_attachments_manager/static/description/assets/icons/modules/integration_biometric.png new file mode 100644 index 000000000..ed11bd818 Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/icons/modules/integration_biometric.png differ diff --git a/chatter_attachments_manager/static/description/assets/icons/modules/product_brand.png b/chatter_attachments_manager/static/description/assets/icons/modules/product_brand.png new file mode 100644 index 000000000..1d2238b80 Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/icons/modules/product_brand.png differ diff --git a/chatter_attachments_manager/static/description/assets/icons/modules/website_cart.png b/chatter_attachments_manager/static/description/assets/icons/modules/website_cart.png new file mode 100644 index 000000000..163485cfd Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/icons/modules/website_cart.png differ diff --git a/chatter_attachments_manager/static/description/assets/icons/notes.png b/chatter_attachments_manager/static/description/assets/icons/notes.png new file mode 100644 index 000000000..ee5e95404 Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/icons/notes.png differ diff --git a/chatter_attachments_manager/static/description/assets/icons/notification icon.svg b/chatter_attachments_manager/static/description/assets/icons/notification icon.svg new file mode 100644 index 000000000..053189973 --- /dev/null +++ b/chatter_attachments_manager/static/description/assets/icons/notification icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/chatter_attachments_manager/static/description/assets/icons/odoo-consultancy.svg b/chatter_attachments_manager/static/description/assets/icons/odoo-consultancy.svg new file mode 100644 index 000000000..e05f65bde --- /dev/null +++ b/chatter_attachments_manager/static/description/assets/icons/odoo-consultancy.svg @@ -0,0 +1,4 @@ + + + + diff --git a/chatter_attachments_manager/static/description/assets/icons/odoo-licencing.svg b/chatter_attachments_manager/static/description/assets/icons/odoo-licencing.svg new file mode 100644 index 000000000..2606c88b0 --- /dev/null +++ b/chatter_attachments_manager/static/description/assets/icons/odoo-licencing.svg @@ -0,0 +1,3 @@ + + + diff --git a/chatter_attachments_manager/static/description/assets/icons/odoo-logo.png b/chatter_attachments_manager/static/description/assets/icons/odoo-logo.png new file mode 100644 index 000000000..0e4d0eb5a Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/icons/odoo-logo.png differ diff --git a/chatter_attachments_manager/static/description/assets/icons/patter.svg b/chatter_attachments_manager/static/description/assets/icons/patter.svg new file mode 100644 index 000000000..25c9c0a8f --- /dev/null +++ b/chatter_attachments_manager/static/description/assets/icons/patter.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/chatter_attachments_manager/static/description/assets/icons/pattern1.png b/chatter_attachments_manager/static/description/assets/icons/pattern1.png new file mode 100644 index 000000000..09ab0fb2d Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/icons/pattern1.png differ diff --git a/chatter_attachments_manager/static/description/assets/icons/photo-capture.png b/chatter_attachments_manager/static/description/assets/icons/photo-capture.png new file mode 100644 index 000000000..06c111758 Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/icons/photo-capture.png differ diff --git a/chatter_attachments_manager/static/description/assets/icons/pos-black.png b/chatter_attachments_manager/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/icons/pos-black.png differ diff --git a/chatter_attachments_manager/static/description/assets/icons/puzzle-piece-icon.svg b/chatter_attachments_manager/static/description/assets/icons/puzzle-piece-icon.svg new file mode 100644 index 000000000..3e9ad9373 --- /dev/null +++ b/chatter_attachments_manager/static/description/assets/icons/puzzle-piece-icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/chatter_attachments_manager/static/description/assets/icons/puzzle.png b/chatter_attachments_manager/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/icons/puzzle.png differ diff --git a/chatter_attachments_manager/static/description/assets/icons/replace-icon.svg b/chatter_attachments_manager/static/description/assets/icons/replace-icon.svg new file mode 100644 index 000000000..d0e3a7af1 --- /dev/null +++ b/chatter_attachments_manager/static/description/assets/icons/replace-icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/chatter_attachments_manager/static/description/assets/icons/restaurant-black.png b/chatter_attachments_manager/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/icons/restaurant-black.png differ diff --git a/chatter_attachments_manager/static/description/assets/icons/screenshot-main.png b/chatter_attachments_manager/static/description/assets/icons/screenshot-main.png new file mode 100644 index 000000000..575f8e676 Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/icons/screenshot-main.png differ diff --git a/chatter_attachments_manager/static/description/assets/icons/screenshot.png b/chatter_attachments_manager/static/description/assets/icons/screenshot.png new file mode 100644 index 000000000..cef272529 Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/icons/screenshot.png differ diff --git a/chatter_attachments_manager/static/description/assets/icons/service-black.png b/chatter_attachments_manager/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/icons/service-black.png differ diff --git a/chatter_attachments_manager/static/description/assets/icons/skype-fill.svg b/chatter_attachments_manager/static/description/assets/icons/skype-fill.svg new file mode 100644 index 000000000..c17423639 --- /dev/null +++ b/chatter_attachments_manager/static/description/assets/icons/skype-fill.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/chatter_attachments_manager/static/description/assets/icons/skype.png b/chatter_attachments_manager/static/description/assets/icons/skype.png new file mode 100644 index 000000000..51b409fb3 Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/icons/skype.png differ diff --git a/chatter_attachments_manager/static/description/assets/icons/skype.svg b/chatter_attachments_manager/static/description/assets/icons/skype.svg new file mode 100644 index 000000000..df3dad39b --- /dev/null +++ b/chatter_attachments_manager/static/description/assets/icons/skype.svg @@ -0,0 +1,3 @@ + + + diff --git a/chatter_attachments_manager/static/description/assets/icons/star-1.svg b/chatter_attachments_manager/static/description/assets/icons/star-1.svg new file mode 100644 index 000000000..7e55ab162 --- /dev/null +++ b/chatter_attachments_manager/static/description/assets/icons/star-1.svg @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/chatter_attachments_manager/static/description/assets/icons/star-2.svg b/chatter_attachments_manager/static/description/assets/icons/star-2.svg new file mode 100644 index 000000000..5ae9f507a --- /dev/null +++ b/chatter_attachments_manager/static/description/assets/icons/star-2.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/chatter_attachments_manager/static/description/assets/icons/support.png b/chatter_attachments_manager/static/description/assets/icons/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/icons/support.png differ diff --git a/chatter_attachments_manager/static/description/assets/icons/test-1 - Copy.png b/chatter_attachments_manager/static/description/assets/icons/test-1 - Copy.png new file mode 100644 index 000000000..f6a902663 Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/icons/test-1 - Copy.png differ diff --git a/chatter_attachments_manager/static/description/assets/icons/test-1.png b/chatter_attachments_manager/static/description/assets/icons/test-1.png new file mode 100644 index 000000000..0908add2b Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/icons/test-1.png differ diff --git a/chatter_attachments_manager/static/description/assets/icons/test-2.png b/chatter_attachments_manager/static/description/assets/icons/test-2.png new file mode 100644 index 000000000..4671fe91e Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/icons/test-2.png differ diff --git a/chatter_attachments_manager/static/description/assets/icons/trading-black.png b/chatter_attachments_manager/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/icons/trading-black.png differ diff --git a/chatter_attachments_manager/static/description/assets/icons/training.png b/chatter_attachments_manager/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/icons/training.png differ diff --git a/chatter_attachments_manager/static/description/assets/icons/translate.svg b/chatter_attachments_manager/static/description/assets/icons/translate.svg new file mode 100644 index 000000000..af9c8a1aa --- /dev/null +++ b/chatter_attachments_manager/static/description/assets/icons/translate.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/chatter_attachments_manager/static/description/assets/icons/update.png b/chatter_attachments_manager/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/icons/update.png differ diff --git a/chatter_attachments_manager/static/description/assets/icons/user.png b/chatter_attachments_manager/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/icons/user.png differ diff --git a/chatter_attachments_manager/static/description/assets/icons/video.png b/chatter_attachments_manager/static/description/assets/icons/video.png new file mode 100644 index 000000000..576705b17 Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/icons/video.png differ diff --git a/chatter_attachments_manager/static/description/assets/icons/whatsapp.png b/chatter_attachments_manager/static/description/assets/icons/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/icons/whatsapp.png differ diff --git a/chatter_attachments_manager/static/description/assets/icons/wrench-icon.svg b/chatter_attachments_manager/static/description/assets/icons/wrench-icon.svg new file mode 100644 index 000000000..174b5a465 --- /dev/null +++ b/chatter_attachments_manager/static/description/assets/icons/wrench-icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/chatter_attachments_manager/static/description/assets/icons/wrench.png b/chatter_attachments_manager/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/icons/wrench.png differ diff --git a/chatter_attachments_manager/static/description/assets/misc/Cybrosys R.png b/chatter_attachments_manager/static/description/assets/misc/Cybrosys R.png new file mode 100644 index 000000000..da4058087 Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/misc/Cybrosys R.png differ diff --git a/chatter_attachments_manager/static/description/assets/misc/categories.png b/chatter_attachments_manager/static/description/assets/misc/categories.png new file mode 100644 index 000000000..bedf1e0b1 Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/misc/categories.png differ diff --git a/chatter_attachments_manager/static/description/assets/misc/check-box.png b/chatter_attachments_manager/static/description/assets/misc/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/misc/check-box.png differ diff --git a/chatter_attachments_manager/static/description/assets/misc/compass.png b/chatter_attachments_manager/static/description/assets/misc/compass.png new file mode 100644 index 000000000..d5fed8faa Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/misc/compass.png differ diff --git a/chatter_attachments_manager/static/description/assets/misc/corporate.png b/chatter_attachments_manager/static/description/assets/misc/corporate.png new file mode 100644 index 000000000..2eb13edbf Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/misc/corporate.png differ diff --git a/chatter_attachments_manager/static/description/assets/misc/customer-support.png b/chatter_attachments_manager/static/description/assets/misc/customer-support.png new file mode 100644 index 000000000..79efc72ed Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/misc/customer-support.png differ diff --git a/chatter_attachments_manager/static/description/assets/misc/cybrosys-logo.png b/chatter_attachments_manager/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/misc/cybrosys-logo.png differ diff --git a/chatter_attachments_manager/static/description/assets/misc/email.svg b/chatter_attachments_manager/static/description/assets/misc/email.svg new file mode 100644 index 000000000..15291cdc3 --- /dev/null +++ b/chatter_attachments_manager/static/description/assets/misc/email.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/chatter_attachments_manager/static/description/assets/misc/features.png b/chatter_attachments_manager/static/description/assets/misc/features.png new file mode 100644 index 000000000..b41769f77 Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/misc/features.png differ diff --git a/chatter_attachments_manager/static/description/assets/misc/logo.png b/chatter_attachments_manager/static/description/assets/misc/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/misc/logo.png differ diff --git a/chatter_attachments_manager/static/description/assets/misc/phone.svg b/chatter_attachments_manager/static/description/assets/misc/phone.svg new file mode 100644 index 000000000..b7bd7f251 --- /dev/null +++ b/chatter_attachments_manager/static/description/assets/misc/phone.svg @@ -0,0 +1,3 @@ + + + diff --git a/chatter_attachments_manager/static/description/assets/misc/pictures.png b/chatter_attachments_manager/static/description/assets/misc/pictures.png new file mode 100644 index 000000000..56d255fe9 Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/misc/pictures.png differ diff --git a/chatter_attachments_manager/static/description/assets/misc/pie-chart.png b/chatter_attachments_manager/static/description/assets/misc/pie-chart.png new file mode 100644 index 000000000..426e05244 Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/misc/pie-chart.png differ diff --git a/chatter_attachments_manager/static/description/assets/misc/right-arrow.png b/chatter_attachments_manager/static/description/assets/misc/right-arrow.png new file mode 100644 index 000000000..730984a06 Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/misc/right-arrow.png differ diff --git a/chatter_attachments_manager/static/description/assets/misc/star (1) 2.svg b/chatter_attachments_manager/static/description/assets/misc/star (1) 2.svg new file mode 100644 index 000000000..5ae9f507a --- /dev/null +++ b/chatter_attachments_manager/static/description/assets/misc/star (1) 2.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/chatter_attachments_manager/static/description/assets/misc/star.png b/chatter_attachments_manager/static/description/assets/misc/star.png new file mode 100644 index 000000000..2eb9ab29f Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/misc/star.png differ diff --git a/chatter_attachments_manager/static/description/assets/misc/support (1) 1.svg b/chatter_attachments_manager/static/description/assets/misc/support (1) 1.svg new file mode 100644 index 000000000..7d37a8f30 --- /dev/null +++ b/chatter_attachments_manager/static/description/assets/misc/support (1) 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/chatter_attachments_manager/static/description/assets/misc/support-email.svg b/chatter_attachments_manager/static/description/assets/misc/support-email.svg new file mode 100644 index 000000000..eb70370d6 --- /dev/null +++ b/chatter_attachments_manager/static/description/assets/misc/support-email.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/chatter_attachments_manager/static/description/assets/misc/support.png b/chatter_attachments_manager/static/description/assets/misc/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/misc/support.png differ diff --git a/chatter_attachments_manager/static/description/assets/misc/tick-mark.svg b/chatter_attachments_manager/static/description/assets/misc/tick-mark.svg new file mode 100644 index 000000000..2dbb40187 --- /dev/null +++ b/chatter_attachments_manager/static/description/assets/misc/tick-mark.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/chatter_attachments_manager/static/description/assets/misc/whatsapp 1.svg b/chatter_attachments_manager/static/description/assets/misc/whatsapp 1.svg new file mode 100644 index 000000000..0bfaf8fc6 --- /dev/null +++ b/chatter_attachments_manager/static/description/assets/misc/whatsapp 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/chatter_attachments_manager/static/description/assets/misc/whatsapp.png b/chatter_attachments_manager/static/description/assets/misc/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/misc/whatsapp.png differ diff --git a/chatter_attachments_manager/static/description/assets/misc/whatsapp.svg b/chatter_attachments_manager/static/description/assets/misc/whatsapp.svg new file mode 100644 index 000000000..b618aea1d --- /dev/null +++ b/chatter_attachments_manager/static/description/assets/misc/whatsapp.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/chatter_attachments_manager/static/description/assets/modules/1.gif b/chatter_attachments_manager/static/description/assets/modules/1.gif new file mode 100644 index 000000000..8ac32db03 Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/modules/1.gif differ diff --git a/chatter_attachments_manager/static/description/assets/modules/1.png b/chatter_attachments_manager/static/description/assets/modules/1.png new file mode 100644 index 000000000..cb17cf612 Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/modules/1.png differ diff --git a/chatter_attachments_manager/static/description/assets/modules/2.jpg b/chatter_attachments_manager/static/description/assets/modules/2.jpg new file mode 100644 index 000000000..a1dc39c89 Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/modules/2.jpg differ diff --git a/chatter_attachments_manager/static/description/assets/modules/2.png b/chatter_attachments_manager/static/description/assets/modules/2.png new file mode 100644 index 000000000..a0ac2d840 Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/modules/2.png differ diff --git a/chatter_attachments_manager/static/description/assets/modules/3.png b/chatter_attachments_manager/static/description/assets/modules/3.png new file mode 100644 index 000000000..0e311ca87 Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/modules/3.png differ diff --git a/chatter_attachments_manager/static/description/assets/modules/4.jpg b/chatter_attachments_manager/static/description/assets/modules/4.jpg new file mode 100644 index 000000000..a68431b9d Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/modules/4.jpg differ diff --git a/chatter_attachments_manager/static/description/assets/modules/4.png b/chatter_attachments_manager/static/description/assets/modules/4.png new file mode 100644 index 000000000..e78427938 Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/modules/4.png differ diff --git a/chatter_attachments_manager/static/description/assets/modules/5.gif b/chatter_attachments_manager/static/description/assets/modules/5.gif new file mode 100644 index 000000000..2a5f8e659 Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/modules/5.gif differ diff --git a/chatter_attachments_manager/static/description/assets/modules/5.jpg b/chatter_attachments_manager/static/description/assets/modules/5.jpg new file mode 100644 index 000000000..115e1eee1 Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/modules/5.jpg differ diff --git a/chatter_attachments_manager/static/description/assets/modules/5.png b/chatter_attachments_manager/static/description/assets/modules/5.png new file mode 100644 index 000000000..a80a0d9dc Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/modules/5.png differ diff --git a/chatter_attachments_manager/static/description/assets/modules/6.jpg b/chatter_attachments_manager/static/description/assets/modules/6.jpg new file mode 100644 index 000000000..6d02447be Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/modules/6.jpg differ diff --git a/chatter_attachments_manager/static/description/assets/modules/6.png b/chatter_attachments_manager/static/description/assets/modules/6.png new file mode 100644 index 000000000..7d5c3154f Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/modules/6.png differ diff --git a/chatter_attachments_manager/static/description/assets/modules/banner.jpg b/chatter_attachments_manager/static/description/assets/modules/banner.jpg new file mode 100644 index 000000000..67c7f7062 Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/modules/banner.jpg differ diff --git a/chatter_attachments_manager/static/description/assets/modules/barcode.png b/chatter_attachments_manager/static/description/assets/modules/barcode.png new file mode 100644 index 000000000..618e3e6c4 Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/modules/barcode.png differ diff --git a/chatter_attachments_manager/static/description/assets/modules/fatoorah.png b/chatter_attachments_manager/static/description/assets/modules/fatoorah.png new file mode 100644 index 000000000..991fc77ec Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/modules/fatoorah.png differ diff --git a/chatter_attachments_manager/static/description/assets/modules/integration_biometric.png b/chatter_attachments_manager/static/description/assets/modules/integration_biometric.png new file mode 100644 index 000000000..ed11bd818 Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/modules/integration_biometric.png differ diff --git a/chatter_attachments_manager/static/description/assets/modules/product_brand.png b/chatter_attachments_manager/static/description/assets/modules/product_brand.png new file mode 100644 index 000000000..1d2238b80 Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/modules/product_brand.png differ diff --git a/chatter_attachments_manager/static/description/assets/modules/website_cart.png b/chatter_attachments_manager/static/description/assets/modules/website_cart.png new file mode 100644 index 000000000..163485cfd Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/modules/website_cart.png differ diff --git a/chatter_attachments_manager/static/description/assets/screenshots/1.png b/chatter_attachments_manager/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..18292210d Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/screenshots/1.png differ diff --git a/chatter_attachments_manager/static/description/assets/screenshots/10.png b/chatter_attachments_manager/static/description/assets/screenshots/10.png new file mode 100644 index 000000000..01ad24d85 Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/screenshots/10.png differ diff --git a/chatter_attachments_manager/static/description/assets/screenshots/11.png b/chatter_attachments_manager/static/description/assets/screenshots/11.png new file mode 100644 index 000000000..f8c64748f Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/screenshots/11.png differ diff --git a/chatter_attachments_manager/static/description/assets/screenshots/12.png b/chatter_attachments_manager/static/description/assets/screenshots/12.png new file mode 100644 index 000000000..1ea9f41c9 Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/screenshots/12.png differ diff --git a/chatter_attachments_manager/static/description/assets/screenshots/13.png b/chatter_attachments_manager/static/description/assets/screenshots/13.png new file mode 100644 index 000000000..e9b1fd4c2 Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/screenshots/13.png differ diff --git a/chatter_attachments_manager/static/description/assets/screenshots/14.png b/chatter_attachments_manager/static/description/assets/screenshots/14.png new file mode 100644 index 000000000..2fcec9e6c Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/screenshots/14.png differ diff --git a/chatter_attachments_manager/static/description/assets/screenshots/15.png b/chatter_attachments_manager/static/description/assets/screenshots/15.png new file mode 100644 index 000000000..aa2d504f5 Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/screenshots/15.png differ diff --git a/chatter_attachments_manager/static/description/assets/screenshots/2.png b/chatter_attachments_manager/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..551bf78f8 Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/screenshots/2.png differ diff --git a/chatter_attachments_manager/static/description/assets/screenshots/3.png b/chatter_attachments_manager/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..110b5a847 Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/screenshots/3.png differ diff --git a/chatter_attachments_manager/static/description/assets/screenshots/4.png b/chatter_attachments_manager/static/description/assets/screenshots/4.png new file mode 100644 index 000000000..89811fdc1 Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/screenshots/4.png differ diff --git a/chatter_attachments_manager/static/description/assets/screenshots/5.png b/chatter_attachments_manager/static/description/assets/screenshots/5.png new file mode 100644 index 000000000..c43756c20 Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/screenshots/5.png differ diff --git a/chatter_attachments_manager/static/description/assets/screenshots/6.png b/chatter_attachments_manager/static/description/assets/screenshots/6.png new file mode 100644 index 000000000..d7b9075c2 Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/screenshots/6.png differ diff --git a/chatter_attachments_manager/static/description/assets/screenshots/7.png b/chatter_attachments_manager/static/description/assets/screenshots/7.png new file mode 100644 index 000000000..5aa85a0aa Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/screenshots/7.png differ diff --git a/chatter_attachments_manager/static/description/assets/screenshots/8.png b/chatter_attachments_manager/static/description/assets/screenshots/8.png new file mode 100644 index 000000000..0f79397e0 Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/screenshots/8.png differ diff --git a/chatter_attachments_manager/static/description/assets/screenshots/9.png b/chatter_attachments_manager/static/description/assets/screenshots/9.png new file mode 100644 index 000000000..f7dc1bf1d Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/screenshots/9.png differ diff --git a/chatter_attachments_manager/static/description/assets/screenshots/hero.gif b/chatter_attachments_manager/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..12cc26d86 Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/screenshots/hero.gif differ diff --git a/chatter_attachments_manager/static/description/assets/screenshots/screenshots.zip b/chatter_attachments_manager/static/description/assets/screenshots/screenshots.zip new file mode 100644 index 000000000..671cfb6d3 Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/screenshots/screenshots.zip differ diff --git a/chatter_attachments_manager/static/description/assets/y18.jpg b/chatter_attachments_manager/static/description/assets/y18.jpg new file mode 100644 index 000000000..eea1714f2 Binary files /dev/null and b/chatter_attachments_manager/static/description/assets/y18.jpg differ diff --git a/chatter_attachments_manager/static/description/banner.png b/chatter_attachments_manager/static/description/banner.png new file mode 100644 index 000000000..9634999da Binary files /dev/null and b/chatter_attachments_manager/static/description/banner.png differ diff --git a/chatter_attachments_manager/static/description/icon.png b/chatter_attachments_manager/static/description/icon.png new file mode 100644 index 000000000..38f89e180 Binary files /dev/null and b/chatter_attachments_manager/static/description/icon.png differ diff --git a/chatter_attachments_manager/static/description/index.html b/chatter_attachments_manager/static/description/index.html new file mode 100644 index 000000000..30a63689c --- /dev/null +++ b/chatter_attachments_manager/static/description/index.html @@ -0,0 +1,1450 @@ + + + + + + Chatter Attachment Manager + + + + + + + + + + +
+
+ + + +
+
+ Community +
+
+ Enterprise +
+ + + + +
+
+ +
+
+
+
+

+ This module helps to enhance the Attachment Management + capabilities within Odoo. Can easily Edit, Read, Preview your + Documents. +

+

Chatter Attachment Manager +

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

Key + Highlights

+
+
+
+
+ +
+
+ Support front camera and screen recorder. +
+

+ User can + record, take picture and attach to chatter

+
+
+
+
+
+ +
+
+ Offline Preview. +
+

+ Offline preview + is available for Xlsx, Docx, Pdf And Image files + from chatter itself

+
+
+
+
+
+ +
+
+ Image Professional Editor support. +
+

+ This app + provides a professional image editor, + allowing you to edit and enhance images directly + within your App

+
+
+
+
+
+ +
+
+ QRcode support (for Secured Server) +
+

+ QR can be sent + to any employee who can download and open the + file

+
+
+
+
+ +
+
+
+ Chatter Attachment Manager +

+ Are you ready to make your business more + organized? +
Improve now! +

+ +
+
+ +
+
+
+ + + + +
+
+ +
+
+
+
+ acc_bg +
+ +
+
+
+
+

+ + Upload Attachments. + + +

+
+
+

+ You can upload from your device, front camera, screencast.You are able + to download all attachments and manage it. Can upload multiple files at + a time. + Attachments can be posted by clicking the '+' icon in the chatter. +

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

+ +You can upload file from your device by + clicking on 'My device'. + +

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

+ + + +Can select files from device and posted on attachments. + + +

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

+ +Can upload file from 'Front Cam'. + +

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

+ + +It will open a window to take picture.Click on 'Capture' to capture the photo or cancel it. + + +

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

+ + + +The "Record Screen" button allows you to upload recorded screens. + + + +

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

+ + + + +On click on 'Allow' button, the screen is recorded. + + + + +

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

+ + + + + +Screen Recorder can be stopped on clicking 'Stop sharing'. Recorder video will be saved there. + + + + + +

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

+ + + + + + +All uploaded attachments can be viewed. + + + + + + +

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

+ + + + + + + +Click on 'cog' icon, it will list some items.Click on 'Edit record' to edit the record. + + + + + + + +

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

+ + + + + + + + +Click on 'Image Editor'. + +A professional Image Editor is Provided to alter the image, such as cropping, Resizing, applying a color filter etc.Can load another image and replace existing one. + + + + + + + +

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

+ + + + + + + + + +The selected picture will be shown in the TOAST UI Image Editor window. + + + + + + + + +

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

+ + + + + + + + + + +Click on 'Preview Offline' to preview the attachments.Offline preview for only 'docx', 'XLSX', 'webm', 'pdf' is available. + + + + + + + +

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

+ Support front camera and screen recorder.

+
+
+
+
+
+
+
+ +
+

+ Offline preview for Xlsx, Docx, Pdf And Image files.

+
+
+
+
+
+
+
+ +
+

+ Image Professional Editor support.

+
+
+
+
+
+
+
+ +
+

+ All Attachments in a record can be downloaded as a Zip file.

+
+
+
+
+
+
+
+ +
+

+ QRcode support(for secured server).

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

+ Yes, this restriction applies to all products listed in the + POS system. The module ensures that no item can be checked + out or confirmed with a zero quantity. +

+
+
+ +
+ +
+

+ Yes, discounts and promotions can be applied as usual. The + module specifically restricts zero quantities for individual + products, not the overall total of the transaction. +

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

+ Latest Release 18.0.1.0.0 +

+ + 1st October, 2024 + +
+
+
+
+
+ Add +
+
+
+
    +
  • + Initial Commit +
  • + +
+
+
+
+
+
+
+
+
+
+ + + + + + +
+

+ Our Services

+ +
+ +
+
+ .... +
+
+ +
+ + +
+
+ + + + + + diff --git a/chatter_attachments_manager/static/src/attachment_control_panel/attachment_control_panel.js b/chatter_attachments_manager/static/src/attachment_control_panel/attachment_control_panel.js new file mode 100644 index 000000000..70c4cd396 --- /dev/null +++ b/chatter_attachments_manager/static/src/attachment_control_panel/attachment_control_panel.js @@ -0,0 +1,190 @@ +/** @odoo-module **/ +import { Chatter } from "@mail/chatter/web_portal/chatter"; +import { patch } from "@web/core/utils/patch"; +import { _t } from "@web/core/l10n/translation"; +import { useRef } from "@odoo/owl"; +patch(Chatter.prototype, { + /** + * @override + */ + setup() { + super.setup(); + this.MyModal = useRef('myModal') + this.control_menu = useRef('control_menu_dropdown') + }, + //-------------------------------------------------------------------------- + // Handlers + //-------------------------------------------------------------------------- + + /** + Open a dropdown on click upload icon + **/ + onClickUpload(ev){ + if (this.control_menu.el.style.display === "none") { + this.control_menu.el.style.display = "block"; + } + else { + this.control_menu.el.style.display = "none"; + } + }, + + /** + Download all attachments attached to the record. + **/ + onClickDownloadAll(ev) { + var apiUrl = '/web/binary/download_document'; // URL of Odoo controller + var modelName = this.state.thread.model; + var tabId = this.state.thread.id; + fetch(apiUrl + '?param1=' + modelName + '¶m2=' + tabId, { + method: 'GET', + responseType: 'blob' + }) + .then(response => response.blob()) + .then(blob => { + var url = window.URL.createObjectURL(blob); + var a = $('', { + style: 'display: none', + href: url, + download: modelName + '.zip' + }); + $('body').append(a); + a[0].click(); + a.remove(); + window.URL.revokeObjectURL(url); + }) + .catch(error => { + }); + }, + + /** + Open camera to capture + **/ + onClickCamera(ev) { + var self = this; + this.MyModal.el.style.display = "table"; + let All_mediaDevices = navigator.mediaDevices + All_mediaDevices.getUserMedia({ + audio: false, + video: true + }) + .then(function(vidStream) { + var video = document.getElementById('videoCam'); + if ("srcObject" in video) { + video.srcObject = vidStream; + } else { + video.src = window.URL.createObjectURL(vidStream); + } + video.onloadedmetadata = function(e) { + video.play(); + }; + var stopButton = document.getElementById('stop-camera-button'); + stopButton.addEventListener('click', function() { + vidStream.getTracks().forEach(function(track) { + track.stop(); + self.MyModal.el.style.display = "none"; + canvas.toDataURL(); + }); + location.reload(); + }); + }) + .catch(function(e) { +// console.log(e.name + ": " + e.message); + alert(`Error: ${e.name} - ${e.message}`); + }); + }, + /** + Record the screen. + **/ + async onClickScreenRec(ev){ + try { + let stream = await navigator.mediaDevices.getDisplayMedia({ + video: true + }) + const mime = MediaRecorder.isTypeSupported("video/webm; codecs=vp9") + ? "video/webm; codecs=vp9" + : "video/webm" + let mediaRecorder = new MediaRecorder(stream, { + mimeType: mime + }) + var self = this; + let chunks = [] + mediaRecorder.addEventListener('dataavailable', function(e) { + chunks.push(e.data) + }) + mediaRecorder.addEventListener('stop', function(){ + let blob = new Blob(chunks, { + type: chunks[0].type + }) + const blobToBase64 = blob => { + const reader = new FileReader(); + reader.readAsDataURL(blob); + return new Promise(resolve => { + reader.onloadend = () => { + resolve(reader.result); + }; + }); + }; + blobToBase64(blob).then(res => { + var arr = res.split(','), + mime = arr[0].match(/:(.*?);/)[1], + bstr = atob(arr[1]), + n = bstr.length, + u8arr = new Uint8Array(n); + while (n--) { + u8arr[n] = bstr.charCodeAt(n); + } + var f = new File([u8arr], 'example.webm', { + type: mime + }); + self.attachmentUploader.uploadFile(f) + }); + }) + mediaRecorder.start() + } catch(e){} + }, + + /** + Capture the image + **/ + ImageCapture: function(){ + let canvas = document.querySelector("#canvas"); + let video = document.querySelector("#videoCam"); + canvas.getContext('2d').drawImage(video, 0, 0, canvas.width, canvas.height); + let image_data_url = canvas.toDataURL('image/jpeg'); + var arr = image_data_url.split(','), + mime = arr[0].match(/:(.*?);/)[1], + bstr = atob(arr[1]), + n = bstr.length, + u8arr = new Uint8Array(n); + while (n--) { + u8arr[n] = bstr.charCodeAt(n); + } + var f = new File([u8arr], 'image.jpeg', { + type: mime + }); + this.attachmentUploader.uploadFile(f) + }, + + /** + Open window to edit image record + **/ + async onClickEditImgRecord(ev){ + ev.preventDefault(); + markEventHandled(ev, 'AttachmentImage.onClickEditImgRecord'); + var attachment_id = parseInt(ev.target.id); + await this.env.services.action.doAction({ + name: this.env._t("Attachment"), + type: 'ir.actions.act_window', + view_mode: 'form', + views: [[false, 'form']], + target: 'new', + res_id: attachment_id, + res_model: 'ir.attachment', + context: { create: false }, + }, { + onClose: async () => { + await location.reload(); + }, + }); + }, +}); diff --git a/chatter_attachments_manager/static/src/attachment_control_panel/attachment_control_panel_templates.xml b/chatter_attachments_manager/static/src/attachment_control_panel/attachment_control_panel_templates.xml new file mode 100644 index 000000000..8721cfde2 --- /dev/null +++ b/chatter_attachments_manager/static/src/attachment_control_panel/attachment_control_panel_templates.xml @@ -0,0 +1,78 @@ + + + + + + +
+ +
+ + + diff --git a/chatter_attachments_manager/static/src/attachment_image/attachment_image.js b/chatter_attachments_manager/static/src/attachment_image/attachment_image.js new file mode 100644 index 000000000..bfed0ee41 --- /dev/null +++ b/chatter_attachments_manager/static/src/attachment_image/attachment_image.js @@ -0,0 +1,220 @@ +/** @odoo-module **/ +import { patch } from "@web/core/utils/patch"; +import { _t } from "@web/core/l10n/translation"; +import { useRef } from "@odoo/owl"; +import { AttachmentList } from "@mail/core/common/attachment_list"; +import { ImageActions } from "@mail/core/common/attachment_list"; +import { isEventHandled, markEventHandled } from "@web/core/utils/misc"; +import { useService } from "@web/core/utils/hooks"; + + +patch(AttachmentList.prototype, { + /** + * @override + */ + setup() { + super.setup(); + this.orm = useService("orm"); + this.action = useService("action"); + }, + /** + Open window to edit image record + **/ + async onClickEditImgRecord(ev, attachment){ + ev.stopPropagation(); + ev.preventDefault(); + markEventHandled(ev, 'AttachmentImage.onClickEditImgRecord'); + await this.env.services.action.doAction({ + name: _t("Attachment"), + type: 'ir.actions.act_window', + view_mode: 'form', + views: [[false, 'form']], + target: 'new', + res_id: attachment.id, + res_model: 'ir.attachment', + context: { create: false }, + }, { + onClose: async () => { + await location.reload(); + }, + }); + }, + + onClickImage(ev) { + if (isEventHandled(ev, 'onClickEditImgRecord')) { + return; + } + if (isEventHandled(ev, 'onClickImageEdit')) { + return; + } + this._super.apply(this, arguments); + }, + + /** + Open a window to edit image + **/ + async onClickImageEdit(ev, attachment) { + var self = this; + markEventHandled(ev, 'AttachmentImage.onClickImageEdit'); + + // Initialize the image editor + var imageEditor = new tui.ImageEditor('.tui-image-editor-container', { + includeUI: { + loadImage: { + path: "/web/image/ir.attachment/" + attachment.id + "/datas", + name: 'SampleImage' + }, + imageSize: { + oldWidth: "0", + oldHeight: "0", + newWidth: "300", + newHeight: "90" + }, + initMenu: 'filter', + menuBarPosition: 'bottom' + }, + cssMaxWidth: 500, + cssMaxHeight: 590, + usageStatistics: false + }); + + // Show the editor container + const editorContainer = document.querySelector('#imageEditor'); + if (editorContainer) { + editorContainer.style.display = 'block'; + } + + // Replace the download button with a save button + const downloadButton = document.querySelector('.tui-image-editor-header-buttons .tui-image-editor-download-btn'); + if (downloadButton) { + const saveButton = document.createElement('button'); + saveButton.classList.add('tui-image-editor-save-btn'); + saveButton.textContent = 'Save'; + downloadButton.replaceWith(saveButton); + } + + // Add a close button to the header + const headerButtons = document.querySelector('.tui-image-editor-header-buttons'); + if (headerButtons) { + const closeButton = document.createElement('div'); + closeButton.classList.add('tui-image-editor-close-btn'); + closeButton.textContent = 'Close'; + closeButton.style.cssText = ` + background-color: #fff; + border: 1px solid #ddd; + color: #222; + font-family: sans-serif; + font-size: 12px; + padding: 5px; + cursor: pointer; + `; + headerButtons.appendChild(closeButton); + + // Add event listener for the close button + closeButton.addEventListener('click', this.CloseImageEditor.bind(this)); + } + + // Add event listener for the save button + const saveButton = document.querySelector('.tui-image-editor-save-btn'); + if (saveButton) { + saveButton.addEventListener('click', async () => { + const myImage = imageEditor.toDataURL(); + const attachment_id = attachment.id; + try { + await self.orm.call("ir.attachment", "save_edited_image", [attachment_id, myImage]); + location.reload(); // Reload the page after saving + } catch (error) { + console.error("Error saving edited image:", error); + } + }); + } +}, + + CloseImageEditor: function(){ + var edit = jQuery.noConflict(); + edit('#imageEditor').css("display","none"); + }, + + /** + * Records can be edited by altering the file name and adding tags. + */ + async onClickEditRecord(ev, attachment){ + ev.stopPropagation(); + ev.preventDefault(); + await this.env.services.action.doAction({ + name: _t("Attachment"), + type: 'ir.actions.act_window', + view_mode: 'form', + views: [[false, 'form']], + target: 'new', + res_id: attachment.id, + res_model: 'ir.attachment', + context: { create: false }, + }, { + onClose: async () => { + await location.reload(); + }, + }); + }, + + /** + * Offline Preview of file type 'docx', 'xlsx' and 'pdf' + */ + async onClickPreviewOffline(ev, attachment){ + ev.stopPropagation(); + ev.preventDefault(); + var self = this; + var type = $(ev.currentTarget).data("type") + var modal = $('#xlsx_preview')[0] + modal.querySelector('#FileHead').textContent = ev.target.name + if (type === 'xls' || type === 'xlsx' || type === 'docx') { + modal.style.display = "block"; + var preview = await this.orm.call + ("ir.attachment", "decode_content", [parseInt(ev.target.id),type]).then(function (data) { + if (type === 'xls' || type === 'xlsx'){ + $('.MyDocs').empty(); + $('.XlsxTable').append(data) + var frame = $(".dataframe").attr('id', 'MyTable'); + } + else if(type === 'docx'){ + $('.MyDocs').empty(); + for (let para = 0; para < data.length; para++) { + $('.MyDocs').append(data[para]) + }; + } + }); + } + else{ + self.fileViewer.open(attachment, self.props.attachments) + } + }, + + /** + Close preview window + **/ + stopPreviewButton(ev){ + ev.stopPropagation(); + ev.preventDefault(); + var modal = $('#xlsx_preview')[0] + modal.style.display = "none"; + }, + + /** + * For generating Qr Code contain download link of attachment. + */ + async _onClickQrCode(ev){ + ev.stopPropagation(); + ev.preventDefault(); + var self = this; + await this.orm.call + ("ir.attachment", "generate_qr_code", [parseInt(ev.target.id)]).then(function (data){ + var act = self.env.services.action.doAction({ + type: 'ir.actions.report', + report_type: 'qweb-pdf', + report_name: 'chatter_attachments_manager.attachment_qr_report_template', + report_file: 'chatter_attachments_manager.attachment_qr_report_template', + data: data, + }); + }); + }, +}); diff --git a/chatter_attachments_manager/static/src/attachment_image/attachment_image_templates.xml b/chatter_attachments_manager/static/src/attachment_image/attachment_image_templates.xml new file mode 100644 index 000000000..3d9ccb11d --- /dev/null +++ b/chatter_attachments_manager/static/src/attachment_image/attachment_image_templates.xml @@ -0,0 +1,111 @@ + + + + + + + + + + + + + +
+ +
+ +
+
+
diff --git a/chatter_attachments_manager/static/src/css/chatter_attachment_manager.css b/chatter_attachments_manager/static/src/css/chatter_attachment_manager.css new file mode 100644 index 000000000..4a61b89ae --- /dev/null +++ b/chatter_attachments_manager/static/src/css/chatter_attachment_manager.css @@ -0,0 +1,135 @@ +/* Dropdown on attachment card for tools*/ +.dropdown { + position: relative; + } + .o_AttachmentCard_aside{ + overflow:visible !important; + } + .context_menu_dropdown { + display: none; + position: absolute; + background-color: white; + min-width: 120px; + box-sizing: border-box; + box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); + z-index: 1; + right: 0; + padding-bottom: 6px; + padding-top: 6px; + } + .context_menu_dropdown a{ + color: black; + text-decoration: none; + } + + .context_menu_dropdown a:hover { + background-color: #f1f1f1; + } + + .dropdown:hover .context_menu_dropdown{ + display: block; + } +/* Image editor container */ +#tui-image-editor-container{ + width: 981px; + height: 500px; + top: 0px; + position: fixed; /* Stay in place */ + z-index: 10; /* Sit on top by 10px*/ + padding: 1px; /* location of box */ + left: 10px; + } +#xlsx_preview{ + display: none; /* Hidden by default */ + position: fixed; /* Stay in place */ + z-index: 10; /* Sit on top */ + padding-top: 100px; /* Location of the box */ + left: 0; + top: 0; + width: 100%; /* Full width */ + height: 100%; /* Full height */ + overflow: auto; /* Enable scroll if needed */ + background-color: rgb(0,0,0); /* Fallback color */ + background-color: rgba(0,0,0,0.4); /* Black w/ opacity */ +} +#video_content{ + background-color: rgba(0, 0, 0, -5.3); +} +#MyTable{ + font-family: Arial, Helvetica, sans-serif; + border-collapse: collapse; + width: 100%; +} +#MyTable th{ + padding-top: 12px; + padding-bottom: 12px; + text-align: left; + background-color: #04AA6D; + color: white; + border: 1px solid #ddd; + padding: 8px; +} +#MyTable td{ + border: 1px solid #ddd; + padding: 8px; +} +.XlsxTable{ + overflow: overlay; +} +#MyPreview_content { + background-color: #fefefe; + overflow: hidden; + margin: auto; + padding: 20px; + border: 1px solid #888; + width: 80%; +} + +/* The Close Button */ +#stop-preview-button { + color: #aaaaaa; + text-align: end; + font-size: 28px; + font-weight: bold; +} + +#stop-preview-button :hover, +#stop-preview-button :focus { + color: #000; + text-decoration: none; + cursor: pointer; +} +.MyDocs{ + overflow: auto; + text-align: justify; + padding: 30px; +} + +.o_AttachmentCard_tags span{ + border: 2px solid yellow; + border-radius: 25px; + background:yellow; + +} +.o_AttachmentImage { + width: 250px; + height: 200px; +} +.control_menu_dropdown{ + position: relative; + background-color: white; + min-width: 112px; + box-sizing: border-box; + box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); + z-index: 1; + left: 40px; + width: 30%; +} +.o-mail-AttachmentList, .o-mail-AttachmentCard-aside, .o-mail-AttachmentCard{ + overflow: visible !important; +} +.o-mail-AttachmentCard-image{ + position: relative; + top: 50%; + transform: translateY(-50%); +} diff --git a/chatter_attachments_manager/static/src/registry/registry.js b/chatter_attachments_manager/static/src/registry/registry.js new file mode 100644 index 000000000..57d92a98f --- /dev/null +++ b/chatter_attachments_manager/static/src/registry/registry.js @@ -0,0 +1,41 @@ +/** @odoo-module **/ +import { patch } from "@web/core/utils/patch"; +import { EventBus } from "@odoo/owl"; +import { Registry } from "@web/core/registry"; + +// Patching the Registry to check duplicating 'file_viewer1' +patch(Registry.prototype, { + setup() { + super.setup(); + }, + add(key, value, { + force, + sequence + } = {}) { + try { + if (!force && key in this.content) { + if (key == 'web.file_viewer1') { + // Handle the case when key is 'web.file_viewer1' + return; // Skip adding the key + } + throw new DuplicatedKeyError(`Cannot add '${key}' in this registry: it already exists`); + } + } catch (error) { + return; + } + let previousSequence; + if (force) { + const elem = this.content[key]; + previousSequence = elem && elem[0]; + } + sequence = sequence === undefined ? previousSequence || 50 : sequence; + this.content[key] = [sequence, value]; + const payload = { + operation: "add", + key, + value + }; + this.trigger("UPDATE", payload); + return this; + } +}) diff --git a/chatter_attachments_manager/views/ir_attachment_views.xml b/chatter_attachments_manager/views/ir_attachment_views.xml new file mode 100644 index 000000000..9d5ff8e09 --- /dev/null +++ b/chatter_attachments_manager/views/ir_attachment_views.xml @@ -0,0 +1,32 @@ + + + + + ir.attachment.view.form.inherit.chatter.attachments.manager + + ir.attachment + + + + + + + + + + + + ir.attachment.view.search.inherit.chatter.attachments.manager + ir.attachment + + + + + + + + + + +