diff --git a/manufacturing_reports/README.rst b/manufacturing_reports/README.rst index 79995ecda..a19ae24d8 100644 --- a/manufacturing_reports/README.rst +++ b/manufacturing_reports/README.rst @@ -1,29 +1,35 @@ -Invoice From Stock Picking -========================== -* Enables the option for creating invoice from stock picking +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: https://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. Installation ============ -- www.odoo.com/documentation/14.0/setup/install.html +- www.odoo.com/documentation/15.0/setup/install.html - Install our custom addon -License -------- -GNU AFFERO GENERAL PUBLIC LICENSE, Version 3 (AGPLv3) -(http://www.gnu.org/licenses/agpl.html) - Company ------- * `Cybrosys Techno Solutions `__ +License +------- +Affero General Public License v3.0 (AGPL v3) +(https://www.gnu.org/licenses/agpl-3.0-standalone.html) + Credits ------- -* Developer: - V14 Javid A +* Developer: (V9) Cybrosys Technologies. + (V14) Javid A + (V15) Javid A Contacts -------- * Mail Contact : odoo@cybrosys.com +* Website : https://cybrosys.com Bug Tracker ----------- @@ -31,10 +37,13 @@ Bugs are tracked on GitHub Issues. In case of trouble, please check there if you 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 +For support and more information, please visit `Our Website `__ Further information =================== -HTML Description: ``__ +HTML Description: ``__ \ No newline at end of file diff --git a/manufacturing_reports/__init__.py b/manufacturing_reports/__init__.py index dc6987a52..756356f89 100644 --- 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() +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Javid A (odoo@cybrosys.com) # # 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 wizards +############################################################################### from . import controllers +from . import wizard diff --git a/manufacturing_reports/__manifest__.py b/manufacturing_reports/__manifest__.py index 1af20fd6a..fa53c0262 100644 --- 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() +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Javid A (odoo@cybrosys.com) # # You can modify it under the terms of the GNU AFFERO # GENERAL PUBLIC LICENSE (AGPL v3), Version 3. @@ -18,13 +18,16 @@ # (AGPL v3) along with this program. # If not, see . # -############################################################################# +############################################################################### { 'name': 'Manufacturing Reports', - 'version': '14.0.1.0.0', - 'summary': 'PDF & XLS Reports For Manufacturing Module', - 'description': 'PDF & XLS reports for manufacturing module with advanced filters.', + '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.""", 'author': 'Cybrosys Techno Solutions', 'website': "http://www.cybrosys.com", 'company': 'Cybrosys Techno Solutions', @@ -32,12 +35,16 @@ 'depends': ['base', 'mrp'], 'data': [ 'security/ir.model.access.csv', - 'views/action_manager.xml', - 'wizards/mrp_wizard_view.xml', - 'reports/mrp_report_template.xml', - 'reports/mrp_report.xml', - 'views/menu_items.xml', + 'reports/mrp_report_templates.xml', + 'reports/mrp_report_views.xml', + 'wizard/mrp_report_views.xml', + 'views/manufacturing_report_menus.xml', ], + 'assets': { + 'web.assets_backend': [ + 'manufacturing_reports/static/src/js/action_manager.js', + ] + }, 'images': ['static/description/banner.png'], 'license': 'AGPL-3', 'installable': True, diff --git a/manufacturing_reports/controllers/__init__.py b/manufacturing_reports/controllers/__init__.py index ae3ce9c0d..5e45e82c9 100644 --- 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() +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Javid A (odoo@cybrosys.com) # # 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 diff --git a/manufacturing_reports/controllers/main.py b/manufacturing_reports/controllers/main.py index 0c3902cc3..9de857ff8 100644 --- a/manufacturing_reports/controllers/main.py +++ b/manufacturing_reports/controllers/main.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- -############################################################################# +############################################################################### # # Cybrosys Technologies Pvt. Ltd. # -# Copyright (C) 2023-TODAY Cybrosys Technologies(). -# Author: Javid A() +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Javid A (odoo@cybrosys.com) # # You can modify it under the terms of the GNU AFFERO # GENERAL PUBLIC LICENSE (AGPL v3), Version 3. @@ -18,7 +18,7 @@ # (AGPL v3) along with this program. # If not, see . # -############################################################################# +############################################################################### import json from odoo import http from odoo.http import content_disposition, request @@ -27,11 +27,15 @@ from odoo.tools import html_escape class XLSXReportController(http.Controller): - @http.route('/xlsx_reports', type='http', auth='user', methods=['POST'], csrf=False) - def get_report_xlsx(self, model, options, output_format, token, report_name, **kw): + """Class for the controller class XLSXReportController. + Contains the function to print 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): 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( diff --git a/manufacturing_reports/doc/RELEASE_NOTES.md b/manufacturing_reports/doc/RELEASE_NOTES.md index 4562c396c..9cd0835d9 100644 --- a/manufacturing_reports/doc/RELEASE_NOTES.md +++ b/manufacturing_reports/doc/RELEASE_NOTES.md @@ -1,6 +1,11 @@ ## Module #### 17.02.2023 -#### Version 14.0.1.0.0 +#### Version 15.0.1.0.0 ##### ADD -- Initial commit +- 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_template.xml b/manufacturing_reports/reports/mrp_report_template.xml deleted file mode 100644 index 8e00e5211..000000000 --- a/manufacturing_reports/reports/mrp_report_template.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/manufacturing_reports/reports/mrp_report_templates.xml b/manufacturing_reports/reports/mrp_report_templates.xml new file mode 100644 index 000000000..d4f09ddd7 --- /dev/null +++ b/manufacturing_reports/reports/mrp_report_templates.xml @@ -0,0 +1,70 @@ + + + + + \ No newline at end of file diff --git a/manufacturing_reports/reports/mrp_report.xml b/manufacturing_reports/reports/mrp_report_views.xml similarity index 91% rename from manufacturing_reports/reports/mrp_report.xml rename to manufacturing_reports/reports/mrp_report_views.xml index ca8905da3..2c743c0d4 100644 --- a/manufacturing_reports/reports/mrp_report.xml +++ b/manufacturing_reports/reports/mrp_report_views.xml @@ -1,6 +1,6 @@ - + Manufacturing Report mrp.report @@ -9,5 +9,4 @@ manufacturing_reports.report_mrp_order report - \ No newline at end of file diff --git a/manufacturing_reports/security/ir.model.access.csv b/manufacturing_reports/security/ir.model.access.csv index fb7bc75fe..a21f91726 100644 --- a/manufacturing_reports/security/ir.model.access.csv +++ b/manufacturing_reports/security/ir.model.access.csv @@ -1,3 +1,2 @@ id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink - -access_mrp_report,access.mrp.report,model_mrp_report,base.group_user,1,1,1,1 \ No newline at end of file +access_mrp_report,access.mrp.report,model_mrp_report,base.group_user,1,1,1,1 diff --git a/manufacturing_reports/static/description/assets/screenshots/14_1.png b/manufacturing_reports/static/description/assets/screenshots/14_1.png index 87bf1c657..e3e6d92ab 100644 Binary files a/manufacturing_reports/static/description/assets/screenshots/14_1.png and b/manufacturing_reports/static/description/assets/screenshots/14_1.png differ diff --git a/manufacturing_reports/static/description/assets/screenshots/14_2.png b/manufacturing_reports/static/description/assets/screenshots/14_2.png index 9ed7395ef..26cfd50cf 100644 Binary files a/manufacturing_reports/static/description/assets/screenshots/14_2.png and b/manufacturing_reports/static/description/assets/screenshots/14_2.png differ diff --git a/manufacturing_reports/static/description/banner.png b/manufacturing_reports/static/description/banner.png index c6397ae09..bea96ebc8 100644 Binary files a/manufacturing_reports/static/description/banner.png and b/manufacturing_reports/static/description/banner.png differ diff --git a/manufacturing_reports/static/description/index.html b/manufacturing_reports/static/description/index.html index 46a90839b..94e74026b 100644 --- a/manufacturing_reports/static/description/index.html +++ b/manufacturing_reports/static/description/index.html @@ -29,17 +29,14 @@

