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