From 2cd5e30f3336f2a8c3c2f17f27df2f5f0e7659ca Mon Sep 17 00:00:00 2001 From: AjmalCybro Date: Fri, 6 Oct 2023 09:52:40 +0530 Subject: [PATCH] Oct 5: [UPDT] Module Updated 'manufacturing_reports' --- manufacturing_reports/README.rst | 26 +- manufacturing_reports/__init__.py | 6 +- manufacturing_reports/__manifest__.py | 25 +- manufacturing_reports/controllers/__init__.py | 8 +- .../{main.py => manufacturing_reports.py} | 27 +- manufacturing_reports/doc/RELEASE_NOTES.md | 7 +- .../mrp_report_reports.xml} | 13 +- .../mrp_report_templates.xml | 10 +- .../security/ir.model.access.csv | 2 +- .../static/description/assets/icons/check.png | Bin .../description/assets/icons/chevron.png | Bin .../static/description/assets/icons/cogs.png | Bin .../description/assets/icons/consultation.png | Bin .../description/assets/icons/ecom-black.png | Bin .../assets/icons/education-black.png | Bin .../description/assets/icons/hotel-black.png | Bin .../description/assets/icons/license.png | Bin .../description/assets/icons/lifebuoy.png | Bin .../assets/{misc => icons}/logo.png | Bin .../assets/icons/manufacturing-black.png | Bin .../description/assets/icons/pos-black.png | Bin .../description/assets/icons/puzzle.png | Bin .../assets/icons/restaurant-black.png | Bin .../assets/icons/service-black.png | Bin .../assets/icons/trading-black.png | Bin .../description/assets/icons/training.png | Bin .../description/assets/icons/update.png | Bin .../static/description/assets/icons/user.png | Bin .../description/assets/icons/wrench.png | Bin .../description/assets/misc/categories.png | Bin 1532 -> 0 bytes .../description/assets/misc/check-box.png | Bin 1118 -> 0 bytes .../description/assets/misc/compass.png | Bin 1931 -> 0 bytes .../description/assets/misc/corporate.png | Bin 1177 -> 0 bytes .../assets/misc/customer-support.png | Bin 2136 -> 0 bytes .../description/assets/misc/cybrosys-logo.png | Bin 4496 -> 0 bytes .../description/assets/misc/features.png | Bin 589 -> 0 bytes .../description/assets/misc/pictures.png | Bin 1692 -> 0 bytes .../description/assets/misc/pie-chart.png | Bin 2338 -> 0 bytes .../description/assets/misc/right-arrow.png | Bin 967 -> 0 bytes .../static/description/assets/misc/star.png | Bin 1642 -> 0 bytes .../description/assets/misc/support.png | Bin 3892 -> 0 bytes .../description/assets/misc/whatsapp.png | Bin 5097 -> 0 bytes .../static/description/assets/modules/1.png | Bin 61003 -> 0 bytes .../static/description/assets/modules/3.png | Bin 57356 -> 0 bytes .../static/description/assets/modules/4.png | Bin 60233 -> 0 bytes .../static/description/assets/modules/5.gif | Bin 1859948 -> 0 bytes .../static/description/assets/modules/6.png | Bin 58088 -> 0 bytes .../assets/modules/budget_image.png | Bin 0 -> 60509 bytes .../assets/modules/credit_image.png | Bin 0 -> 61983 bytes .../assets/modules/employee_image.png | Bin 0 -> 61162 bytes .../assets/modules/export_image.png | Bin 0 -> 61770 bytes .../assets/modules/{2.png => gantt_image.png} | Bin .../assets/modules/quotation_image.png | Bin 0 -> 59629 bytes .../description/assets/screenshots/01.png | Bin 0 -> 85038 bytes .../description/assets/screenshots/02.png | Bin 0 -> 96231 bytes .../description/assets/screenshots/14_1.png | Bin 79536 -> 0 bytes .../description/assets/screenshots/14_2.png | Bin 66302 -> 0 bytes .../description/assets/screenshots/14_3.png | Bin .../description/assets/screenshots/14_4.png | Bin .../screenshots/Manufacturing-reports-gif.gif | Bin 0 -> 129768 bytes .../description/assets/screenshots/hero.png | Bin 165290 -> 0 bytes .../static/description/banner.png | Bin .../static/description/icon.png | Bin .../static/description/index.html | 1011 +++++++++-------- .../static/src/js/action_manager.js | 36 +- .../views/manufacturing_report_menus.xml | 10 - manufacturing_reports/wizard/__init__.py | 8 +- .../wizard/manufacturing_report.py | 175 +++ ...ews.xml => manufacturing_report_views.xml} | 30 +- manufacturing_reports/wizard/mrp_report.py | 285 ----- 70 files changed, 796 insertions(+), 883 deletions(-) mode change 100644 => 100755 manufacturing_reports/README.rst mode change 100644 => 100755 manufacturing_reports/__init__.py mode change 100644 => 100755 manufacturing_reports/__manifest__.py mode change 100644 => 100755 manufacturing_reports/controllers/__init__.py rename manufacturing_reports/controllers/{main.py => manufacturing_reports.py} (82%) mode change 100644 => 100755 mode change 100644 => 100755 manufacturing_reports/doc/RELEASE_NOTES.md rename manufacturing_reports/{reports/mrp_report_views.xml => report/mrp_report_reports.xml} (59%) mode change 100644 => 100755 rename manufacturing_reports/{reports => report}/mrp_report_templates.xml (92%) mode change 100644 => 100755 mode change 100644 => 100755 manufacturing_reports/security/ir.model.access.csv mode change 100644 => 100755 manufacturing_reports/static/description/assets/icons/check.png mode change 100644 => 100755 manufacturing_reports/static/description/assets/icons/chevron.png mode change 100644 => 100755 manufacturing_reports/static/description/assets/icons/cogs.png mode change 100644 => 100755 manufacturing_reports/static/description/assets/icons/consultation.png mode change 100644 => 100755 manufacturing_reports/static/description/assets/icons/ecom-black.png mode change 100644 => 100755 manufacturing_reports/static/description/assets/icons/education-black.png mode change 100644 => 100755 manufacturing_reports/static/description/assets/icons/hotel-black.png mode change 100644 => 100755 manufacturing_reports/static/description/assets/icons/license.png mode change 100644 => 100755 manufacturing_reports/static/description/assets/icons/lifebuoy.png rename manufacturing_reports/static/description/assets/{misc => icons}/logo.png (100%) mode change 100644 => 100755 mode change 100644 => 100755 manufacturing_reports/static/description/assets/icons/manufacturing-black.png mode change 100644 => 100755 manufacturing_reports/static/description/assets/icons/pos-black.png mode change 100644 => 100755 manufacturing_reports/static/description/assets/icons/puzzle.png mode change 100644 => 100755 manufacturing_reports/static/description/assets/icons/restaurant-black.png mode change 100644 => 100755 manufacturing_reports/static/description/assets/icons/service-black.png mode change 100644 => 100755 manufacturing_reports/static/description/assets/icons/trading-black.png mode change 100644 => 100755 manufacturing_reports/static/description/assets/icons/training.png mode change 100644 => 100755 manufacturing_reports/static/description/assets/icons/update.png mode change 100644 => 100755 manufacturing_reports/static/description/assets/icons/user.png mode change 100644 => 100755 manufacturing_reports/static/description/assets/icons/wrench.png delete mode 100644 manufacturing_reports/static/description/assets/misc/categories.png delete mode 100644 manufacturing_reports/static/description/assets/misc/check-box.png delete mode 100644 manufacturing_reports/static/description/assets/misc/compass.png delete mode 100644 manufacturing_reports/static/description/assets/misc/corporate.png delete mode 100644 manufacturing_reports/static/description/assets/misc/customer-support.png delete mode 100644 manufacturing_reports/static/description/assets/misc/cybrosys-logo.png delete mode 100644 manufacturing_reports/static/description/assets/misc/features.png delete mode 100644 manufacturing_reports/static/description/assets/misc/pictures.png delete mode 100644 manufacturing_reports/static/description/assets/misc/pie-chart.png delete mode 100644 manufacturing_reports/static/description/assets/misc/right-arrow.png delete mode 100644 manufacturing_reports/static/description/assets/misc/star.png delete mode 100644 manufacturing_reports/static/description/assets/misc/support.png delete mode 100644 manufacturing_reports/static/description/assets/misc/whatsapp.png delete mode 100644 manufacturing_reports/static/description/assets/modules/1.png delete mode 100644 manufacturing_reports/static/description/assets/modules/3.png delete mode 100644 manufacturing_reports/static/description/assets/modules/4.png delete mode 100644 manufacturing_reports/static/description/assets/modules/5.gif delete mode 100644 manufacturing_reports/static/description/assets/modules/6.png create mode 100755 manufacturing_reports/static/description/assets/modules/budget_image.png create mode 100755 manufacturing_reports/static/description/assets/modules/credit_image.png create mode 100755 manufacturing_reports/static/description/assets/modules/employee_image.png create mode 100755 manufacturing_reports/static/description/assets/modules/export_image.png rename manufacturing_reports/static/description/assets/modules/{2.png => gantt_image.png} (100%) mode change 100644 => 100755 create mode 100755 manufacturing_reports/static/description/assets/modules/quotation_image.png create mode 100755 manufacturing_reports/static/description/assets/screenshots/01.png create mode 100755 manufacturing_reports/static/description/assets/screenshots/02.png delete mode 100644 manufacturing_reports/static/description/assets/screenshots/14_1.png delete mode 100644 manufacturing_reports/static/description/assets/screenshots/14_2.png mode change 100644 => 100755 manufacturing_reports/static/description/assets/screenshots/14_3.png mode change 100644 => 100755 manufacturing_reports/static/description/assets/screenshots/14_4.png create mode 100755 manufacturing_reports/static/description/assets/screenshots/Manufacturing-reports-gif.gif delete mode 100644 manufacturing_reports/static/description/assets/screenshots/hero.png mode change 100644 => 100755 manufacturing_reports/static/description/banner.png mode change 100644 => 100755 manufacturing_reports/static/description/icon.png mode change 100644 => 100755 manufacturing_reports/static/description/index.html mode change 100644 => 100755 manufacturing_reports/static/src/js/action_manager.js delete mode 100644 manufacturing_reports/views/manufacturing_report_menus.xml mode change 100644 => 100755 manufacturing_reports/wizard/__init__.py create mode 100755 manufacturing_reports/wizard/manufacturing_report.py rename manufacturing_reports/wizard/{mrp_report_views.xml => manufacturing_report_views.xml} (51%) mode change 100644 => 100755 delete mode 100644 manufacturing_reports/wizard/mrp_report.py diff --git a/manufacturing_reports/README.rst b/manufacturing_reports/README.rst old mode 100644 new mode 100755 index a19ae24d8..fd2e3cf76 --- a/manufacturing_reports/README.rst +++ b/manufacturing_reports/README.rst @@ -1,30 +1,34 @@ .. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg - :target: https://www.gnu.org/licenses/agpl-3.0-standalone.html + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 Manufacturing Reports ===================== -Provides an option to print XLSX and PDF report for the Manufacturing module. +This module allow to manage manufacturing reports. + +Configuration +============= +* No additional configurations needed Installation ============ - www.odoo.com/documentation/15.0/setup/install.html - Install our custom addon -Company -------- -* `Cybrosys Techno Solutions `__ - License ------- -Affero General Public License v3.0 (AGPL v3) +GNU AFFERO GENERAL PUBLIC LICENSE, Version 3 (AGPLv3) (https://www.gnu.org/licenses/agpl-3.0-standalone.html) +Company +------- +* `Cybrosys Techno Solutions `__ + Credits ------- -* Developer: (V9) Cybrosys Technologies. - (V14) Javid A - (V15) Javid A +* Developer: + (V14) Javid A, Contact: odoo@cybrosys.com + (V15) Javid A, Contact: odoo@cybrosys.com Contacts -------- @@ -46,4 +50,4 @@ For support and more information, please visit `Our Website `__ \ No newline at end of file +HTML Description: ``__ diff --git a/manufacturing_reports/__init__.py b/manufacturing_reports/__init__.py old mode 100644 new mode 100755 index 756356f89..f39b875af --- a/manufacturing_reports/__init__.py +++ b/manufacturing_reports/__init__.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- -############################################################################### +############################################################################# # # Cybrosys Technologies Pvt. Ltd. # # Copyright (C) 2023-TODAY Cybrosys Technologies() -# Author: Javid A (odoo@cybrosys.com) +# Author: Javid A () # # You can modify it under the terms of the GNU AFFERO # GENERAL PUBLIC LICENSE (AGPL v3), Version 3. @@ -18,6 +18,6 @@ # (AGPL v3) along with this program. # If not, see . # -############################################################################### +############################################################################# from . import controllers from . import wizard diff --git a/manufacturing_reports/__manifest__.py b/manufacturing_reports/__manifest__.py old mode 100644 new mode 100755 index fa53c0262..fb7a16cf6 --- a/manufacturing_reports/__manifest__.py +++ b/manufacturing_reports/__manifest__.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- -############################################################################### +############################################################################# # # Cybrosys Technologies Pvt. Ltd. # # Copyright (C) 2023-TODAY Cybrosys Technologies() -# Author: Javid A (odoo@cybrosys.com) +# Author: Javid A () # # You can modify it under the terms of the GNU AFFERO # GENERAL PUBLIC LICENSE (AGPL v3), Version 3. @@ -18,34 +18,31 @@ # (AGPL v3) along with this program. # If not, see . # -############################################################################### +############################################################################# { 'name': 'Manufacturing Reports', 'version': '15.0.1.0.0', - 'category': 'Manufacturing', 'summary': 'PDF & XLS Reports For Manufacturing Module', - 'description': """This module crafted by Cybrosys Technologies provides - an option to print PDF & XLS report for MRP systems, - also you can view the product image in the report. This - works well for large and small business MRP systems.""", + 'description': 'Advanced filters for PDF and XLS reports for ' + 'manufacturing module', + 'category': 'Manufacturing', 'author': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', 'website': "http://www.cybrosys.com", + 'images': ['static/description/banner.png'], 'company': 'Cybrosys Techno Solutions', - 'maintainer': 'Cybrosys Techno Solutions', 'depends': ['base', 'mrp'], 'data': [ 'security/ir.model.access.csv', - 'reports/mrp_report_templates.xml', - 'reports/mrp_report_views.xml', - 'wizard/mrp_report_views.xml', - 'views/manufacturing_report_menus.xml', + 'wizard/manufacturing_report_views.xml', + 'report/mrp_report_templates.xml', + 'report/mrp_report_reports.xml', ], 'assets': { 'web.assets_backend': [ 'manufacturing_reports/static/src/js/action_manager.js', ] }, - 'images': ['static/description/banner.png'], 'license': 'AGPL-3', 'installable': True, 'auto_install': False, diff --git a/manufacturing_reports/controllers/__init__.py b/manufacturing_reports/controllers/__init__.py old mode 100644 new mode 100755 index 5e45e82c9..d9278af16 --- a/manufacturing_reports/controllers/__init__.py +++ b/manufacturing_reports/controllers/__init__.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- -############################################################################### +############################################################################# # # Cybrosys Technologies Pvt. Ltd. # # Copyright (C) 2023-TODAY Cybrosys Technologies() -# Author: Javid A (odoo@cybrosys.com) +# Author: Cybrosys Techno Solutions() # # You can modify it under the terms of the GNU AFFERO # GENERAL PUBLIC LICENSE (AGPL v3), Version 3. @@ -18,5 +18,5 @@ # (AGPL v3) along with this program. # If not, see . # -############################################################################### -from . import main +############################################################################# +from . import manufacturing_reports diff --git a/manufacturing_reports/controllers/main.py b/manufacturing_reports/controllers/manufacturing_reports.py old mode 100644 new mode 100755 similarity index 82% rename from manufacturing_reports/controllers/main.py rename to manufacturing_reports/controllers/manufacturing_reports.py index 9de857ff8..10be5eb96 --- a/manufacturing_reports/controllers/main.py +++ b/manufacturing_reports/controllers/manufacturing_reports.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- -############################################################################### +############################################################################# # # Cybrosys Technologies Pvt. Ltd. # # Copyright (C) 2023-TODAY Cybrosys Technologies() -# Author: Javid A (odoo@cybrosys.com) +# Author: Cybrosys Techno Solutions() # # You can modify it under the terms of the GNU AFFERO # GENERAL PUBLIC LICENSE (AGPL v3), Version 3. @@ -18,36 +18,39 @@ # (AGPL v3) along with this program. # If not, see . # -############################################################################### +############################################################################# import json from odoo import http from odoo.http import content_disposition, request -from odoo.addons.web.controllers.main import _serialize_exception from odoo.tools import html_escape +from odoo.addons.web.controllers.main import _serialize_exception class XLSXReportController(http.Controller): - """Class for the controller class XLSXReportController. - Contains the function to print XLSX report.""" + """ Route to create a xlsx sheet report returning the function + get_xlsx_report() """ + @http.route('/xlsx_reports', type='http', auth='user', methods=['POST'], csrf=False) - def get_report_xlsx(self, model, options, output_format, report_name): + def get_report_xlsx(self, model, options, output_format, report_name, + **kw): + """ + Gets the Excel report data from the get_xlsx_report response with + parameters options and 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(report_name + '.xlsx')) - ] + content_disposition(report_name + '.xlsx'))] ) report_obj.get_xlsx_report(options, response) - response.set_cookie('fileToken', token) - return response + return response except Exception as e: se = _serialize_exception(e) error = { diff --git a/manufacturing_reports/doc/RELEASE_NOTES.md b/manufacturing_reports/doc/RELEASE_NOTES.md old mode 100644 new mode 100755 index 9cd0835d9..e89f67175 --- a/manufacturing_reports/doc/RELEASE_NOTES.md +++ b/manufacturing_reports/doc/RELEASE_NOTES.md @@ -1,11 +1,6 @@ ## Module -#### 17.02.2023 +#### 23.08.2023 #### Version 15.0.1.0.0 ##### ADD - Initial commit for Manufacturing Reports - -#### 10.07.2023 -#### Version 15.0.1.0.0 -#### UPDT -- Bug Fix for the xlsx report not printing issue in Manufacturing Reports \ No newline at end of file diff --git a/manufacturing_reports/reports/mrp_report_views.xml b/manufacturing_reports/report/mrp_report_reports.xml old mode 100644 new mode 100755 similarity index 59% rename from manufacturing_reports/reports/mrp_report_views.xml rename to manufacturing_reports/report/mrp_report_reports.xml index 2c743c0d4..5e41ab85a --- a/manufacturing_reports/reports/mrp_report_views.xml +++ b/manufacturing_reports/report/mrp_report_reports.xml @@ -1,12 +1,11 @@ - + - - + Manufacturing Report - mrp.report + manufacturing.report qweb-pdf - manufacturing_reports.report_mrp_order - manufacturing_reports.report_mrp_order + manufacturing_reports.report_mrp + manufacturing_reports.report_mrp report - \ No newline at end of file + diff --git a/manufacturing_reports/reports/mrp_report_templates.xml b/manufacturing_reports/report/mrp_report_templates.xml old mode 100644 new mode 100755 similarity index 92% rename from manufacturing_reports/reports/mrp_report_templates.xml rename to manufacturing_reports/report/mrp_report_templates.xml index d4f09ddd7..91825b945 --- a/manufacturing_reports/reports/mrp_report_templates.xml +++ b/manufacturing_reports/report/mrp_report_templates.xml @@ -1,7 +1,6 @@ - + - -