diff --git a/manufacturing_reports/README.rst b/manufacturing_reports/README.rst new file mode 100644 index 000000000..2b74859ff --- /dev/null +++ b/manufacturing_reports/README.rst @@ -0,0 +1,42 @@ +Invoice From Stock Picking +========================== +* Enables the option for creating invoice from stock picking + +Installation +============ +- 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 `__ + +Credits +------- +* Developer: + V9 + V14 Javid A + V15 Javid A + +Contacts +-------- +* Mail Contact : odoo@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 +========== +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/manufacturing_reports/__init__.py b/manufacturing_reports/__init__.py new file mode 100644 index 000000000..dc6987a52 --- /dev/null +++ b/manufacturing_reports/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Javid A() +# +# 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 wizards +from . import controllers diff --git a/manufacturing_reports/__manifest__.py b/manufacturing_reports/__manifest__.py new file mode 100644 index 000000000..504635e4c --- /dev/null +++ b/manufacturing_reports/__manifest__.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Javid A() +# +# 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': 'Manufacturing Reports', + 'version': '15.0.1.0.0', + 'summary': 'PDF & XLS Reports For Manufacturing Module', + 'description': 'PDF & XLS reports for manufacturing module with advanced filters.', + 'category': 'Manufacturing', + 'author': 'Cybrosys Techno Solutions', + 'website': "http://www.cybrosys.com", + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'depends': ['base', 'mrp'], + 'data': [ + 'security/ir.model.access.csv', + 'wizards/mrp_wizard_view.xml', + 'reports/mrp_report_template.xml', + 'reports/mrp_report.xml', + 'views/menu_items.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, + 'application': False, +} diff --git a/manufacturing_reports/controllers/__init__.py b/manufacturing_reports/controllers/__init__.py new file mode 100644 index 000000000..ae3ce9c0d --- /dev/null +++ b/manufacturing_reports/controllers/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Javid A() +# +# 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 main diff --git a/manufacturing_reports/controllers/main.py b/manufacturing_reports/controllers/main.py new file mode 100644 index 000000000..0c3902cc3 --- /dev/null +++ b/manufacturing_reports/controllers/main.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Javid A() +# +# 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.addons.web.controllers.main import _serialize_exception +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): + uid = request.session.uid + report_obj = request.env[model].with_user(uid) + options = json.loads(options) + try: + if output_format == 'xlsx': + response = request.make_response( + None, + headers=[('Content-Type', 'application/vnd.ms-excel'), + ('Content-Disposition', + content_disposition(report_name + '.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/manufacturing_reports/doc/RELEASE_NOTES.md b/manufacturing_reports/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..8ec527909 --- /dev/null +++ b/manufacturing_reports/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 17.02.2023 +#### Version 15.0.1.0.0 +##### ADD +- Initial commit diff --git a/manufacturing_reports/reports/mrp_report.xml b/manufacturing_reports/reports/mrp_report.xml new file mode 100644 index 000000000..ca8905da3 --- /dev/null +++ b/manufacturing_reports/reports/mrp_report.xml @@ -0,0 +1,13 @@ + + + + + Manufacturing Report + mrp.report + qweb-pdf + manufacturing_reports.report_mrp_order + manufacturing_reports.report_mrp_order + report + + + \ No newline at end of file diff --git a/manufacturing_reports/reports/mrp_report_template.xml b/manufacturing_reports/reports/mrp_report_template.xml new file mode 100644 index 000000000..8e00e5211 --- /dev/null +++ b/manufacturing_reports/reports/mrp_report_template.xml @@ -0,0 +1,44 @@ + + + + + + \ No newline at end of file diff --git a/manufacturing_reports/security/ir.model.access.csv b/manufacturing_reports/security/ir.model.access.csv new file mode 100644 index 000000000..fb7bc75fe --- /dev/null +++ b/manufacturing_reports/security/ir.model.access.csv @@ -0,0 +1,3 @@ +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 diff --git a/manufacturing_reports/static/description/assets/icons/check.png b/manufacturing_reports/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/manufacturing_reports/static/description/assets/icons/check.png differ diff --git a/manufacturing_reports/static/description/assets/icons/chevron.png b/manufacturing_reports/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/manufacturing_reports/static/description/assets/icons/chevron.png differ diff --git a/manufacturing_reports/static/description/assets/icons/cogs.png b/manufacturing_reports/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/manufacturing_reports/static/description/assets/icons/cogs.png differ diff --git a/manufacturing_reports/static/description/assets/icons/consultation.png b/manufacturing_reports/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/manufacturing_reports/static/description/assets/icons/consultation.png differ diff --git a/manufacturing_reports/static/description/assets/icons/ecom-black.png b/manufacturing_reports/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/manufacturing_reports/static/description/assets/icons/ecom-black.png differ diff --git a/manufacturing_reports/static/description/assets/icons/education-black.png b/manufacturing_reports/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/manufacturing_reports/static/description/assets/icons/education-black.png differ diff --git a/manufacturing_reports/static/description/assets/icons/hotel-black.png b/manufacturing_reports/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/manufacturing_reports/static/description/assets/icons/hotel-black.png differ diff --git a/manufacturing_reports/static/description/assets/icons/license.png b/manufacturing_reports/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/manufacturing_reports/static/description/assets/icons/license.png differ diff --git a/manufacturing_reports/static/description/assets/icons/lifebuoy.png b/manufacturing_reports/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/manufacturing_reports/static/description/assets/icons/lifebuoy.png differ diff --git a/manufacturing_reports/static/description/assets/icons/manufacturing-black.png b/manufacturing_reports/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/manufacturing_reports/static/description/assets/icons/manufacturing-black.png differ diff --git a/manufacturing_reports/static/description/assets/icons/pos-black.png b/manufacturing_reports/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/manufacturing_reports/static/description/assets/icons/pos-black.png differ diff --git a/manufacturing_reports/static/description/assets/icons/puzzle.png b/manufacturing_reports/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/manufacturing_reports/static/description/assets/icons/puzzle.png differ diff --git a/manufacturing_reports/static/description/assets/icons/restaurant-black.png b/manufacturing_reports/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/manufacturing_reports/static/description/assets/icons/restaurant-black.png differ diff --git a/manufacturing_reports/static/description/assets/icons/service-black.png b/manufacturing_reports/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/manufacturing_reports/static/description/assets/icons/service-black.png differ diff --git a/manufacturing_reports/static/description/assets/icons/trading-black.png b/manufacturing_reports/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/manufacturing_reports/static/description/assets/icons/trading-black.png differ diff --git a/manufacturing_reports/static/description/assets/icons/training.png b/manufacturing_reports/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/manufacturing_reports/static/description/assets/icons/training.png differ diff --git a/manufacturing_reports/static/description/assets/icons/update.png b/manufacturing_reports/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/manufacturing_reports/static/description/assets/icons/update.png differ diff --git a/manufacturing_reports/static/description/assets/icons/user.png b/manufacturing_reports/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/manufacturing_reports/static/description/assets/icons/user.png differ diff --git a/manufacturing_reports/static/description/assets/icons/wrench.png b/manufacturing_reports/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/manufacturing_reports/static/description/assets/icons/wrench.png differ diff --git a/manufacturing_reports/static/description/assets/misc/categories.png b/manufacturing_reports/static/description/assets/misc/categories.png new file mode 100644 index 000000000..bedf1e0b1 Binary files /dev/null and b/manufacturing_reports/static/description/assets/misc/categories.png differ diff --git a/manufacturing_reports/static/description/assets/misc/check-box.png b/manufacturing_reports/static/description/assets/misc/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/manufacturing_reports/static/description/assets/misc/check-box.png differ diff --git a/manufacturing_reports/static/description/assets/misc/compass.png b/manufacturing_reports/static/description/assets/misc/compass.png new file mode 100644 index 000000000..d5fed8faa Binary files /dev/null and b/manufacturing_reports/static/description/assets/misc/compass.png differ diff --git a/manufacturing_reports/static/description/assets/misc/corporate.png b/manufacturing_reports/static/description/assets/misc/corporate.png new file mode 100644 index 000000000..2eb13edbf Binary files /dev/null and b/manufacturing_reports/static/description/assets/misc/corporate.png differ diff --git a/manufacturing_reports/static/description/assets/misc/customer-support.png b/manufacturing_reports/static/description/assets/misc/customer-support.png new file mode 100644 index 000000000..79efc72ed Binary files /dev/null and b/manufacturing_reports/static/description/assets/misc/customer-support.png differ diff --git a/manufacturing_reports/static/description/assets/misc/cybrosys-logo.png b/manufacturing_reports/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/manufacturing_reports/static/description/assets/misc/cybrosys-logo.png differ diff --git a/manufacturing_reports/static/description/assets/misc/features.png b/manufacturing_reports/static/description/assets/misc/features.png new file mode 100644 index 000000000..b41769f77 Binary files /dev/null and b/manufacturing_reports/static/description/assets/misc/features.png differ diff --git a/manufacturing_reports/static/description/assets/misc/logo.png b/manufacturing_reports/static/description/assets/misc/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/manufacturing_reports/static/description/assets/misc/logo.png differ diff --git a/manufacturing_reports/static/description/assets/misc/pictures.png b/manufacturing_reports/static/description/assets/misc/pictures.png new file mode 100644 index 000000000..56d255fe9 Binary files /dev/null and b/manufacturing_reports/static/description/assets/misc/pictures.png differ diff --git a/manufacturing_reports/static/description/assets/misc/pie-chart.png b/manufacturing_reports/static/description/assets/misc/pie-chart.png new file mode 100644 index 000000000..426e05244 Binary files /dev/null and b/manufacturing_reports/static/description/assets/misc/pie-chart.png differ diff --git a/manufacturing_reports/static/description/assets/misc/right-arrow.png b/manufacturing_reports/static/description/assets/misc/right-arrow.png new file mode 100644 index 000000000..730984a06 Binary files /dev/null and b/manufacturing_reports/static/description/assets/misc/right-arrow.png differ diff --git a/manufacturing_reports/static/description/assets/misc/star.png b/manufacturing_reports/static/description/assets/misc/star.png new file mode 100644 index 000000000..2eb9ab29f Binary files /dev/null and b/manufacturing_reports/static/description/assets/misc/star.png differ diff --git a/manufacturing_reports/static/description/assets/misc/support.png b/manufacturing_reports/static/description/assets/misc/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/manufacturing_reports/static/description/assets/misc/support.png differ diff --git a/manufacturing_reports/static/description/assets/misc/whatsapp.png b/manufacturing_reports/static/description/assets/misc/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/manufacturing_reports/static/description/assets/misc/whatsapp.png differ diff --git a/manufacturing_reports/static/description/assets/modules/1.png b/manufacturing_reports/static/description/assets/modules/1.png new file mode 100644 index 000000000..5238bdeab Binary files /dev/null and b/manufacturing_reports/static/description/assets/modules/1.png differ diff --git a/manufacturing_reports/static/description/assets/modules/2.png b/manufacturing_reports/static/description/assets/modules/2.png new file mode 100644 index 000000000..1ae7cfe3b Binary files /dev/null and b/manufacturing_reports/static/description/assets/modules/2.png differ diff --git a/manufacturing_reports/static/description/assets/modules/3.png b/manufacturing_reports/static/description/assets/modules/3.png new file mode 100644 index 000000000..3c3ff1afb Binary files /dev/null and b/manufacturing_reports/static/description/assets/modules/3.png differ diff --git a/manufacturing_reports/static/description/assets/modules/4.png b/manufacturing_reports/static/description/assets/modules/4.png new file mode 100644 index 000000000..3fae4631e Binary files /dev/null and b/manufacturing_reports/static/description/assets/modules/4.png differ diff --git a/manufacturing_reports/static/description/assets/modules/5.gif b/manufacturing_reports/static/description/assets/modules/5.gif new file mode 100644 index 000000000..2a5f8e659 Binary files /dev/null and b/manufacturing_reports/static/description/assets/modules/5.gif differ diff --git a/manufacturing_reports/static/description/assets/modules/6.png b/manufacturing_reports/static/description/assets/modules/6.png new file mode 100644 index 000000000..7f2815273 Binary files /dev/null and b/manufacturing_reports/static/description/assets/modules/6.png differ diff --git a/manufacturing_reports/static/description/assets/screenshots/14_1.png b/manufacturing_reports/static/description/assets/screenshots/14_1.png new file mode 100644 index 000000000..87bf1c657 Binary files /dev/null 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 new file mode 100644 index 000000000..9ed7395ef Binary files /dev/null and b/manufacturing_reports/static/description/assets/screenshots/14_2.png differ diff --git a/manufacturing_reports/static/description/assets/screenshots/14_3.png b/manufacturing_reports/static/description/assets/screenshots/14_3.png new file mode 100644 index 000000000..8b9cb7c35 Binary files /dev/null and b/manufacturing_reports/static/description/assets/screenshots/14_3.png differ diff --git a/manufacturing_reports/static/description/assets/screenshots/14_4.png b/manufacturing_reports/static/description/assets/screenshots/14_4.png new file mode 100644 index 000000000..3a0ceb436 Binary files /dev/null and b/manufacturing_reports/static/description/assets/screenshots/14_4.png differ diff --git a/manufacturing_reports/static/description/assets/screenshots/hero.png b/manufacturing_reports/static/description/assets/screenshots/hero.png new file mode 100644 index 000000000..2a798a5ca Binary files /dev/null and b/manufacturing_reports/static/description/assets/screenshots/hero.png differ diff --git a/manufacturing_reports/static/description/banner.png b/manufacturing_reports/static/description/banner.png new file mode 100644 index 000000000..bea96ebc8 Binary files /dev/null and b/manufacturing_reports/static/description/banner.png differ diff --git a/manufacturing_reports/static/description/icon.png b/manufacturing_reports/static/description/icon.png new file mode 100644 index 000000000..3fd825ec3 Binary files /dev/null and b/manufacturing_reports/static/description/icon.png differ diff --git a/manufacturing_reports/static/description/index.html b/manufacturing_reports/static/description/index.html new file mode 100644 index 000000000..46a90839b --- /dev/null +++ b/manufacturing_reports/static/description/index.html @@ -0,0 +1,570 @@ +
+ +
+ +
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+ +
+
+
+ +

+ Manufacturing Reports

+

+ PDF & XLS Reports For Manufacturing Module

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

Explore This + Module

+
+ + + + +
+
+ +
+

Overview +

+
+
+
+ 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 + large and small business MRP systems. +
+
+ + + +
+
+ +
+

Features +

+
+
+
+
+ + Community Support +
+
+ + + Filter manufacturing orders based on Product + +
+
+ + + Set start to print the orders from that date + +
+
+ + + Filter orders based on the status of the production +
+
+ + + Enable filter based on the responsible person for production +
+
+
+ + + +
+
+ +
+

Screenshots +

+
+
+
+ +
+

+ Go to Manufacturing >> Reporting >> Manufacturing Reports to print the reports. +

+ +
+ +
+

+ You can print PDF and XLS report. You can also filter it by products, State, + Start Date and Responsible Person

+ +
+ +
+

+ PDF report with images.

+ +
+ +
+

+ XLS report +

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

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/manufacturing_reports/static/src/js/action_manager.js b/manufacturing_reports/static/src/js/action_manager.js new file mode 100644 index 000000000..5663b890f --- /dev/null +++ b/manufacturing_reports/static/src/js/action_manager.js @@ -0,0 +1,31 @@ +odoo.define('manufacturing_reports .action_manager', function (require) { +"use strict"; +/** + * The purpose of this file is to add the actions of type + * 'ir_actions_xlsx_download' to the ActionManager. + */ +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 diff --git a/manufacturing_reports/views/menu_items.xml b/manufacturing_reports/views/menu_items.xml new file mode 100644 index 000000000..b08ba7a3e --- /dev/null +++ b/manufacturing_reports/views/menu_items.xml @@ -0,0 +1,9 @@ + + + + + + + + \ No newline at end of file diff --git a/manufacturing_reports/wizards/__init__.py b/manufacturing_reports/wizards/__init__.py new file mode 100644 index 000000000..636f7d40d --- /dev/null +++ b/manufacturing_reports/wizards/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Javid A() +# +# 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_report_wizard diff --git a/manufacturing_reports/wizards/mrp_report_wizard.py b/manufacturing_reports/wizards/mrp_report_wizard.py new file mode 100644 index 000000000..131e9486b --- /dev/null +++ b/manufacturing_reports/wizards/mrp_report_wizard.py @@ -0,0 +1,257 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Javid A() +# +# 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 xlsxwriter +from odoo import fields, models +from odoo.tools import date_utils +from odoo.tools.safe_eval import json + + +class MrpReportWizard(models.Model): + _name = 'mrp.report' + _description = 'MRP Report' + + filter = fields.Boolean(string='Enable filter by date') + date_from = fields.Date(string='Start Date') + filter_user = fields.Boolean(string='Filter On Responsible') + responsible_id = fields.Many2many('res.users', string='Responsible') + product_id = fields.Many2many('product.product', string='Product') + stage = fields.Selection( + [('confirmed', 'Confirmed'), ('planned', 'Planned'), ('progress', 'In Progress'), + ('done', 'Done'), ('cancel', 'Cancelled')], string="Filter State") + + def check_report(self): + """ + Function to fetch the mrp orders according to the filters given in + the wizard and print the XLS report + """ + orders = [] + if self.product_id and self.stage and self.date_from and self.responsible_id: + mrp_orders = self.env['mrp.production'].search( + [('product_id', 'in', self.product_id.ids), + ('state', '=', self.stage), ('date_planned_start', '>=', self.date_from), + ('user_id', 'in', self.responsible_id.ids)]) + elif self.product_id and self.stage and self.date_from: + mrp_orders = self.env['mrp.production'].search( + [('product_id', 'in', self.product_id.ids), + ('state', '=', self.stage), + ('date_planned_start', '>=', self.date_from)]) + elif self.product_id and self.stage and self.responsible_id: + mrp_orders = self.env['mrp.production'].search( + [('product_id', 'in', self.product_id.ids), + ('state', '=', self.stage), ('user_id', 'in', self.responsible_id.ids)]) + elif self.product_id and self.date_from and self.responsible_id: + mrp_orders = self.env['mrp.production'].search( + [('product_id', 'in', self.product_id.ids), + ('date_planned_start', '>=', self.date_from), + ('user_id', 'in', self.responsible_id.ids)]) + elif self.stage and self.date_from and self.responsible_id: + mrp_orders = self.env['mrp.production'].search( + [('state', '=', self.stage), ('date_planned_start', '>=', self.date_from), + ('user_id', 'in', self.responsible_id.ids)]) + elif self.product_id and self.stage: + mrp_orders = self.env['mrp.production'].search( + [('product_id', 'in', self.product_id.ids), ('state', '=', self.stage)]) + elif self.product_id and self.date_from: + mrp_orders = self.env['mrp.production'].search( + [('product_id', 'in', self.product_id.ids), + ('date_planned_start', '>=', self.date_from)]) + elif self.product_id and self.responsible_id: + mrp_orders = self.env['mrp.production'].search( + [('product_id', 'in', self.product_id.ids), + ('user_id', 'in', self.responsible_id.ids)]) + elif self.stage and self.date_from: + mrp_orders = self.env['mrp.production'].search( + [('state', '=', self.stage), + ('date_planned_start', '>=', self.date_from)]) + elif self.stage and self.responsible_id: + mrp_orders = self.env['mrp.production'].search( + [('state', '=', self.stage), ('user_id', 'in', self.responsible_id.ids)]) + elif self.date_from and self.responsible_id: + mrp_orders = self.env['mrp.production'].search( + [('date_planned_start', '>=', self.date_from), + ('user_id', 'in', self.responsible_id.ids)]) + elif self.product_id: + mrp_orders = self.env['mrp.production'].search( + [('product_id', 'in', self.product_id.ids)]) + elif self.stage: + mrp_orders = self.env['mrp.production'].search( + [('state', '=', self.stage)]) + elif self.date_from: + mrp_orders = self.env['mrp.production'].search( + [('date_planned_start', '>=', self.date_from)]) + elif self.responsible_id: + mrp_orders = self.env['mrp.production'].search( + [('user_id', 'in', self.responsible_id.ids)]) + else: + mrp_orders = self.env['mrp.production'].search([]) + for rec in mrp_orders: + orders.append({ + 'name': rec.name, + 'product': rec.product_id.name, + 'quantity': rec.product_qty, + 'unit': rec.product_uom_category_id.name, + 'responsible': rec.user_id.name, + 'start_date': rec.date_planned_start, + 'state': rec.state, + }) + data = { + 'date_from': self.date_from, + 'stage': self.stage, + 'mrp': orders + } + return { + 'type': 'ir.actions.report', + 'data': { + 'model': 'mrp.report', + 'options': json.dumps(data, default=date_utils.json_default), + 'output_format': 'xlsx', + 'report_name': 'Manufacturing Report', }, + 'report_type': 'xlsx', + } + + def print_pdf(self): + """ + Function to fetch the mrp orders according to the filters given in + the wizard and print the PDF report + """ + orders = [] + if self.product_id and self.stage and self.date_from and self.responsible_id: + mrp_orders = self.env['mrp.production'].search( + [('product_id', 'in', self.product_id.ids), + ('state', '=', self.stage), ('date_planned_start', '>=', self.date_from), + ('user_id', 'in', self.responsible_id.ids)]) + elif self.product_id and self.stage and self.date_from: + mrp_orders = self.env['mrp.production'].search( + [('product_id', 'in', self.product_id.ids), + ('state', '=', self.stage), ('date_planned_start', '>=', self.date_from)]) + elif self.product_id and self.stage and self.responsible_id: + mrp_orders = self.env['mrp.production'].search( + [('product_id', 'in', self.product_id.ids), + ('state', '=', self.stage), ('user_id', 'in', self.responsible_id.ids)]) + elif self.product_id and self.date_from and self.responsible_id: + mrp_orders = self.env['mrp.production'].search( + [('product_id', 'in', self.product_id.ids), + ('date_planned_start', '>=', self.date_from), + ('user_id', 'in', self.responsible_id.ids)]) + elif self.stage and self.date_from and self.responsible_id: + mrp_orders = self.env['mrp.production'].search( + [('state', '=', self.stage), ('date_planned_start', '>=', self.date_from), + ('user_id', 'in', self.responsible_id.ids)]) + elif self.product_id and self.stage: + mrp_orders = self.env['mrp.production'].search( + [('product_id', 'in', self.product_id.ids), ('state', '=', self.stage)]) + elif self.product_id and self.date_from: + mrp_orders = self.env['mrp.production'].search( + [('product_id', 'in', self.product_id.ids), + ('date_planned_start', '>=', self.date_from)]) + elif self.product_id and self.responsible_id: + mrp_orders = self.env['mrp.production'].search( + [('product_id', 'in', self.product_id.ids), + ('user_id', 'in', self.responsible_id.ids)]) + elif self.stage and self.date_from: + mrp_orders = self.env['mrp.production'].search( + [('state', '=', self.stage), ('date_planned_start', '>=', self.date_from)]) + elif self.stage and self.responsible_id: + mrp_orders = self.env['mrp.production'].search( + [('state', '=', self.stage), ('user_id', 'in', self.responsible_id.ids)]) + elif self.date_from and self.responsible_id: + mrp_orders = self.env['mrp.production'].search( + [('date_planned_start', '>=', self.date_from), + ('user_id', 'in', self.responsible_id.ids)]) + elif self.product_id: + mrp_orders = self.env['mrp.production'].search( + [('product_id', 'in', self.product_id.ids)]) + elif self.stage: + mrp_orders = self.env['mrp.production'].search( + [('state', '=', self.stage)]) + elif self.date_from: + mrp_orders = self.env['mrp.production'].search( + [('date_planned_start', '>=', self.date_from)]) + elif self.responsible_id: + mrp_orders = self.env['mrp.production'].search( + [('user_id', 'in', self.responsible_id.ids)]) + else: + mrp_orders = self.env['mrp.production'].search([]) + for rec in mrp_orders: + orders.append({ + 'name': rec.name, + 'image': rec.product_id.image_1920, + 'product': rec.product_id.name, + 'quantity': rec.product_qty, + 'unit': rec.product_uom_category_id.name, + 'responsible': rec.user_id.name, + 'start_date': rec.date_planned_start, + 'state': rec.state, + }) + data = { + 'date_from': self.date_from, + 'stage': self.stage, + 'mrp': orders + } + return self.env.ref( + 'manufacturing_reports.action_mrp_report').report_action(self, data=data) + + def get_xlsx_report(self, data, response): + output = io.BytesIO() + workbook = xlsxwriter.Workbook(output, {'in_memory': True}) + sheet = workbook.add_worksheet() + cell_format = workbook.add_format({'font_size': '12px', 'bold': True}) + head = workbook.add_format({'align': 'center', 'bold': True, 'font_size': '20px'}) + txt_head = workbook.add_format({'font_size': '12px'}) + sheet.set_column('B:B', 15) + sheet.set_column('C:C', 15) + sheet.set_column('D:D', 16) + sheet.set_column('E:E', 11) + sheet.set_column('F:F', 11) + sheet.set_column('G:G', 15) + sheet.set_column('H:H', 19) + sheet.set_column('I:I', 15) + sheet.merge_range('B2:H3', 'Manufacturing Orders', head) + if data['date_from']: + sheet.write('B6', 'From:', cell_format) + sheet.merge_range('C6:D6', data['date_from'], txt_head) + if data['stage']: + sheet.write('B7', 'State:', cell_format) + sheet.merge_range('C7:D7', data['stage'], txt_head) + row = 9 + col = 2 + sheet.write(row, col, 'Reference', cell_format) + sheet.write(row, col+1, 'Product', cell_format) + sheet.write(row, col+2, 'Quantity', cell_format) + sheet.write(row, col+3, 'Unit', cell_format) + sheet.write(row, col+4, 'Responsible', cell_format) + sheet.write(row, col+5, 'Start Date', cell_format) + sheet.write(row, col+6, 'State', cell_format) + for rec in data['mrp']: + row += 1 + sheet.write(row, col, rec['name']) + sheet.write(row, col+1, rec['product']) + sheet.write(row, col+2, rec['quantity']) + sheet.write(row, col+3, rec['unit']) + sheet.write(row, col+4, rec['responsible']) + sheet.write(row, col+5, rec['start_date']) + sheet.write(row, col+6, rec['state']) + workbook.close() + output.seek(0) + response.stream.write(output.read()) + output.close() diff --git a/manufacturing_reports/wizards/mrp_wizard_view.xml b/manufacturing_reports/wizards/mrp_wizard_view.xml new file mode 100644 index 000000000..42f48cb83 --- /dev/null +++ b/manufacturing_reports/wizards/mrp_wizard_view.xml @@ -0,0 +1,42 @@ + + + + + MRP Report + ir.actions.act_window + mrp.report + form + new + + + + MRP Report + mrp.report + +
+ + + + + + + + + + + + + +
+
+ +
+ +
\ No newline at end of file