diff --git a/export_attachments_from_list_view/README.rst b/export_attachments_from_list_view/README.rst new file mode 100644 index 000000000..157874790 --- /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 : (V17) 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..7c2fa9538 --- /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': '17.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..bd09534f6 --- /dev/null +++ b/export_attachments_from_list_view/doc/RELEASE_NOTES.md @@ -0,0 +1,7 @@ +## Module + +#### 17.04.2024 +#### Version 17.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/cogs.png b/export_attachments_from_list_view/static/description/assets/icons/cogs.png new file mode 100755 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 100755 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 100755 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 100755 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 100755 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 100755 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 100755 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 100755 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 100755 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 100755 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 100755 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 100755 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 100755 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 100755 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 100755 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 100755 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 100755 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/Cybrosys R.png b/export_attachments_from_list_view/static/description/assets/misc/Cybrosys R.png new file mode 100644 index 000000000..da4058087 Binary files /dev/null and b/export_attachments_from_list_view/static/description/assets/misc/Cybrosys R.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 100755 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 100755 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 100755 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/config.png b/export_attachments_from_list_view/static/description/assets/misc/config.png new file mode 100755 index 000000000..71915e76c Binary files /dev/null and b/export_attachments_from_list_view/static/description/assets/misc/config.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 100755 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 100755 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/features.png b/export_attachments_from_list_view/static/description/assets/misc/features.png new file mode 100755 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..cc3cc0ccf 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 100755 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 100755 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 100755 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 100755 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 100755 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 100755 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/1.gif b/export_attachments_from_list_view/static/description/assets/modules/1.gif new file mode 100644 index 000000000..ae3a880a2 Binary files /dev/null and b/export_attachments_from_list_view/static/description/assets/modules/1.gif differ diff --git a/export_attachments_from_list_view/static/description/assets/modules/1.png b/export_attachments_from_list_view/static/description/assets/modules/1.png new file mode 100644 index 000000000..d0f36b007 Binary files /dev/null and b/export_attachments_from_list_view/static/description/assets/modules/1.png differ diff --git a/export_attachments_from_list_view/static/description/assets/modules/2.png b/export_attachments_from_list_view/static/description/assets/modules/2.png new file mode 100644 index 000000000..8513873ea Binary files /dev/null and b/export_attachments_from_list_view/static/description/assets/modules/2.png differ diff --git a/export_attachments_from_list_view/static/description/assets/modules/3.png b/export_attachments_from_list_view/static/description/assets/modules/3.png new file mode 100644 index 000000000..cb17cf612 Binary files /dev/null and b/export_attachments_from_list_view/static/description/assets/modules/3.png differ diff --git a/export_attachments_from_list_view/static/description/assets/modules/4.jpg b/export_attachments_from_list_view/static/description/assets/modules/4.jpg new file mode 100644 index 000000000..67c7f7062 Binary files /dev/null and b/export_attachments_from_list_view/static/description/assets/modules/4.jpg differ diff --git a/export_attachments_from_list_view/static/description/assets/modules/5.jpg b/export_attachments_from_list_view/static/description/assets/modules/5.jpg new file mode 100644 index 000000000..5141a7802 Binary files /dev/null and b/export_attachments_from_list_view/static/description/assets/modules/5.jpg differ diff --git a/export_attachments_from_list_view/static/description/assets/modules/6.png b/export_attachments_from_list_view/static/description/assets/modules/6.png new file mode 100644 index 000000000..0e311ca87 Binary files /dev/null and b/export_attachments_from_list_view/static/description/assets/modules/6.png differ diff --git a/export_attachments_from_list_view/static/description/assets/modules/l2.png b/export_attachments_from_list_view/static/description/assets/modules/l2.png new file mode 100644 index 000000000..f40a0756d Binary files /dev/null and b/export_attachments_from_list_view/static/description/assets/modules/l2.png differ diff --git a/export_attachments_from_list_view/static/description/assets/modules/l3.png b/export_attachments_from_list_view/static/description/assets/modules/l3.png new file mode 100644 index 000000000..5738a486e Binary files /dev/null and b/export_attachments_from_list_view/static/description/assets/modules/l3.png differ diff --git a/export_attachments_from_list_view/static/description/assets/modules/l4.png b/export_attachments_from_list_view/static/description/assets/modules/l4.png new file mode 100644 index 000000000..8d99e8c68 Binary files /dev/null and b/export_attachments_from_list_view/static/description/assets/modules/l4.png differ diff --git a/export_attachments_from_list_view/static/description/assets/modules/l5.png b/export_attachments_from_list_view/static/description/assets/modules/l5.png new file mode 100644 index 000000000..3415917c2 Binary files /dev/null and b/export_attachments_from_list_view/static/description/assets/modules/l5.png differ diff --git a/export_attachments_from_list_view/static/description/assets/modules/l6.png b/export_attachments_from_list_view/static/description/assets/modules/l6.png new file mode 100644 index 000000000..c7ea331ee Binary files /dev/null and b/export_attachments_from_list_view/static/description/assets/modules/l6.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..0a887af5e 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..54bb4b4f0 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..7d70471fc 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..6fa3bd3e8 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..7bb6205d2 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..de4ad1339 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..12e97e5f2 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..876aa7062 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..6efcf5c10 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..509bf14f2 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..0186509fe 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..dc59e35aa 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 100755 index 000000000..77201b1db --- /dev/null +++ b/export_attachments_from_list_view/static/description/index.html @@ -0,0 +1,845 @@ + + + + + + Export Attachments From List View + + + + + + + + +
+
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+
+
+
+

+ Export Attachments From List View

+

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

+
+ +
+
+
+
+
+

+ Key Highlights +

+
+
+
+
+
+ +
+
+

+ 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.

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

+ 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. +

+
+
+ +
+
+
+
+
+
+
    +
  • + Import CSV File + Format. +
  • +
  • + Import XLSX File + Format. +
  • +
  • + Import OFX File + Format. +
  • +
  • + Import QIF File + Format. +
  • +
+
+
+
+
+
+
Version + 17.0.1.0.0|Released on:9th April 2024 +
+

+ Initial commit for Export Attachments From List + View

+
+
+
+
+
+
+
+

+ Related Products

+
+
+ +
+
+

+ Our Services

+ +
+
+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Customization

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Implementation

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Support

+
+
+
+
+
+
+ service-icon +
+
+

Hire + Odoo Developer

+
+
+
+
+ +
+
+ service-icon +
+
+

Odoo + Integration

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Migration

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Consultancy

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Implementation

+
+
+
+
+
+
+ service-icon +
+
+

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 + 99456767686 +
+
+
+
+
+
+
+
+
+ + + + + + \ No newline at end of file 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..8d177345d --- /dev/null +++ b/export_attachments_from_list_view/views/export_attachment_views.xml @@ -0,0 +1,52 @@ + + + + + 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..8e4c12185 --- /dev/null +++ b/export_attachments_from_list_view/views/res_config_settings_views.xml @@ -0,0 +1,36 @@ + + + + + + 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?

+ +
+
+
+