diff --git a/product_export_with_images/README.rst b/product_export_with_images/README.rst new file mode 100644 index 000000000..9f9932d81 --- /dev/null +++ b/product_export_with_images/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 Product Images +===================== +To export product images as an excel file along with other details. + +Configuration +============= +* No additional configuration required. + +License +------- +GNU Affero General Public License v3.0 (AGPL v3) +(https://www.gnu.org/licenses/agpl-3.0-standalone.html) + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +* Developers: (V16) Ajmunnisa KP, 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/product_export_with_images/__init__.py b/product_export_with_images/__init__.py new file mode 100644 index 000000000..f45da6210 --- /dev/null +++ b/product_export_with_images/__init__.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# This program is free software: you can modify +# it under the terms of the GNU Affero General Public License (AGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# 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 for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################# +from . import controllers +from . import wizard diff --git a/product_export_with_images/__manifest__.py b/product_export_with_images/__manifest__.py new file mode 100644 index 000000000..34a2a6b08 --- /dev/null +++ b/product_export_with_images/__manifest__.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# This program is free software: you can modify +# it under the terms of the GNU Affero General Public License (AGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# 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 for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################# +{ + "name": "Export Product Images", + "version": "16.0.1.0.0", + "category": "Inventory", + "summary": """To export product details along with the product images""", + "description": "The allowed users can download the product details " + "along with the product images", + "author": "Cybrosys Techno Solutions", + "website": "https://www.cybrosys.com", + "company": "Cybrosys Techno Solutions", + "maintainer": "Cybrosys Techno Solutions", + "depends": ["stock", "product", "web"], + "data": [ + "security/product_export_with_images_groups.xml", + "security/ir.model.access.csv", + "data/product_export_with_images_data.xml", + ], + "images": ["static/description/banner.png"], + "license": "AGPL-3", + "installable": True, + "auto_install": False, + "application": False, +} diff --git a/product_export_with_images/controllers/__init__.py b/product_export_with_images/controllers/__init__.py new file mode 100644 index 000000000..71fac1e03 --- /dev/null +++ b/product_export_with_images/controllers/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# This program is free software: you can modify +# it under the terms of the GNU Affero General Public License (AGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# 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 for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################# +from . import product_export_with_images diff --git a/product_export_with_images/controllers/product_export_with_images.py b/product_export_with_images/controllers/product_export_with_images.py new file mode 100644 index 000000000..9ffc6a344 --- /dev/null +++ b/product_export_with_images/controllers/product_export_with_images.py @@ -0,0 +1,132 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# This program is free software: you can modify +# it under the terms of the GNU Affero General Public License (AGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# 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 for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################# +import base64 +import io +import xlsxwriter +from io import BytesIO +from odoo import http +from odoo.http import content_disposition, request +from odoo.tools import image_process + + +class ExcelReportController(http.Controller): + """ + This class includes the function to downloads excel report. + """ + + @http.route( + [ + '/products_download/excel_report/', + ], + type="http", + auth="public", + csrf=False, + ) + def get_product_excel_report(self, wizards=None): + """ + Downloads the Excel document with the details of products + """ + response = request.make_response( + None, + headers=[ + ("Content-Type", "application/vnd.ms-excel"), + ("Content-Disposition", content_disposition("Products" + ".xlsx")), + ], + ) + # create workbook object from xlsxwriter library + output = io.BytesIO() + workbook = xlsxwriter.Workbook(output, {"in_memory": True}) + # create styles to set up the font type, the font size, the border, + # and the alignment + header_style = workbook.add_format( + { + "text_wrap": True, + "font_name": "Times", + "bold": True, + "left": 1, + "bottom": 1, + "right": 1, + "top": 1, + "align": "center", + } + ) + text_style = workbook.add_format( + { + "text_wrap": True, + "font_name": "Times", + "left": 1, + "bottom": 1, + "right": 1, + "top": 1, + "align": "left", + } + ) + product_lines = wizards.get_product_lines() + sheet = workbook.add_worksheet("Products") + sheet.set_landscape() + sheet.set_paper(9) + sheet.merge_range("A1:G1", "PRODUCTS", header_style) + sheet.set_margins(0.5, 0.5, 0.5, 0.5) + sheet.set_column("A:A", 5) + sheet.set_column("B:F", 15) + sheet.set_column("G:G", 20) + sheet.set_row(1, 30) + sheet.set_row(0, 30) + # table title + sheet.write(2, 0, "ID", header_style) + sheet.write(2, 1, "Internal Reference", header_style) + sheet.write(2, 2, "Name", header_style) + sheet.write(2, 3, "Cost", header_style) + sheet.write(2, 4, "Sales Price", header_style) + sheet.write(2, 5, "Product Category", header_style) + sheet.write(2, 6, "Image", header_style) + row = 3 + number = 1 + count = 0 + for line in product_lines: + sheet.set_row(row, 128) + # the report content + count += 1 + sheet.write(row, 0, count, text_style) + if line["internal_reference"]: + sheet.write(row, 1, line["internal_reference"], text_style) + elif not line["internal_reference"]: + sheet.write(row, 1, "", text_style) + sheet.write(row, 2, line["name"], text_style) + sheet.write(row, 3, str(line["currency"]) + str(line["cost"]), text_style) + sheet.write( + row, 4, str(line["currency"]) + str(line["sales_price"]), text_style + ) + sheet.write(row, 5, line["category"], text_style) + if line["image"]: + source = base64.b64decode(line["image"]) + image_data = BytesIO(image_process(source, size=(300, 300))) + sheet.write(row, 6, "", text_style) + sheet.insert_image(row, 6, "product.png", {"image_data": image_data}) + row += 1 + number += 1 + workbook.close() + output.seek(0) + response.stream.write(output.read()) + output.close() + return response diff --git a/product_export_with_images/data/product_export_with_images_data.xml b/product_export_with_images/data/product_export_with_images_data.xml new file mode 100644 index 000000000..9748caff5 --- /dev/null +++ b/product_export_with_images/data/product_export_with_images_data.xml @@ -0,0 +1,35 @@ + + + + + + Export Product Images + + + form,tree + code + + action = model.action_export_products() + + + + + + + Export Product Images + + + form,tree + code + + action = model.action_export_products() + + + + + diff --git a/product_export_with_images/doc/RELEASE_NOTES.md b/product_export_with_images/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..285b32354 --- /dev/null +++ b/product_export_with_images/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 23.11.2023 +#### Version 16.0.1.0.0 +#### ADD +- Initial commit for Export Product Images diff --git a/product_export_with_images/security/ir.model.access.csv b/product_export_with_images/security/ir.model.access.csv new file mode 100644 index 000000000..43a12139a --- /dev/null +++ b/product_export_with_images/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_product_export_user,access.product.export.user,model_product_export,product_export_with_images.group_product_export,1,1,1,1 diff --git a/product_export_with_images/security/product_export_with_images_groups.xml b/product_export_with_images/security/product_export_with_images_groups.xml new file mode 100644 index 000000000..d427f612c --- /dev/null +++ b/product_export_with_images/security/product_export_with_images_groups.xml @@ -0,0 +1,8 @@ + + + + + Export products Images + + + diff --git a/product_export_with_images/static/description/assets/icons/cogs.png b/product_export_with_images/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/product_export_with_images/static/description/assets/icons/cogs.png differ diff --git a/product_export_with_images/static/description/assets/icons/consultation.png b/product_export_with_images/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/product_export_with_images/static/description/assets/icons/consultation.png differ diff --git a/product_export_with_images/static/description/assets/icons/ecom-black.png b/product_export_with_images/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/product_export_with_images/static/description/assets/icons/ecom-black.png differ diff --git a/product_export_with_images/static/description/assets/icons/education-black.png b/product_export_with_images/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/product_export_with_images/static/description/assets/icons/education-black.png differ diff --git a/product_export_with_images/static/description/assets/icons/hotel-black.png b/product_export_with_images/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/product_export_with_images/static/description/assets/icons/hotel-black.png differ diff --git a/product_export_with_images/static/description/assets/icons/license.png b/product_export_with_images/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/product_export_with_images/static/description/assets/icons/license.png differ diff --git a/product_export_with_images/static/description/assets/icons/lifebuoy.png b/product_export_with_images/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/product_export_with_images/static/description/assets/icons/lifebuoy.png differ diff --git a/product_export_with_images/static/description/assets/icons/logo.png b/product_export_with_images/static/description/assets/icons/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/product_export_with_images/static/description/assets/icons/logo.png differ diff --git a/product_export_with_images/static/description/assets/icons/manufacturing-black.png b/product_export_with_images/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/product_export_with_images/static/description/assets/icons/manufacturing-black.png differ diff --git a/product_export_with_images/static/description/assets/icons/pos-black.png b/product_export_with_images/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/product_export_with_images/static/description/assets/icons/pos-black.png differ diff --git a/product_export_with_images/static/description/assets/icons/puzzle.png b/product_export_with_images/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/product_export_with_images/static/description/assets/icons/puzzle.png differ diff --git a/product_export_with_images/static/description/assets/icons/restaurant-black.png b/product_export_with_images/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/product_export_with_images/static/description/assets/icons/restaurant-black.png differ diff --git a/product_export_with_images/static/description/assets/icons/service-black.png b/product_export_with_images/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/product_export_with_images/static/description/assets/icons/service-black.png differ diff --git a/product_export_with_images/static/description/assets/icons/tiny-star.png b/product_export_with_images/static/description/assets/icons/tiny-star.png new file mode 100644 index 000000000..3205e6e0c Binary files /dev/null and b/product_export_with_images/static/description/assets/icons/tiny-star.png differ diff --git a/product_export_with_images/static/description/assets/icons/trading-black.png b/product_export_with_images/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/product_export_with_images/static/description/assets/icons/trading-black.png differ diff --git a/product_export_with_images/static/description/assets/icons/training.png b/product_export_with_images/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/product_export_with_images/static/description/assets/icons/training.png differ diff --git a/product_export_with_images/static/description/assets/icons/update.png b/product_export_with_images/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/product_export_with_images/static/description/assets/icons/update.png differ diff --git a/product_export_with_images/static/description/assets/icons/user.png b/product_export_with_images/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/product_export_with_images/static/description/assets/icons/user.png differ diff --git a/product_export_with_images/static/description/assets/icons/wrench.png b/product_export_with_images/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/product_export_with_images/static/description/assets/icons/wrench.png differ diff --git a/product_export_with_images/static/description/assets/misc/categories.png b/product_export_with_images/static/description/assets/misc/categories.png new file mode 100644 index 000000000..bedf1e0b1 Binary files /dev/null and b/product_export_with_images/static/description/assets/misc/categories.png differ diff --git a/product_export_with_images/static/description/assets/misc/check-box.png b/product_export_with_images/static/description/assets/misc/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/product_export_with_images/static/description/assets/misc/check-box.png differ diff --git a/product_export_with_images/static/description/assets/misc/compass.png b/product_export_with_images/static/description/assets/misc/compass.png new file mode 100644 index 000000000..d5fed8faa Binary files /dev/null and b/product_export_with_images/static/description/assets/misc/compass.png differ diff --git a/product_export_with_images/static/description/assets/misc/corporate.png b/product_export_with_images/static/description/assets/misc/corporate.png new file mode 100644 index 000000000..2eb13edbf Binary files /dev/null and b/product_export_with_images/static/description/assets/misc/corporate.png differ diff --git a/product_export_with_images/static/description/assets/misc/customer-support.png b/product_export_with_images/static/description/assets/misc/customer-support.png new file mode 100644 index 000000000..79efc72ed Binary files /dev/null and b/product_export_with_images/static/description/assets/misc/customer-support.png differ diff --git a/product_export_with_images/static/description/assets/misc/cybrosys-logo.png b/product_export_with_images/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/product_export_with_images/static/description/assets/misc/cybrosys-logo.png differ diff --git a/product_export_with_images/static/description/assets/misc/features.png b/product_export_with_images/static/description/assets/misc/features.png new file mode 100644 index 000000000..b41769f77 Binary files /dev/null and b/product_export_with_images/static/description/assets/misc/features.png differ diff --git a/product_export_with_images/static/description/assets/misc/logo.png b/product_export_with_images/static/description/assets/misc/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/product_export_with_images/static/description/assets/misc/logo.png differ diff --git a/product_export_with_images/static/description/assets/misc/pictures.png b/product_export_with_images/static/description/assets/misc/pictures.png new file mode 100644 index 000000000..56d255fe9 Binary files /dev/null and b/product_export_with_images/static/description/assets/misc/pictures.png differ diff --git a/product_export_with_images/static/description/assets/misc/pie-chart.png b/product_export_with_images/static/description/assets/misc/pie-chart.png new file mode 100644 index 000000000..426e05244 Binary files /dev/null and b/product_export_with_images/static/description/assets/misc/pie-chart.png differ diff --git a/product_export_with_images/static/description/assets/misc/right-arrow.png b/product_export_with_images/static/description/assets/misc/right-arrow.png new file mode 100644 index 000000000..730984a06 Binary files /dev/null and b/product_export_with_images/static/description/assets/misc/right-arrow.png differ diff --git a/product_export_with_images/static/description/assets/misc/star.png b/product_export_with_images/static/description/assets/misc/star.png new file mode 100644 index 000000000..2eb9ab29f Binary files /dev/null and b/product_export_with_images/static/description/assets/misc/star.png differ diff --git a/product_export_with_images/static/description/assets/misc/support.png b/product_export_with_images/static/description/assets/misc/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/product_export_with_images/static/description/assets/misc/support.png differ diff --git a/product_export_with_images/static/description/assets/misc/whatsapp.png b/product_export_with_images/static/description/assets/misc/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/product_export_with_images/static/description/assets/misc/whatsapp.png differ diff --git a/product_export_with_images/static/description/assets/modules/1.png b/product_export_with_images/static/description/assets/modules/1.png new file mode 100644 index 000000000..05f58a9b2 Binary files /dev/null and b/product_export_with_images/static/description/assets/modules/1.png differ diff --git a/product_export_with_images/static/description/assets/modules/2.png b/product_export_with_images/static/description/assets/modules/2.png new file mode 100644 index 000000000..33372bdc1 Binary files /dev/null and b/product_export_with_images/static/description/assets/modules/2.png differ diff --git a/product_export_with_images/static/description/assets/modules/3.png b/product_export_with_images/static/description/assets/modules/3.png new file mode 100644 index 000000000..99298bf4b Binary files /dev/null and b/product_export_with_images/static/description/assets/modules/3.png differ diff --git a/product_export_with_images/static/description/assets/modules/4.gif b/product_export_with_images/static/description/assets/modules/4.gif new file mode 100644 index 000000000..beb106101 Binary files /dev/null and b/product_export_with_images/static/description/assets/modules/4.gif differ diff --git a/product_export_with_images/static/description/assets/modules/5.png b/product_export_with_images/static/description/assets/modules/5.png new file mode 100644 index 000000000..42d7af8e6 Binary files /dev/null and b/product_export_with_images/static/description/assets/modules/5.png differ diff --git a/product_export_with_images/static/description/assets/modules/6.png b/product_export_with_images/static/description/assets/modules/6.png new file mode 100644 index 000000000..f088c60a2 Binary files /dev/null and b/product_export_with_images/static/description/assets/modules/6.png differ diff --git a/product_export_with_images/static/description/assets/screenshots/1_export_access.png b/product_export_with_images/static/description/assets/screenshots/1_export_access.png new file mode 100644 index 000000000..517adc9c4 Binary files /dev/null and b/product_export_with_images/static/description/assets/screenshots/1_export_access.png differ diff --git a/product_export_with_images/static/description/assets/screenshots/2_export_option.png b/product_export_with_images/static/description/assets/screenshots/2_export_option.png new file mode 100644 index 000000000..515c49347 Binary files /dev/null and b/product_export_with_images/static/description/assets/screenshots/2_export_option.png differ diff --git a/product_export_with_images/static/description/assets/screenshots/3_excel_export.png b/product_export_with_images/static/description/assets/screenshots/3_excel_export.png new file mode 100644 index 000000000..53f6af1e9 Binary files /dev/null and b/product_export_with_images/static/description/assets/screenshots/3_excel_export.png differ diff --git a/product_export_with_images/static/description/assets/screenshots/4_export_single_item.png b/product_export_with_images/static/description/assets/screenshots/4_export_single_item.png new file mode 100644 index 000000000..689fddf88 Binary files /dev/null and b/product_export_with_images/static/description/assets/screenshots/4_export_single_item.png differ diff --git a/product_export_with_images/static/description/assets/screenshots/5_export_product_variants.png b/product_export_with_images/static/description/assets/screenshots/5_export_product_variants.png new file mode 100644 index 000000000..60b52214c Binary files /dev/null and b/product_export_with_images/static/description/assets/screenshots/5_export_product_variants.png differ diff --git a/product_export_with_images/static/description/assets/screenshots/hero.gif b/product_export_with_images/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..07567f928 Binary files /dev/null and b/product_export_with_images/static/description/assets/screenshots/hero.gif differ diff --git a/product_export_with_images/static/description/banner.png b/product_export_with_images/static/description/banner.png new file mode 100644 index 000000000..681ba60cd Binary files /dev/null and b/product_export_with_images/static/description/banner.png differ diff --git a/product_export_with_images/static/description/icon.png b/product_export_with_images/static/description/icon.png new file mode 100644 index 000000000..170c2845c Binary files /dev/null and b/product_export_with_images/static/description/icon.png differ diff --git a/product_export_with_images/static/description/index.html b/product_export_with_images/static/description/index.html new file mode 100644 index 000000000..2e0a2afec --- /dev/null +++ b/product_export_with_images/static/description/index.html @@ -0,0 +1,669 @@ +
+ +
+ +
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+ +
+
+
+ +

+ Export Product Images

+

+ Users can Export Product Images in an Excel Sheet along + with Other Product Details.

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

+ Explore This + Module

+
+ + + + +
+
+ +
+

+ Overview +

+
+
+
+ This module helps you to export the product images along with other + details on an Excel sheet. +
+
+ + + +
+
+ +
+

+ Features +

+
+
+
+
+ + Only allowed users can export Product Images. +
+
+ + The users can export images of both Products and Product Variants +
+
+ + The exported Excel sheet contains other details like product reference code, cost, sales price and category name. +
+
+ + Export image option is available for both single and multiple products selected. +
+ +
+
+ +
+ + High Scalability. +
+
+
+ + + +
+
+ +
+

+ Screenshots +

+
+
+
+ +
+

+ Give access to export the product images. +

+

+ Settings -> Users & Companies -> Users -> Enable 'Export Product + Images' option

+ +
+ +
+

+ Export the details of selected products with images from the + list view. +

+ +
+ +
+

+ The Downloaded Excel Sheet with product details with + images.

+ +
+ +
+

+ You can Export the image of a product from its form view. +

+ +
+
+

+ You can Export the images of product variants also . +

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

+ 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

+
+
+
+
+
+
+
+ +
+
+
+ \ No newline at end of file diff --git a/product_export_with_images/wizard/__init__.py b/product_export_with_images/wizard/__init__.py new file mode 100644 index 000000000..def97c91c --- /dev/null +++ b/product_export_with_images/wizard/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# This program is free software: you can modify +# it under the terms of the GNU Affero General Public License (AGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# 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 for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################# +from . import product_export diff --git a/product_export_with_images/wizard/product_export.py b/product_export_with_images/wizard/product_export.py new file mode 100644 index 000000000..7cb81ed32 --- /dev/null +++ b/product_export_with_images/wizard/product_export.py @@ -0,0 +1,90 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# This program is free software: you can modify +# it under the terms of the GNU Affero General Public License (AGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# 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 for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################# +from odoo import fields, models + + +class ExportWizard(models.TransientModel): + """This class contains the functions to get selected product ids and + redirect to excel download URL . + Methods: + action_export_products(): + calls URL action to download excel report. + get_product_lines(): + return selected product details. + """ + + _name = "product.export" + _description = "Export Products and Make an Excel Download URL." + + name = fields.Char(string="Name", help="Name of the record") + product_tmp_ids = fields.Many2many( + "product.template", string="Products", help="Products for exporting" + ) + product_ids = fields.Many2many( + "product.product", string="Products", help="Product variants for exporting" + ) + + def action_export_products(self): + """ + select the active product/ product template ids. + return URL action to download excel report. + """ + active_products = self.env.context["active_ids"] + active_model = self.env.context["active_model"] + if active_model == "product.template": + export_wizard = self.env["product.export"].create( + {"product_tmp_ids": [(6, 0, active_products)]} + ) + if active_model == "product.product": + export_wizard = self.env["product.export"].create( + {"product_ids": [(6, 0, active_products)]} + ) + if export_wizard: + return { + "type": "ir.actions.act_url", + "url": "/products_download/excel_report/%s" % export_wizard.id, + "target": "new", + "context": {"active_ids": active_products}, + } + + def get_product_lines(self): + """ + returns the product details like name, default code, category, image etc. + """ + rec_list = [] + if self.product_ids: + active_records = self.product_ids + elif self.product_tmp_ids: + active_records = self.product_tmp_ids + for rec in active_records: + vals = { + "name": rec.name, + "internal_reference": rec.default_code, + "category": rec.categ_id.display_name, + "currency": self.env.company.currency_id.symbol, + "cost": rec.standard_price, + "sales_price": rec.list_price, + "image": rec.image_128, + } + rec_list.append(vals) + return rec_list