Manufacturing Reports

- PDF & XLS Reports For Manufacturing Module

+ PDF & XLSX Reports For Manufacturing Module

- - -
Manufacturing Reports is a free Cybrosys MRP software which helps to generate advanced report for MRP module(Material requirements planning).This allows both PDF & XLS report - for MRP systems. Also you can view the product image in the report. This works well for + for MRP systems, also you can view the product image in the report. This works well for large and small business MRP systems.
@@ -127,29 +124,29 @@
- Community Support + Filter manufacturing orders by product.
- Filter manufacturing orders based on Product + Filter manufacturing orders by start date.
- Set start to print the orders from that date + Filter manufacturing orders by responsible person.
- Filter orders based on the status of the production + Filter orders based on the status of the production.
- Enable filter based on the responsible person for production + Compatible with Community, Enterprise and Odoo.sh.
@@ -180,21 +177,17 @@ Start Date and Responsible Person

-

PDF report with images.

-

XLS report

- - @@ -272,8 +265,7 @@ class="carousel-control-prev-icon"> - + @@ -281,7 +273,6 @@ -
@@ -290,7 +281,6 @@

Our Services

-
@@ -302,7 +292,6 @@ Odoo Customization
-
@@ -312,7 +301,6 @@ Odoo Implementation
-
@@ -322,8 +310,6 @@ Odoo Support
- -
@@ -334,7 +320,6 @@ Odoo Developer
-
@@ -344,7 +329,6 @@ Odoo Integration
-
@@ -354,8 +338,6 @@ Odoo Migration
- -
@@ -365,7 +347,6 @@ Odoo Consultancy
-
@@ -375,7 +356,6 @@ Odoo Implementation
-
@@ -386,13 +366,10 @@ Licensing Consultancy
-
- - + -
@@ -402,7 +379,6 @@ Industries
-
@@ -418,7 +394,6 @@ sell your products

