diff --git a/bom_structure_in_excel_odoo/README.rst b/bom_structure_in_excel_odoo/README.rst new file mode 100644 index 000000000..18ce97f2c --- /dev/null +++ b/bom_structure_in_excel_odoo/README.rst @@ -0,0 +1,42 @@ +.. 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 + +BOM Structure & Cost Report in Excel +==================================== +* Effortlessly export BOM Structure & Cost Reports to Excel format. + +License +------- +General Public License, Version 3 (AGPL v3). +(https://www.odoo.com/documentation/user/16.0/legal/licenses/licenses.html) + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +* Developer: (V17) Anfas Faisal K, 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 https://www.cybrosys.com + +Further information +=================== +HTML Description: ``__ diff --git a/bom_structure_in_excel_odoo/__init__.py b/bom_structure_in_excel_odoo/__init__.py new file mode 100644 index 000000000..b2cc6599c --- /dev/null +++ b/bom_structure_in_excel_odoo/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Anfas Faisal K (odoo@cybrosys.info) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +################################################################################ +from . import controllers +from . import models diff --git a/bom_structure_in_excel_odoo/__manifest__.py b/bom_structure_in_excel_odoo/__manifest__.py new file mode 100644 index 000000000..4afc1cdd6 --- /dev/null +++ b/bom_structure_in_excel_odoo/__manifest__.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Anfas Faisal K (odoo@cybrosys.info) +# +# 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': "BOM Structure & Cost Report in Excel", + 'version': "17.0.1.0.0", + 'category': 'Manufacturing,Inventory', + 'summary': 'Effortlessly export BOM Structure & Cost Reports to Excel ' + 'format', + 'description': 'This app enhances your Odoo experience by enabling the ' + 'export of "BOM Structure & Cost Reports" to Excel format. ' + 'It provides a seamless transition from the standard Odoo ' + 'PDF report to an Excel file, offering flexibility in data ' + 'analysis and presentation.Simply export and analyze your ' + 'BOM reports in Excel with ease.', + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'images': ['static/description/banner.jpg'], + 'website': 'https://www.cybrosys.com', + 'depends': ['stock', 'mrp'], + 'data': [ + 'data/mrp_bom_data.xml', + ], + 'assets': { + 'web.assets_backend': [ + 'bom_structure_in_excel_odoo/static/src/js/action_manager.js', + ] + }, + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/bom_structure_in_excel_odoo/controllers/__init__.py b/bom_structure_in_excel_odoo/controllers/__init__.py new file mode 100644 index 000000000..15a869243 --- /dev/null +++ b/bom_structure_in_excel_odoo/controllers/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Anfas Faisal K (odoo@cybrosys.info) +# +# 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 bom_structure_in_excel_odoo diff --git a/bom_structure_in_excel_odoo/controllers/bom_structure_in_excel_odoo.py b/bom_structure_in_excel_odoo/controllers/bom_structure_in_excel_odoo.py new file mode 100644 index 000000000..1cba5a95b --- /dev/null +++ b/bom_structure_in_excel_odoo/controllers/bom_structure_in_excel_odoo.py @@ -0,0 +1,61 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Anfas Faisal K (odoo@cybrosys.info) +# +# 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 json +from odoo import http +from odoo.http import content_disposition, request +from odoo.http import serialize_exception as _serialize_exception +from odoo.tools import html_escape + + +class XLSXReportController(http.Controller): + """XlsxReport generating controller""" + @http.route('/xlsx_reports', type='http', auth='user', methods=['POST'], csrf=False) + def get_report_xlsx(self, model, options, output_format, **kw): + """ + Generate an XLSX report based on the provided data and return it as a + response. + """ + uid = request.session.uid + report_obj = request.env[model].with_user(uid) + options = json.loads(options) + token = 'dummy-because-api-expects-one' + try: + if output_format == 'xlsx': + response = request.make_response( + None, + headers=[ + ('Content-Type', 'application/vnd.ms-excel'), + ('Content-Disposition', + content_disposition('Sale Excel Report' + '.xlsx')) + ] + ) + report_obj.get_xlsx_report(options, response) + response.set_cookie('fileToken', token) + return response + except Exception as e: + se = _serialize_exception(e) + error = { + 'code': 200, + 'message': 'Odoo Server Error', + 'data': se + } + return request.make_response(html_escape(json.dumps(error))) diff --git a/bom_structure_in_excel_odoo/data/mrp_bom_data.xml b/bom_structure_in_excel_odoo/data/mrp_bom_data.xml new file mode 100644 index 000000000..50a3c9313 --- /dev/null +++ b/bom_structure_in_excel_odoo/data/mrp_bom_data.xml @@ -0,0 +1,13 @@ + + + + + BOM Structure EXCEL + + + form + report + code + action = records.action_print_bom_structure() + + \ No newline at end of file diff --git a/bom_structure_in_excel_odoo/doc/RELEASE_NOTES.md b/bom_structure_in_excel_odoo/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..48947e742 --- /dev/null +++ b/bom_structure_in_excel_odoo/doc/RELEASE_NOTES.md @@ -0,0 +1,7 @@ +## Module + +#### 07.02.2024 +#### Version 16.0.1.0.0 +#### ADD + +- Initial commit for BOM Structure & Cost Report in Excel diff --git a/bom_structure_in_excel_odoo/models/__init__.py b/bom_structure_in_excel_odoo/models/__init__.py new file mode 100644 index 000000000..f86a1572e --- /dev/null +++ b/bom_structure_in_excel_odoo/models/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Anfas Faisal K (odoo@cybrosys.info) +# +# 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 mrp_bom diff --git a/bom_structure_in_excel_odoo/models/mrp_bom.py b/bom_structure_in_excel_odoo/models/mrp_bom.py new file mode 100644 index 000000000..c7cae845a --- /dev/null +++ b/bom_structure_in_excel_odoo/models/mrp_bom.py @@ -0,0 +1,184 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Anfas Faisal K (odoo@cybrosys.info) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +################################################################################ +import io +import json +import xlsxwriter +from odoo import models +from odoo.tools import date_utils + + +class AccountMove(models.Model): + """Inherits the account move model""" + _inherit = 'mrp.bom' + + def action_print_bom_structure(self): + """Generate and export the BOM Structure Report in Excel format.""" + bom = self.env['mrp.bom'].browse(self.id) + candidates = bom.product_id or bom.product_tmpl_id.product_variant_ids + quantity = bom.product_qty + for product_variant_id in candidates.ids: + doc = self.env['report.mrp.report_bom_structure']._get_pdf_line( + bom.id, product_id=product_variant_id, + qty=quantity, unfolded=True) + return { + 'type': 'ir.actions.report', + 'data': {'model': 'mrp.bom', + 'options': json.dumps(doc, + default=date_utils.json_default), + 'output_format': 'xlsx', + 'report_name': 'BoM Structure', + }, + 'report_type': 'xlsx', + } + + def get_xlsx_report(self, data, response): + """ Generate an Excel report with BOM structure and cost.""" + output = io.BytesIO() + workbook = xlsxwriter.Workbook(output, {'in_memory': True}) + sheet = workbook.add_worksheet() + # Define cell formats + head = workbook.add_format( + {'align': 'left', 'bold': True, 'font_size': '20px'}) + format3 = workbook.add_format({'font_size': '15px', 'bold': True}) + format4 = workbook.add_format({'font_size': 10}) + format6 = workbook.add_format({'font_size': 10, 'bold': True}) + format7 = workbook.add_format({'font_size': 10, 'font_color': 'green'}) + format8 = workbook.add_format({'font_size': 10, 'font_color': 'red'}) + format9 = workbook.add_format({'font_size': 10, 'font_color': 'yellow'}) + # Check if there are components or lines in the data + if data and data.get('components') or data.get('lines'): + # Merge and format header cells + sheet.merge_range('A1:F2', 'BoM Structure & Cost', head) + sheet.merge_range('A4:Z5', data['name'], format3) + # Merge and format cells for product information + sheet.merge_range('A7:C7', 'Products', format6) + sheet.merge_range('D7:E7', 'Quantity', format6) + sheet.merge_range('F7:G7', 'Unit of Measure', format6) + sheet.merge_range('H7:I7', 'Ready to Produce', format6) + sheet.merge_range('J7:K7', 'Free to Use / On Hand', format6) + sheet.merge_range('L7:M7', 'Availability', format6) + sheet.merge_range('N7:O7', 'Lead Time', format6) + sheet.merge_range('P7:Q7', 'Route', format6) + sheet.merge_range('R7:S7', 'Product Cost', format6) + sheet.merge_range('T7:U7', 'BOM Cost', format6) + row_start = 9 # Starting row for data + currency_symbol = self.env.user.company_id.currency_id.symbol + # Iterate through lines in the data + for index, value in enumerate(data.get('lines')): + # Calculate leading spaces based on the level + if value['level'] != 0: + space_td = ' ' * value['level'] + else: + space_td = ' ' + # Merge and format cells for product name + sheet.merge_range('A8:C8', data['name'], format6) + sheet.merge_range('D8:E8', data['quantity'], format4) + sheet.merge_range(f'A{index + row_start}:C{index + row_start}', + space_td + value['name'], format4) + # Merge and format cells for quantity + sheet.merge_range(f'D{index + row_start}:E{index + row_start}', + value['quantity'], format4) + # Merge and format cells for unit of measure + if 'uom' in value: + sheet.merge_range( + f'F{index + row_start}:G{index + row_start}', + value['uom'], format4) + # Merge and format cells for 'Ready to Produce' + if 'producible_qty' in value: + sheet.merge_range('H8:I8', data['producible_qty'], format4) + sheet.merge_range( + f'H{index + row_start}:I{index + row_start}', + value['producible_qty'], format4) + # Merge and format cells for 'Quantity Available / On Hand' + if 'quantity_available' in value: + quantity_available_on_hand = \ + f"{value['quantity_available']} / {value['quantity_on_hand']}" + sheet.merge_range( + 'J8:K8', f"{data['quantity_available']} / " + f"{data['quantity_on_hand']}", format4) + sheet.merge_range( + f'J{index + row_start}:K{index + row_start}', + quantity_available_on_hand, format4) + # Merge and format cells for 'Availability' + if 'availability_display' in value: + availability_main_text = data['availability_display'] + availability_text = value['availability_display'] + color_format_main = format7 if ( + availability_main_text == 'Available') \ + else ( + format8 if availability_main_text == 'Not Available' + else format9) + color_format = format7 if availability_text == 'Available' \ + else (format8 if availability_text == 'Not Available' + else format9) + sheet.merge_range( + 'L8:M8', availability_main_text, color_format_main) + sheet.merge_range( + f'L{index + row_start}:M{index + row_start}', + availability_text, color_format) + # Merge and format cells for 'Product Cost' + if 'prod_cost' in value: + prod_cost_with_symbol = f"{currency_symbol} {data['prod_cost']} " + sheet.merge_range( + 'R8:S8', prod_cost_with_symbol, format4) + sheet.merge_range( + f'R{index + row_start}:S{index + row_start}', + f"{currency_symbol} {value['prod_cost']}", format4) + # Merge and format cells for 'BOM Cost' + if 'bom_cost' in value: + bom_cost_with_symbol = f" {currency_symbol} {data['bom_cost']}" + sheet.merge_range( + 'T8:U8', bom_cost_with_symbol, format4) + sheet.merge_range( + f'T{index + row_start}:U{index + row_start}', + f" {currency_symbol} {value['bom_cost']}", format4) + # Merge and format cells for 'Route Info' + if 'route_name' in value: + route_info = f"{value['route_name']} {value['route_detail']}" + sheet.merge_range( + f'P{index + row_start}:Q{index + row_start}', + route_info, format4) + # Merge and format cells for 'Lead Time' + if 'lead_time' in value: + lead_time = value['lead_time'] + lead_time_days = f"{int(lead_time)} days" if lead_time != 0.0 else "0 days" + sheet.merge_range( + f'N{index + row_start}:O{index + row_start}', + lead_time_days, format4) + # Check if 'prod_cost' is present in the data dictionary + if 'prod_cost' in data: + prod_cost_with_symbol = f"{currency_symbol} {data['prod_cost']}" + bom_cost_with_symbol = f" {currency_symbol} {data['bom_cost']}" + sheet.merge_range( + f'D{index + row_start + 1}:E{index + row_start + 1}', + 'UnitCost', format6) + sheet.merge_range( + f'T{index + row_start + 1}:U{index + row_start + 1}', + bom_cost_with_symbol, format4) + sheet.merge_range( + f'R{index + row_start + 1}:S{index + row_start + 1}', + prod_cost_with_symbol, format4) + # Close the workbook, seek to the beginning, and stream the output + workbook.close() + output.seek(0) + response.stream.write(output.read()) + output.close() diff --git a/bom_structure_in_excel_odoo/static/description/assets/icons/capture (1).png b/bom_structure_in_excel_odoo/static/description/assets/icons/capture (1).png new file mode 100644 index 000000000..8824deafc Binary files /dev/null and b/bom_structure_in_excel_odoo/static/description/assets/icons/capture (1).png differ diff --git a/bom_structure_in_excel_odoo/static/description/assets/icons/check.png b/bom_structure_in_excel_odoo/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/bom_structure_in_excel_odoo/static/description/assets/icons/check.png differ diff --git a/bom_structure_in_excel_odoo/static/description/assets/icons/chevron.png b/bom_structure_in_excel_odoo/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/bom_structure_in_excel_odoo/static/description/assets/icons/chevron.png differ diff --git a/bom_structure_in_excel_odoo/static/description/assets/icons/cogs.png b/bom_structure_in_excel_odoo/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/bom_structure_in_excel_odoo/static/description/assets/icons/cogs.png differ diff --git a/bom_structure_in_excel_odoo/static/description/assets/icons/consultation.png b/bom_structure_in_excel_odoo/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/bom_structure_in_excel_odoo/static/description/assets/icons/consultation.png differ diff --git a/bom_structure_in_excel_odoo/static/description/assets/icons/ecom-black.png b/bom_structure_in_excel_odoo/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/bom_structure_in_excel_odoo/static/description/assets/icons/ecom-black.png differ diff --git a/bom_structure_in_excel_odoo/static/description/assets/icons/education-black.png b/bom_structure_in_excel_odoo/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/bom_structure_in_excel_odoo/static/description/assets/icons/education-black.png differ diff --git a/bom_structure_in_excel_odoo/static/description/assets/icons/hotel-black.png b/bom_structure_in_excel_odoo/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/bom_structure_in_excel_odoo/static/description/assets/icons/hotel-black.png differ diff --git a/bom_structure_in_excel_odoo/static/description/assets/icons/img.png b/bom_structure_in_excel_odoo/static/description/assets/icons/img.png new file mode 100644 index 000000000..70197f477 Binary files /dev/null and b/bom_structure_in_excel_odoo/static/description/assets/icons/img.png differ diff --git a/bom_structure_in_excel_odoo/static/description/assets/icons/license.png b/bom_structure_in_excel_odoo/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/bom_structure_in_excel_odoo/static/description/assets/icons/license.png differ diff --git a/bom_structure_in_excel_odoo/static/description/assets/icons/lifebuoy.png b/bom_structure_in_excel_odoo/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/bom_structure_in_excel_odoo/static/description/assets/icons/lifebuoy.png differ diff --git a/bom_structure_in_excel_odoo/static/description/assets/icons/manufacturing-black.png b/bom_structure_in_excel_odoo/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/bom_structure_in_excel_odoo/static/description/assets/icons/manufacturing-black.png differ diff --git a/bom_structure_in_excel_odoo/static/description/assets/icons/photo-capture.png b/bom_structure_in_excel_odoo/static/description/assets/icons/photo-capture.png new file mode 100644 index 000000000..06c111758 Binary files /dev/null and b/bom_structure_in_excel_odoo/static/description/assets/icons/photo-capture.png differ diff --git a/bom_structure_in_excel_odoo/static/description/assets/icons/pos-black.png b/bom_structure_in_excel_odoo/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/bom_structure_in_excel_odoo/static/description/assets/icons/pos-black.png differ diff --git a/bom_structure_in_excel_odoo/static/description/assets/icons/puzzle.png b/bom_structure_in_excel_odoo/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/bom_structure_in_excel_odoo/static/description/assets/icons/puzzle.png differ diff --git a/bom_structure_in_excel_odoo/static/description/assets/icons/restaurant-black.png b/bom_structure_in_excel_odoo/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/bom_structure_in_excel_odoo/static/description/assets/icons/restaurant-black.png differ diff --git a/bom_structure_in_excel_odoo/static/description/assets/icons/service-black.png b/bom_structure_in_excel_odoo/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/bom_structure_in_excel_odoo/static/description/assets/icons/service-black.png differ diff --git a/bom_structure_in_excel_odoo/static/description/assets/icons/trading-black.png b/bom_structure_in_excel_odoo/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/bom_structure_in_excel_odoo/static/description/assets/icons/trading-black.png differ diff --git a/bom_structure_in_excel_odoo/static/description/assets/icons/training.png b/bom_structure_in_excel_odoo/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/bom_structure_in_excel_odoo/static/description/assets/icons/training.png differ diff --git a/bom_structure_in_excel_odoo/static/description/assets/icons/update.png b/bom_structure_in_excel_odoo/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/bom_structure_in_excel_odoo/static/description/assets/icons/update.png differ diff --git a/bom_structure_in_excel_odoo/static/description/assets/icons/user.png b/bom_structure_in_excel_odoo/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/bom_structure_in_excel_odoo/static/description/assets/icons/user.png differ diff --git a/bom_structure_in_excel_odoo/static/description/assets/icons/wrench.png b/bom_structure_in_excel_odoo/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/bom_structure_in_excel_odoo/static/description/assets/icons/wrench.png differ diff --git a/bom_structure_in_excel_odoo/static/description/assets/misc/Cybrosys R.png b/bom_structure_in_excel_odoo/static/description/assets/misc/Cybrosys R.png new file mode 100644 index 000000000..da4058087 Binary files /dev/null and b/bom_structure_in_excel_odoo/static/description/assets/misc/Cybrosys R.png differ diff --git a/bom_structure_in_excel_odoo/static/description/assets/misc/email.svg b/bom_structure_in_excel_odoo/static/description/assets/misc/email.svg new file mode 100644 index 000000000..15291cdc3 --- /dev/null +++ b/bom_structure_in_excel_odoo/static/description/assets/misc/email.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bom_structure_in_excel_odoo/static/description/assets/misc/phone.svg b/bom_structure_in_excel_odoo/static/description/assets/misc/phone.svg new file mode 100644 index 000000000..b7bd7f251 --- /dev/null +++ b/bom_structure_in_excel_odoo/static/description/assets/misc/phone.svg @@ -0,0 +1,3 @@ + + + diff --git a/bom_structure_in_excel_odoo/static/description/assets/misc/star (1) 2.svg b/bom_structure_in_excel_odoo/static/description/assets/misc/star (1) 2.svg new file mode 100644 index 000000000..5ae9f507a --- /dev/null +++ b/bom_structure_in_excel_odoo/static/description/assets/misc/star (1) 2.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/bom_structure_in_excel_odoo/static/description/assets/misc/support (1) 1.svg b/bom_structure_in_excel_odoo/static/description/assets/misc/support (1) 1.svg new file mode 100644 index 000000000..7d37a8f30 --- /dev/null +++ b/bom_structure_in_excel_odoo/static/description/assets/misc/support (1) 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/bom_structure_in_excel_odoo/static/description/assets/misc/support-email.svg b/bom_structure_in_excel_odoo/static/description/assets/misc/support-email.svg new file mode 100644 index 000000000..eb70370d6 --- /dev/null +++ b/bom_structure_in_excel_odoo/static/description/assets/misc/support-email.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/bom_structure_in_excel_odoo/static/description/assets/misc/tick-mark.svg b/bom_structure_in_excel_odoo/static/description/assets/misc/tick-mark.svg new file mode 100644 index 000000000..2dbb40187 --- /dev/null +++ b/bom_structure_in_excel_odoo/static/description/assets/misc/tick-mark.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/bom_structure_in_excel_odoo/static/description/assets/misc/whatsapp 1.svg b/bom_structure_in_excel_odoo/static/description/assets/misc/whatsapp 1.svg new file mode 100644 index 000000000..0bfaf8fc6 --- /dev/null +++ b/bom_structure_in_excel_odoo/static/description/assets/misc/whatsapp 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/bom_structure_in_excel_odoo/static/description/assets/misc/whatsapp.svg b/bom_structure_in_excel_odoo/static/description/assets/misc/whatsapp.svg new file mode 100644 index 000000000..b618aea1d --- /dev/null +++ b/bom_structure_in_excel_odoo/static/description/assets/misc/whatsapp.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bom_structure_in_excel_odoo/static/description/assets/modules/1.png b/bom_structure_in_excel_odoo/static/description/assets/modules/1.png new file mode 100644 index 000000000..164eb62c7 Binary files /dev/null and b/bom_structure_in_excel_odoo/static/description/assets/modules/1.png differ diff --git a/bom_structure_in_excel_odoo/static/description/assets/modules/2.jpg b/bom_structure_in_excel_odoo/static/description/assets/modules/2.jpg new file mode 100644 index 000000000..cd62a577c Binary files /dev/null and b/bom_structure_in_excel_odoo/static/description/assets/modules/2.jpg differ diff --git a/bom_structure_in_excel_odoo/static/description/assets/modules/3.jpg b/bom_structure_in_excel_odoo/static/description/assets/modules/3.jpg new file mode 100644 index 000000000..12a613059 Binary files /dev/null and b/bom_structure_in_excel_odoo/static/description/assets/modules/3.jpg differ diff --git a/bom_structure_in_excel_odoo/static/description/assets/modules/4.jpg b/bom_structure_in_excel_odoo/static/description/assets/modules/4.jpg new file mode 100644 index 000000000..5627d58cb Binary files /dev/null and b/bom_structure_in_excel_odoo/static/description/assets/modules/4.jpg differ diff --git a/bom_structure_in_excel_odoo/static/description/assets/modules/5.jpg b/bom_structure_in_excel_odoo/static/description/assets/modules/5.jpg new file mode 100644 index 000000000..73781cf50 Binary files /dev/null and b/bom_structure_in_excel_odoo/static/description/assets/modules/5.jpg differ diff --git a/bom_structure_in_excel_odoo/static/description/assets/modules/6.jpg b/bom_structure_in_excel_odoo/static/description/assets/modules/6.jpg new file mode 100644 index 000000000..fc7017e27 Binary files /dev/null and b/bom_structure_in_excel_odoo/static/description/assets/modules/6.jpg differ diff --git a/bom_structure_in_excel_odoo/static/description/assets/screenshots/1.png b/bom_structure_in_excel_odoo/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..c3536198f Binary files /dev/null and b/bom_structure_in_excel_odoo/static/description/assets/screenshots/1.png differ diff --git a/bom_structure_in_excel_odoo/static/description/assets/screenshots/2.png b/bom_structure_in_excel_odoo/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..11e794ab3 Binary files /dev/null and b/bom_structure_in_excel_odoo/static/description/assets/screenshots/2.png differ diff --git a/bom_structure_in_excel_odoo/static/description/assets/screenshots/3.png b/bom_structure_in_excel_odoo/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..89224d3c5 Binary files /dev/null and b/bom_structure_in_excel_odoo/static/description/assets/screenshots/3.png differ diff --git a/bom_structure_in_excel_odoo/static/description/assets/screenshots/4.png b/bom_structure_in_excel_odoo/static/description/assets/screenshots/4.png new file mode 100644 index 000000000..20ae17561 Binary files /dev/null and b/bom_structure_in_excel_odoo/static/description/assets/screenshots/4.png differ diff --git a/bom_structure_in_excel_odoo/static/description/assets/screenshots/hero-v17.gif b/bom_structure_in_excel_odoo/static/description/assets/screenshots/hero-v17.gif new file mode 100644 index 000000000..cc764fd39 Binary files /dev/null and b/bom_structure_in_excel_odoo/static/description/assets/screenshots/hero-v17.gif differ diff --git a/bom_structure_in_excel_odoo/static/description/banner.jpg b/bom_structure_in_excel_odoo/static/description/banner.jpg new file mode 100644 index 000000000..a20e3bc19 Binary files /dev/null and b/bom_structure_in_excel_odoo/static/description/banner.jpg differ diff --git a/bom_structure_in_excel_odoo/static/description/icon.png b/bom_structure_in_excel_odoo/static/description/icon.png new file mode 100644 index 000000000..61120e289 Binary files /dev/null and b/bom_structure_in_excel_odoo/static/description/icon.png differ diff --git a/bom_structure_in_excel_odoo/static/description/index.html b/bom_structure_in_excel_odoo/static/description/index.html new file mode 100644 index 000000000..b18affebf --- /dev/null +++ b/bom_structure_in_excel_odoo/static/description/index.html @@ -0,0 +1,557 @@ + + + + + + + Odoo App 3 Index + + + + + + + + +
+
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+
+
+
+

+ BOM Structure & Cost Report in Excel

+

+ Excel Output for BOM Structure and BOM Cost Report. +

+
+ +
+
+
+
+
+

Key Highlights +

+
+
+
+
+
+ +
+
+

Allow you to export BoM Structure & Cost Report in Excel format.

+
+
+
+
+
+
+ +
+
+

This gives the same output which the PDF report of Odoo standard gives.

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

+ Open Bills of Materials.

+
+
+
+
+
+
+ +
+
+

+ Select any one of the records.

+
+
+
+
+
+
+ +
+
+

+ Click on the Print Button and Click BOM Structure Excel to print the Excel Report.

+
+
+
+
+
+
+ +
+
+

+ Excel Report View.

+
+
+
+ + +
+
+
+
    +
  • + Allow you to export BoM Structure & Cost Report in Excel format. . +
  • +
  • + This gives the same output which the PDF report of Odoo standard gives. . +
  • +
+
+
+
+
+
+
Version + 16.0.1.0.0|Released on:7th Feb 2024 +
+

+ + Initial Commit for BOM Structure & Cost Report in Excel.

+
+
+
+
+
+
+
+

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
+
+
+
+
+
+
+
+
+ + + + + + diff --git a/bom_structure_in_excel_odoo/static/src/js/action_manager.js b/bom_structure_in_excel_odoo/static/src/js/action_manager.js new file mode 100644 index 000000000..1a95645c2 --- /dev/null +++ b/bom_structure_in_excel_odoo/static/src/js/action_manager.js @@ -0,0 +1,19 @@ +/** @odoo-module **/ +import { registry } from "@web/core/registry"; +import { BlockUI } from "@web/core/ui/block_ui"; +import { download } from "@web/core/network/download"; + +/** +This handler is responsible for generating XLSX reports. +*/ +registry.category("ir.actions.report handlers").add("qwerty_xlsx", async function (action) { + if (action.report_type === 'xlsx') { + BlockUI; + await download({ + url: '/xlsx_reports', + data: action.data, + complete: () => unblockUI, + error: (error) => self.call('crash_manager', 'rpc_error', error), + }); + } +});