diff --git a/export_attachments_from_list_view/README.rst b/export_attachments_from_list_view/README.rst new file mode 100644 index 000000000..3313ba137 --- /dev/null +++ b/export_attachments_from_list_view/README.rst @@ -0,0 +1,46 @@ +.. 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 + +Export Attachments From List View +================================== +The module can be used to quickly download attachments from the selected records. + +Configuration +============= +* No additional configurations needed + +Company +------- +* `Cybrosys Techno Solutions `__ + +License +------- +Affero General Public License v3.0 (AGPL v3) +(https://www.gnu.org/licenses/agpl-3.0-standalone.html) + +Credits +------- +* Developer : (V15) Mohammed Dilshad Tk, 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/export_attachments_from_list_view/__init__.py b/export_attachments_from_list_view/__init__.py new file mode 100644 index 000000000..b3fa604a0 --- /dev/null +++ b/export_attachments_from_list_view/__init__.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Mohammed Dilshad Tk (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 +from . import wizard diff --git a/export_attachments_from_list_view/__manifest__.py b/export_attachments_from_list_view/__manifest__.py new file mode 100644 index 000000000..bae6f9de7 --- /dev/null +++ b/export_attachments_from_list_view/__manifest__.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Mohammed Dilshad Tk (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': 'Export Attachments From List View', + 'version': '15.0.1.0.0', + 'category': 'Document Management', + 'summary': 'The module used to download multiple record attachment easily', + 'description': 'When using dynamic functionality in this model,' + 'the module can be used to quickly download the documents ' + 'in multiple records. Documents related to documents and' + ' other attachments are attached to the selected records ' + 'that downloaded quickly.', + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'depends': ['base', 'base_setup'], + 'data': [ + 'security/ir.model.access.csv', + 'views/export_attachment_views.xml', + 'views/res_config_settings_views.xml', + 'wizard/attachment_download_confirmation_views.xml', + ], + 'images': ['static/description/banner.jpg'], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/export_attachments_from_list_view/controllers/__init__.py b/export_attachments_from_list_view/controllers/__init__.py new file mode 100644 index 000000000..a004fad2b --- /dev/null +++ b/export_attachments_from_list_view/controllers/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Mohammed Dilshad Tk (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 export_attachments_from_list_view diff --git a/export_attachments_from_list_view/controllers/export_attachments_from_list_view.py b/export_attachments_from_list_view/controllers/export_attachments_from_list_view.py new file mode 100644 index 000000000..edd7b87bb --- /dev/null +++ b/export_attachments_from_list_view/controllers/export_attachments_from_list_view.py @@ -0,0 +1,67 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Mohammed Dilshad Tk (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 logging +try: + from BytesIO import BytesIO +except ImportError: + from io import BytesIO +import zipfile +from datetime import datetime +from odoo import http +from odoo.http import request +from odoo.http import content_disposition +import ast + +_logger = logging.getLogger(__name__) + + +class Binary(http.Controller): + """Attachment downloading binary class""" + + @http.route('/web/binary/download_document', type='http', + auth="public") + def download_document(self, tab_id): + """Download attachment method""" + new_tab = ast.literal_eval(tab_id) + attachment_ids = request.env['ir.attachment'].browse(new_tab) + 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["%s:%s" % (file_store, file_name)] = dict( + path=file_path, name=file_name) + zip_filename = datetime.now() + zip_filename = "%s.zip" % zip_filename + bitIO = BytesIO() + zip_file = zipfile.ZipFile(bitIO, "w", zipfile.ZIP_DEFLATED) + for file_info in file_dict.values(): + zip_file.write(file_info["path"], file_info["name"]) + zip_file.close() + return request.make_response(bitIO.getvalue(), + headers=[('Content-Type', + 'application/x-zip-compressed'), + ('Content-Disposition', + content_disposition( + zip_filename))] + ) diff --git a/export_attachments_from_list_view/doc/RELEASE_NOTES.md b/export_attachments_from_list_view/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..af3ece69b --- /dev/null +++ b/export_attachments_from_list_view/doc/RELEASE_NOTES.md @@ -0,0 +1,7 @@ +## Module + +#### 17.04.2024 +#### Version 15.0.1.0.0 +#### ADD + +- Initial Commit For Export Attachments From List View. diff --git a/export_attachments_from_list_view/models/__init__.py b/export_attachments_from_list_view/models/__init__.py new file mode 100644 index 000000000..6ae0a937b --- /dev/null +++ b/export_attachments_from_list_view/models/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Mohammed Dilshad Tk (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 export_attachment diff --git a/export_attachments_from_list_view/models/export_attachment.py b/export_attachments_from_list_view/models/export_attachment.py new file mode 100644 index 000000000..6ad3d34f2 --- /dev/null +++ b/export_attachments_from_list_view/models/export_attachment.py @@ -0,0 +1,91 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Mohammed Dilshad Tk (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################### +from odoo import api, fields, models + + +class ExportAttachment(models.Model): + """Create an export attachment dynamic action""" + _name = 'export.attachment' + _description = 'Export Attachment' + _rec_name = 'action_name' + + action_name = fields.Char(string='Action Name', + help='Add the document export action name.', + required=True) + applied_model_id = fields.Many2one('ir.model', + string="Applies To", + help='Select the model in which you ' + 'want to apply this action.', + ) + enabled_value = fields.Boolean(string="Create Action", + help="Enabling and hiding the" + "Create Action button", default=True, + copy=False) + states = fields.Selection([('draft', 'Draft'), + ('running', 'Running'), ('cancel', 'Cancelled')], + string='State', help='State of the action', + default="draft", copy=False) + created_action_names = fields.Char(string="Created Action Names", + compute="_compute_created_action_names", + help='If the name is visible to the line' + ' its created the action. If its ' + 'not its deleted the action',) + + @api.depends('action_name') + def _compute_created_action_names(self): + """Computation of adding the action names""" + for attachments in self: + actions = self.env['ir.actions.act_window'].search( + [('name', '=', attachments.action_name)]) + attachments.created_action_names = ', '.join(actions.mapped('name')) + + def action_create(self): + """When clicking the Add Action button to crete the action in + appropriate model""" + self.enabled_value = False + self.states = 'running' + self.env['ir.actions.act_window'].create({ + 'name': self.action_name, + 'res_model': 'attachment.download.confirmation', + 'type': 'ir.actions.act_window', + 'view_mode': 'form', + 'binding_model_id': self.env['ir.model']._get( + self.applied_model_id.model).id, + 'target': 'new', + 'view_id': + self.env.ref('export_attachments_from_list_view.' + 'attachment_download_confirmation_view_form').id, + 'binding_view_types': 'list' + }) + + def action_unlink(self): + """ Remove the contextual actions created for the server actions. """ + self.states = 'cancel' + for attachment in self: + actions = self.env['ir.actions.act_window'].search( + [('name', '=', attachment.action_name)]) + actions.unlink() + self.enabled_value = True + return { + 'type': 'ir.actions.client', + 'tag': 'reload', + } diff --git a/export_attachments_from_list_view/security/ir.model.access.csv b/export_attachments_from_list_view/security/ir.model.access.csv new file mode 100644 index 000000000..6c9bde309 --- /dev/null +++ b/export_attachments_from_list_view/security/ir.model.access.csv @@ -0,0 +1,3 @@ +id,name,model_id/id,group_id/id,perm_read,perm_write,perm_create,perm_unlink +access_export_attachment_user,access.export.attachment.user,model_export_attachment,base.group_user,1,1,1,1 +access_confirmation_popup_user,access.confirmation.popup.user,model_attachment_download_confirmation,base.group_user,1,1,1,1 diff --git a/export_attachments_from_list_view/static/description/assets/icons/check.png b/export_attachments_from_list_view/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/export_attachments_from_list_view/static/description/assets/icons/check.png differ diff --git a/export_attachments_from_list_view/static/description/assets/icons/chevron.png b/export_attachments_from_list_view/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/export_attachments_from_list_view/static/description/assets/icons/chevron.png differ diff --git a/export_attachments_from_list_view/static/description/assets/icons/cogs.png b/export_attachments_from_list_view/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/export_attachments_from_list_view/static/description/assets/icons/cogs.png differ diff --git a/export_attachments_from_list_view/static/description/assets/icons/consultation.png b/export_attachments_from_list_view/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/export_attachments_from_list_view/static/description/assets/icons/consultation.png differ diff --git a/export_attachments_from_list_view/static/description/assets/icons/ecom-black.png b/export_attachments_from_list_view/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/export_attachments_from_list_view/static/description/assets/icons/ecom-black.png differ diff --git a/export_attachments_from_list_view/static/description/assets/icons/education-black.png b/export_attachments_from_list_view/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/export_attachments_from_list_view/static/description/assets/icons/education-black.png differ diff --git a/export_attachments_from_list_view/static/description/assets/icons/hotel-black.png b/export_attachments_from_list_view/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/export_attachments_from_list_view/static/description/assets/icons/hotel-black.png differ diff --git a/export_attachments_from_list_view/static/description/assets/icons/license.png b/export_attachments_from_list_view/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/export_attachments_from_list_view/static/description/assets/icons/license.png differ diff --git a/export_attachments_from_list_view/static/description/assets/icons/lifebuoy.png b/export_attachments_from_list_view/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/export_attachments_from_list_view/static/description/assets/icons/lifebuoy.png differ diff --git a/export_attachments_from_list_view/static/description/assets/icons/manufacturing-black.png b/export_attachments_from_list_view/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/export_attachments_from_list_view/static/description/assets/icons/manufacturing-black.png differ diff --git a/export_attachments_from_list_view/static/description/assets/icons/pos-black.png b/export_attachments_from_list_view/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/export_attachments_from_list_view/static/description/assets/icons/pos-black.png differ diff --git a/export_attachments_from_list_view/static/description/assets/icons/puzzle.png b/export_attachments_from_list_view/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/export_attachments_from_list_view/static/description/assets/icons/puzzle.png differ diff --git a/export_attachments_from_list_view/static/description/assets/icons/restaurant-black.png b/export_attachments_from_list_view/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/export_attachments_from_list_view/static/description/assets/icons/restaurant-black.png differ diff --git a/export_attachments_from_list_view/static/description/assets/icons/service-black.png b/export_attachments_from_list_view/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/export_attachments_from_list_view/static/description/assets/icons/service-black.png differ diff --git a/export_attachments_from_list_view/static/description/assets/icons/trading-black.png b/export_attachments_from_list_view/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/export_attachments_from_list_view/static/description/assets/icons/trading-black.png differ diff --git a/export_attachments_from_list_view/static/description/assets/icons/training.png b/export_attachments_from_list_view/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/export_attachments_from_list_view/static/description/assets/icons/training.png differ diff --git a/export_attachments_from_list_view/static/description/assets/icons/update.png b/export_attachments_from_list_view/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/export_attachments_from_list_view/static/description/assets/icons/update.png differ diff --git a/export_attachments_from_list_view/static/description/assets/icons/user.png b/export_attachments_from_list_view/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/export_attachments_from_list_view/static/description/assets/icons/user.png differ diff --git a/export_attachments_from_list_view/static/description/assets/icons/wrench.png b/export_attachments_from_list_view/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/export_attachments_from_list_view/static/description/assets/icons/wrench.png differ diff --git a/export_attachments_from_list_view/static/description/assets/misc/categories.png b/export_attachments_from_list_view/static/description/assets/misc/categories.png new file mode 100644 index 000000000..bedf1e0b1 Binary files /dev/null and b/export_attachments_from_list_view/static/description/assets/misc/categories.png differ diff --git a/export_attachments_from_list_view/static/description/assets/misc/check-box.png b/export_attachments_from_list_view/static/description/assets/misc/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/export_attachments_from_list_view/static/description/assets/misc/check-box.png differ diff --git a/export_attachments_from_list_view/static/description/assets/misc/compass.png b/export_attachments_from_list_view/static/description/assets/misc/compass.png new file mode 100644 index 000000000..d5fed8faa Binary files /dev/null and b/export_attachments_from_list_view/static/description/assets/misc/compass.png differ diff --git a/export_attachments_from_list_view/static/description/assets/misc/corporate.png b/export_attachments_from_list_view/static/description/assets/misc/corporate.png new file mode 100644 index 000000000..2eb13edbf Binary files /dev/null and b/export_attachments_from_list_view/static/description/assets/misc/corporate.png differ diff --git a/export_attachments_from_list_view/static/description/assets/misc/customer-support.png b/export_attachments_from_list_view/static/description/assets/misc/customer-support.png new file mode 100644 index 000000000..79efc72ed Binary files /dev/null and b/export_attachments_from_list_view/static/description/assets/misc/customer-support.png differ diff --git a/export_attachments_from_list_view/static/description/assets/misc/cybrosys-logo.png b/export_attachments_from_list_view/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/export_attachments_from_list_view/static/description/assets/misc/cybrosys-logo.png differ diff --git a/export_attachments_from_list_view/static/description/assets/misc/features.png b/export_attachments_from_list_view/static/description/assets/misc/features.png new file mode 100644 index 000000000..b41769f77 Binary files /dev/null and b/export_attachments_from_list_view/static/description/assets/misc/features.png differ diff --git a/export_attachments_from_list_view/static/description/assets/misc/logo.png b/export_attachments_from_list_view/static/description/assets/misc/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/export_attachments_from_list_view/static/description/assets/misc/logo.png differ diff --git a/export_attachments_from_list_view/static/description/assets/misc/pictures.png b/export_attachments_from_list_view/static/description/assets/misc/pictures.png new file mode 100644 index 000000000..56d255fe9 Binary files /dev/null and b/export_attachments_from_list_view/static/description/assets/misc/pictures.png differ diff --git a/export_attachments_from_list_view/static/description/assets/misc/pie-chart.png b/export_attachments_from_list_view/static/description/assets/misc/pie-chart.png new file mode 100644 index 000000000..426e05244 Binary files /dev/null and b/export_attachments_from_list_view/static/description/assets/misc/pie-chart.png differ diff --git a/export_attachments_from_list_view/static/description/assets/misc/right-arrow.png b/export_attachments_from_list_view/static/description/assets/misc/right-arrow.png new file mode 100644 index 000000000..730984a06 Binary files /dev/null and b/export_attachments_from_list_view/static/description/assets/misc/right-arrow.png differ diff --git a/export_attachments_from_list_view/static/description/assets/misc/star.png b/export_attachments_from_list_view/static/description/assets/misc/star.png new file mode 100644 index 000000000..2eb9ab29f Binary files /dev/null and b/export_attachments_from_list_view/static/description/assets/misc/star.png differ diff --git a/export_attachments_from_list_view/static/description/assets/misc/support.png b/export_attachments_from_list_view/static/description/assets/misc/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/export_attachments_from_list_view/static/description/assets/misc/support.png differ diff --git a/export_attachments_from_list_view/static/description/assets/misc/whatsapp.png b/export_attachments_from_list_view/static/description/assets/misc/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/export_attachments_from_list_view/static/description/assets/misc/whatsapp.png differ diff --git a/export_attachments_from_list_view/static/description/assets/modules/module1.png b/export_attachments_from_list_view/static/description/assets/modules/module1.png new file mode 100644 index 000000000..55080c4c8 Binary files /dev/null and b/export_attachments_from_list_view/static/description/assets/modules/module1.png differ diff --git a/export_attachments_from_list_view/static/description/assets/modules/module2.png b/export_attachments_from_list_view/static/description/assets/modules/module2.png new file mode 100644 index 000000000..6745a5f19 Binary files /dev/null and b/export_attachments_from_list_view/static/description/assets/modules/module2.png differ diff --git a/export_attachments_from_list_view/static/description/assets/modules/module3.png b/export_attachments_from_list_view/static/description/assets/modules/module3.png new file mode 100644 index 000000000..bb4af0b9a Binary files /dev/null and b/export_attachments_from_list_view/static/description/assets/modules/module3.png differ diff --git a/export_attachments_from_list_view/static/description/assets/modules/module4.png b/export_attachments_from_list_view/static/description/assets/modules/module4.png new file mode 100644 index 000000000..3cbfde746 Binary files /dev/null and b/export_attachments_from_list_view/static/description/assets/modules/module4.png differ diff --git a/export_attachments_from_list_view/static/description/assets/modules/module5.png b/export_attachments_from_list_view/static/description/assets/modules/module5.png new file mode 100644 index 000000000..4b1c4864a Binary files /dev/null and b/export_attachments_from_list_view/static/description/assets/modules/module5.png differ diff --git a/export_attachments_from_list_view/static/description/assets/modules/module6.png b/export_attachments_from_list_view/static/description/assets/modules/module6.png new file mode 100644 index 000000000..d0f506e82 Binary files /dev/null and b/export_attachments_from_list_view/static/description/assets/modules/module6.png differ diff --git a/export_attachments_from_list_view/static/description/assets/screenshots/1.png b/export_attachments_from_list_view/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..456103b28 Binary files /dev/null and b/export_attachments_from_list_view/static/description/assets/screenshots/1.png differ diff --git a/export_attachments_from_list_view/static/description/assets/screenshots/2.png b/export_attachments_from_list_view/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..748d37059 Binary files /dev/null and b/export_attachments_from_list_view/static/description/assets/screenshots/2.png differ diff --git a/export_attachments_from_list_view/static/description/assets/screenshots/3.png b/export_attachments_from_list_view/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..9b75f4803 Binary files /dev/null and b/export_attachments_from_list_view/static/description/assets/screenshots/3.png differ diff --git a/export_attachments_from_list_view/static/description/assets/screenshots/4.png b/export_attachments_from_list_view/static/description/assets/screenshots/4.png new file mode 100644 index 000000000..649fe972e Binary files /dev/null and b/export_attachments_from_list_view/static/description/assets/screenshots/4.png differ diff --git a/export_attachments_from_list_view/static/description/assets/screenshots/5.png b/export_attachments_from_list_view/static/description/assets/screenshots/5.png new file mode 100644 index 000000000..f85f45c8a Binary files /dev/null and b/export_attachments_from_list_view/static/description/assets/screenshots/5.png differ diff --git a/export_attachments_from_list_view/static/description/assets/screenshots/6.png b/export_attachments_from_list_view/static/description/assets/screenshots/6.png new file mode 100644 index 000000000..f1dc68cff Binary files /dev/null and b/export_attachments_from_list_view/static/description/assets/screenshots/6.png differ diff --git a/export_attachments_from_list_view/static/description/assets/screenshots/7.png b/export_attachments_from_list_view/static/description/assets/screenshots/7.png new file mode 100644 index 000000000..a467756c6 Binary files /dev/null and b/export_attachments_from_list_view/static/description/assets/screenshots/7.png differ diff --git a/export_attachments_from_list_view/static/description/assets/screenshots/8.png b/export_attachments_from_list_view/static/description/assets/screenshots/8.png new file mode 100644 index 000000000..6bd343f68 Binary files /dev/null and b/export_attachments_from_list_view/static/description/assets/screenshots/8.png differ diff --git a/export_attachments_from_list_view/static/description/assets/screenshots/9.png b/export_attachments_from_list_view/static/description/assets/screenshots/9.png new file mode 100644 index 000000000..de7ba6f9a Binary files /dev/null and b/export_attachments_from_list_view/static/description/assets/screenshots/9.png differ diff --git a/export_attachments_from_list_view/static/description/assets/screenshots/hero.gif b/export_attachments_from_list_view/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..f76279179 Binary files /dev/null and b/export_attachments_from_list_view/static/description/assets/screenshots/hero.gif differ diff --git a/export_attachments_from_list_view/static/description/banner.jpg b/export_attachments_from_list_view/static/description/banner.jpg new file mode 100644 index 000000000..de99adf1c Binary files /dev/null and b/export_attachments_from_list_view/static/description/banner.jpg differ diff --git a/export_attachments_from_list_view/static/description/icon.png b/export_attachments_from_list_view/static/description/icon.png new file mode 100644 index 000000000..8c79e20db Binary files /dev/null and b/export_attachments_from_list_view/static/description/icon.png differ diff --git a/export_attachments_from_list_view/static/description/index.html b/export_attachments_from_list_view/static/description/index.html new file mode 100644 index 000000000..5d103d6f9 --- /dev/null +++ b/export_attachments_from_list_view/static/description/index.html @@ -0,0 +1,654 @@ +
+ +
+ +
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+ +
+
+
+ +

+ Export Attachments From List View +

+

+ Can Export Attachment from List View in the Whole Odoo Model by Using Dynamic Actions. +

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

+ Explore This + Module

+
+ + + +
+
+ +
+

+ Overview +

+
+
+
+ When using dynamic functionality in this model, the module can be used + to + quickly download the documents in multiple records. Documents related to + documents and other attachments are attached to the selected records + that's downloaded quickly. + Usually, we need to open each document separately to download the + attachment within a record, which is very time-consuming and tedious. + But that problem can be overcome with this module. Here, selecting + multiple records can download attachments. +
+
+ + +
+
+ +
+

+ Features +

+
+
+
+
+ + Community & + Enterprise Support. +
+
+ + You can download the documents in multiple records in a single click. +
+
+ + You can apply Dynamic Action in the particular models. + +
+
+ + You can download all Attachment in zip format. + +
+
+ + You can add this action in different models in odoo. + +
+
+ + No special configuration required just install + it and cheers! + +
+
+
+ + +
+
+ +
+

+ Screenshots +

+
+
+
+ +
+

+ Setting a session and field inside the Configuration Settings. +

+

+ Go to Settings, + Under the Companies session we can see the Dynamic Action + Export Attachment From List View link to create the action. +

+ +
+
+

+ Action Creation +

+

+ Add an action name and select the model in which you + want to apply. + After that, press "CREATE ACTION" to add this action to the + model. +

+ +
+
+

+ After Action Creation. +

+

+ After Action creation, the state is changed to 'RUNNING'. + If you want to remove the Action, just click the "REMOVE ACTION" button to delete the Action.

+ +
+
+

+ After deleting the Action. +

+

+ After clicking "REMOVE ACTION" button the action removed and the state changed to the 'CANCELLED'. +

+ +
+
+

+ Attachments +

+

+ Add attachments +

+ + +
+
+

+ Action +

+

+ Select the records and clicking the action for downloading + attachment. +

+ +
+
+

+ Confirmation Popup Wizard. +

+

+ After clicking the action it show the popup message to confirm + the download. +

+ +
+
+

+ Attachment Downloaded. +

+

+ Here we can see the downloaded attachments in zip format. +

+ +
+
+
+ + +
+
+ +
+

+ Related + Products +

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

Our Services +

+
+
+
+
+
+ +
+
+ Odoo + Customization
+
+
+
+ +
+
+ Odoo + Implementation
+
+
+
+ +
+
+ Odoo + Support
+
+
+
+ +
+
+ Hire + Odoo + Developer
+
+ +
+
+ +
+
+ Odoo + Integration
+
+
+
+ +
+
+ Odoo + Migration
+
+
+
+ +
+
+ Odoo + Consultancy
+
+
+
+ +
+
+ Odoo + Implementation
+
+
+
+ +
+
+ Odoo + Licensing Consultancy
+
+
+
+ + + +
+
+ +
+

Our + Industries +

+
+
+
+
+
+ +
+ Trading +
+

+ Easily procure + and + sell your products

+
+
+
+
+ +
+ POS +
+

+ Easy + configuration + and convivial experience

+
+
+
+
+ +
+ Education +
+

+ A platform for + educational management

+
+
+
+
+ +
+ Manufacturing +
+

+ Plan, track and + schedule your operations

+
+
+
+
+ +
+ E-commerce & Website +
+

+ Mobile + friendly, + awe-inspiring product pages

+
+
+
+
+ +
+ Service Management +
+

+ Keep track of + services and invoice

+
+
+
+
+ +
+ Restaurant +
+

+ Run your bar or + restaurant methodically

+
+
+
+
+ +
+ Hotel Management +
+

+ An + all-inclusive + hotel management application

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

Support +

+
+
+
+
+
+
+ +
+
+

Need Help?

+

Got questions or need help? Get in touch.

+ +

+ odoo@cybrosys.com

+
+
+
+
+
+
+
+ +
+
+

WhatsApp

+

Say hi to us on WhatsApp!

+ +

+91 86068 + 27707

+
+
+
+
+
+
+
+ +
+
+
+ diff --git a/export_attachments_from_list_view/views/export_attachment_views.xml b/export_attachments_from_list_view/views/export_attachment_views.xml new file mode 100644 index 000000000..d99bac97d --- /dev/null +++ b/export_attachments_from_list_view/views/export_attachment_views.xml @@ -0,0 +1,55 @@ + + + + + Export Attachment + ir.actions.act_window + export.attachment + tree,form + +

+ Click to add the followers dynamic action +

+
+
+ + + export.attachment.view.form + export.attachment + +
+
+
+ + + + + + + + + +
+
+
+ + + export.attachment.view.tree + export.attachment + + + + + + + +
diff --git a/export_attachments_from_list_view/views/res_config_settings_views.xml b/export_attachments_from_list_view/views/res_config_settings_views.xml new file mode 100644 index 000000000..5b16fb0a9 --- /dev/null +++ b/export_attachments_from_list_view/views/res_config_settings_views.xml @@ -0,0 +1,32 @@ + + + + + res.config.settings.view.form.inherit.export.attachments.from.list.view + res.config.settings + + + +
+
+
+
+
+ Create a Dynamic Action +
+
+
+
+
+
+ + + + diff --git a/export_attachments_from_list_view/wizard/__init__.py b/export_attachments_from_list_view/wizard/__init__.py new file mode 100644 index 000000000..cf70f9710 --- /dev/null +++ b/export_attachments_from_list_view/wizard/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Mohammed Dilshad Tk (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 attachment_download_confirmation diff --git a/export_attachments_from_list_view/wizard/attachment_download_confirmation.py b/export_attachments_from_list_view/wizard/attachment_download_confirmation.py new file mode 100644 index 000000000..40387a08c --- /dev/null +++ b/export_attachments_from_list_view/wizard/attachment_download_confirmation.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Mohammed Dilshad Tk (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################### +from odoo import models +from odoo.exceptions import ValidationError + + +class AttachmentDownloadConfirmation(models.TransientModel): + """It displays a confirmation user input popup regardless of the attachment. + download or not.""" + _name = 'attachment.download.confirmation' + _description = 'Confirmation Popup' + + def action_download_attachment(self): + """Method to Download the attachment""" + record_ids = self.env.context.get('active_ids', []) + record_model = self.env.context.get('active_model') + attachments = self.env['ir.attachment'].search([ + ('res_model', '=', record_model), + ('res_id', '=', record_ids)]) + if not attachments: + raise ValidationError("No attachments found in the selected " + "records.") + else: + url = '/web/binary/download_document?tab_id=%s' % attachments.ids + return { + 'type': 'ir.actions.act_url', + 'url': url, + 'target': 'new', + } diff --git a/export_attachments_from_list_view/wizard/attachment_download_confirmation_views.xml b/export_attachments_from_list_view/wizard/attachment_download_confirmation_views.xml new file mode 100644 index 000000000..e73d63da2 --- /dev/null +++ b/export_attachments_from_list_view/wizard/attachment_download_confirmation_views.xml @@ -0,0 +1,20 @@ + + + + + attachment.download.confirmation.view.form + attachment.download.confirmation + +
+

Are you sure you want to download all the attachments?

+ +
+
+
+