-
@@ -432,7 +407,6 @@ and convivial experience

-
@@ -445,7 +419,6 @@ educational management

-
@@ -458,7 +431,6 @@ schedule your operations

-
@@ -472,7 +444,6 @@ awe-inspiring product pages

-
@@ -485,7 +456,6 @@ services and invoice

-
@@ -498,7 +468,6 @@ restaurant methodically

-
@@ -514,8 +483,7 @@
- - +
diff --git a/manufacturing_reports/static/src/js/action_manager.js b/manufacturing_reports/static/src/js/action_manager.js index 5663b890f..2503b9eed 100644 --- a/manufacturing_reports/static/src/js/action_manager.js +++ b/manufacturing_reports/static/src/js/action_manager.js @@ -1,31 +1,23 @@ -odoo.define('manufacturing_reports .action_manager', function (require) { -"use strict"; +/** @odoo-module */ +import { registry } from "@web/core/registry"; +import { download } from "@web/core/network/download"; +import framework from 'web.framework'; +import session from 'web.session'; /** - * The purpose of this file is to add the actions of type - * 'ir_actions_xlsx_download' to the ActionManager. + * @override + * Add 'xlsx' report type to the report handler */ -var ActionManager = require('web.ActionManager'); -var framework = require('web.framework'); -var session = require('web.session'); -ActionManager.include({ - _executexlsxReportDownloadAction: function (action) { - framework.blockUI(); - var def = $.Deferred(); - session.get_file({ - url: '/xlsx_reports', - data: action.data, - success: def.resolve.bind(def), - error: (error) => this.call('crash_manager', 'rpc_error', error), - complete: framework.unblockUI, - }); - return def; - }, - _handleAction: function (action, options) { - if (action.report_type === 'xlsx') { - return this._executexlsxReportDownloadAction(action, options); - } - return this._super.apply(this, arguments); - -}, - }); - }); \ No newline at end of file +registry.category("ir.actions.report handlers").add("xlsx", async (action) => { + if (action.report_type === 'xlsx') { + framework.blockUI(); + var def = $.Deferred(); + session.get_file({ + url: '/xlsx_reports', + data: action.data, + success: def.resolve.bind(def), + error: (error) => this.call('crash_manager', 'rpc_error', error), + complete: framework.unblockUI, + }); + return def; + } +}); \ No newline at end of file diff --git a/manufacturing_reports/views/action_manager.xml b/manufacturing_reports/views/action_manager.xml deleted file mode 100644 index 3b3a05647..000000000 --- a/manufacturing_reports/views/action_manager.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - -