diff --git a/manufacturing_reports/README.rst b/manufacturing_reports/README.rst new file mode 100644 index 000000000..7d82fa42c --- /dev/null +++ b/manufacturing_reports/README.rst @@ -0,0 +1,53 @@ +.. 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 + +Manufacturing Reports +===================== +* This module allow to manage PDF & XLS reports for manufacturing module +with advanced filters + +Configuration +============= +* No additional configurations needed + +License +------- +General Public License, Version 3 (AGPL v3). +(https://www.gnu.org/licenses/agpl-3.0-standalone.html) + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +* Developers: + (V14) Javid A, + (V15) Javid A, + (V16) Javid A, + (V17) Jumana Haseen, + 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 `Our Website `__ + +Further information +=================== +HTML Description: ``__ diff --git a/manufacturing_reports/__init__.py b/manufacturing_reports/__init__.py new file mode 100644 index 000000000..91202facf --- /dev/null +++ b/manufacturing_reports/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Jumana Haseen () +# +# 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 wizards diff --git a/manufacturing_reports/__manifest__.py b/manufacturing_reports/__manifest__.py new file mode 100644 index 000000000..0edb577bf --- /dev/null +++ b/manufacturing_reports/__manifest__.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Jumana Haseen () +# +# 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': '17.0.1.0.0', + 'category': 'Manufacturing', + 'summary': 'PDF & XLS Reports For Manufacturing Module', + 'description': 'PDF & XLS reports for manufacturing module with ' + 'advanced filters.', + 'author': 'Cybrosys Techno Solutions', + 'website': "http://www.cybrosys.com", + 'images': ['static/description/banner.png'], + 'company': 'Cybrosys Techno Solutions', + 'depends': ['mrp'], + 'data': [ + 'security/ir.model.access.csv', + 'wizards/mrp_report_views.xml', + 'reports/mrp_report_templates.xml', + 'reports/mrp_report_reports.xml', + 'views/mrp_report_views.xml', + ], + 'assets': { + 'web.assets_backend': [ + 'manufacturing_reports/static/src/js/action_manager.js', + ] + }, + '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..8ae0ed0b0 --- /dev/null +++ b/manufacturing_reports/controllers/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Jumana Haseen () +# +# 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 manufacturing_reports diff --git a/manufacturing_reports/controllers/manufacturing_reports.py b/manufacturing_reports/controllers/manufacturing_reports.py new file mode 100644 index 000000000..3dc36954d --- /dev/null +++ b/manufacturing_reports/controllers/manufacturing_reports.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Jumana Haseen () +# +# 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.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, report_name, **kw): + 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')) + ] + ) + report_obj.get_xlsx_report(options, response) + response.set_cookie('fileToken', token) + return response + except Exception as e: + se = http.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..0ab3355f7 --- /dev/null +++ b/manufacturing_reports/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 28.03.2024 +#### Version 17.0.1.0.0 +##### ADD +- Initial commit for Manufacturing Reports diff --git a/manufacturing_reports/reports/mrp_report_reports.xml b/manufacturing_reports/reports/mrp_report_reports.xml new file mode 100644 index 000000000..6074668f2 --- /dev/null +++ b/manufacturing_reports/reports/mrp_report_reports.xml @@ -0,0 +1,12 @@ + + + + + Manufacturing Report + mrp.report + qweb-pdf + manufacturing_reports.report_mrp_order + manufacturing_reports.report_mrp_order + report + + diff --git a/manufacturing_reports/reports/mrp_report_templates.xml b/manufacturing_reports/reports/mrp_report_templates.xml new file mode 100644 index 000000000..9a550371e --- /dev/null +++ b/manufacturing_reports/reports/mrp_report_templates.xml @@ -0,0 +1,43 @@ + + + + + diff --git a/manufacturing_reports/security/ir.model.access.csv b/manufacturing_reports/security/ir.model.access.csv new file mode 100644 index 000000000..a21f91726 --- /dev/null +++ b/manufacturing_reports/security/ir.model.access.csv @@ -0,0 +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 diff --git a/manufacturing_reports/static/description/assets/icons/capture (1).png b/manufacturing_reports/static/description/assets/icons/capture (1).png new file mode 100644 index 000000000..8824deafc Binary files /dev/null and b/manufacturing_reports/static/description/assets/icons/capture (1).png differ 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/img.png b/manufacturing_reports/static/description/assets/icons/img.png new file mode 100644 index 000000000..70197f477 Binary files /dev/null and b/manufacturing_reports/static/description/assets/icons/img.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/photo-capture.png b/manufacturing_reports/static/description/assets/icons/photo-capture.png new file mode 100644 index 000000000..06c111758 Binary files /dev/null and b/manufacturing_reports/static/description/assets/icons/photo-capture.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/Cybrosys R.png b/manufacturing_reports/static/description/assets/misc/Cybrosys R.png new file mode 100644 index 000000000..da4058087 Binary files /dev/null and b/manufacturing_reports/static/description/assets/misc/Cybrosys R.png differ diff --git a/manufacturing_reports/static/description/assets/misc/email.svg b/manufacturing_reports/static/description/assets/misc/email.svg new file mode 100644 index 000000000..15291cdc3 --- /dev/null +++ b/manufacturing_reports/static/description/assets/misc/email.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/manufacturing_reports/static/description/assets/misc/phone.svg b/manufacturing_reports/static/description/assets/misc/phone.svg new file mode 100644 index 000000000..b7bd7f251 --- /dev/null +++ b/manufacturing_reports/static/description/assets/misc/phone.svg @@ -0,0 +1,3 @@ + + + diff --git a/manufacturing_reports/static/description/assets/misc/star (1) 2.svg b/manufacturing_reports/static/description/assets/misc/star (1) 2.svg new file mode 100644 index 000000000..5ae9f507a --- /dev/null +++ b/manufacturing_reports/static/description/assets/misc/star (1) 2.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/manufacturing_reports/static/description/assets/misc/support (1) 1.svg b/manufacturing_reports/static/description/assets/misc/support (1) 1.svg new file mode 100644 index 000000000..7d37a8f30 --- /dev/null +++ b/manufacturing_reports/static/description/assets/misc/support (1) 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/manufacturing_reports/static/description/assets/misc/support-email.svg b/manufacturing_reports/static/description/assets/misc/support-email.svg new file mode 100644 index 000000000..eb70370d6 --- /dev/null +++ b/manufacturing_reports/static/description/assets/misc/support-email.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/manufacturing_reports/static/description/assets/misc/tick-mark.svg b/manufacturing_reports/static/description/assets/misc/tick-mark.svg new file mode 100644 index 000000000..2dbb40187 --- /dev/null +++ b/manufacturing_reports/static/description/assets/misc/tick-mark.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/manufacturing_reports/static/description/assets/misc/whatsapp 1.svg b/manufacturing_reports/static/description/assets/misc/whatsapp 1.svg new file mode 100644 index 000000000..0bfaf8fc6 --- /dev/null +++ b/manufacturing_reports/static/description/assets/misc/whatsapp 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/manufacturing_reports/static/description/assets/misc/whatsapp.svg b/manufacturing_reports/static/description/assets/misc/whatsapp.svg new file mode 100644 index 000000000..b618aea1d --- /dev/null +++ b/manufacturing_reports/static/description/assets/misc/whatsapp.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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..ad16fe949 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..5d1cf9e41 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..f7c11dec0 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..07f2d5f2d 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.png b/manufacturing_reports/static/description/assets/modules/5.png new file mode 100644 index 000000000..a0e8f321a Binary files /dev/null and b/manufacturing_reports/static/description/assets/modules/5.png 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..716cf61ed Binary files /dev/null and b/manufacturing_reports/static/description/assets/modules/6.png differ diff --git a/manufacturing_reports/static/description/assets/screenshots/1.png b/manufacturing_reports/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..dab91fa93 Binary files /dev/null and b/manufacturing_reports/static/description/assets/screenshots/1.png differ diff --git a/manufacturing_reports/static/description/assets/screenshots/2.png b/manufacturing_reports/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..aefa473a3 Binary files /dev/null and b/manufacturing_reports/static/description/assets/screenshots/2.png differ diff --git a/manufacturing_reports/static/description/assets/screenshots/3.png b/manufacturing_reports/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..4c5118cc7 Binary files /dev/null and b/manufacturing_reports/static/description/assets/screenshots/3.png differ diff --git a/manufacturing_reports/static/description/assets/screenshots/4.png b/manufacturing_reports/static/description/assets/screenshots/4.png new file mode 100644 index 000000000..b06631675 Binary files /dev/null and b/manufacturing_reports/static/description/assets/screenshots/4.png differ diff --git a/manufacturing_reports/static/description/assets/screenshots/hero.gif b/manufacturing_reports/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..5f41979b3 Binary files /dev/null and b/manufacturing_reports/static/description/assets/screenshots/hero.gif differ diff --git a/manufacturing_reports/static/description/banner.png b/manufacturing_reports/static/description/banner.png new file mode 100644 index 000000000..2bd8827cc 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..295667001 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..c1e96d1b8 --- /dev/null +++ b/manufacturing_reports/static/description/index.html @@ -0,0 +1,709 @@ + + + + + + + Odoo App 3 Index + + + + + + + + +
+
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+
+
+
+

+ Manufacturing Reports

+

+ PDF & XLS Reports For Manufacturing Module +

+
+ +
+
+
+
+
+

+ Key Highlights +

+
+
+
+
+
+ +
+
+

+ Filter manufacturing orders based on Product

+
+
+
+
+
+
+ +
+
+

+ Filter orders based on the status of the + production

+
+
+
+
+
+
+ +
+
+

+ Enable filter based on the responsible person + for production

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

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

+
+
+
+
+
+
+ +
+
+

+ XLSX report

+
+
+
+
+
+
+
    +
  • + Available in + Odoo 17.0 Community and Enterprise. +
  • +
  • + Manufacturing + Reports +
      +
    • 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. +
    • +
    +
  • +
+
+
+
+
+
+
Version + 17.0.1.0.0|Released on:28th March 2024 +
+

+ Initial Commit for Manufacturing Reports

+
+
+
+
+
+
+
+

+ 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/manufacturing_reports/static/src/js/action_manager.js b/manufacturing_reports/static/src/js/action_manager.js new file mode 100644 index 000000000..8eed9cf0e --- /dev/null +++ b/manufacturing_reports/static/src/js/action_manager.js @@ -0,0 +1,16 @@ +/** @odoo-module */ +import { registry } from "@web/core/registry"; +import { BlockUI } from "@web/core/ui/block_ui"; +import { download } from "@web/core/network/download"; +// This function is responsible for generating and downloading an XLSX report. +registry.category("ir.actions.report handlers").add("xlsx", async function (action){ + if (action.report_type === 'xlsx') { + const blockUI = new BlockUI(); + await download({ + url: '/xlsx_reports', + data: action.data, + complete: () => unblockUI, + error: (error) => self.call('crash_manager', 'rpc_error', error), + }); + } +}); diff --git a/manufacturing_reports/views/mrp_report_views.xml b/manufacturing_reports/views/mrp_report_views.xml new file mode 100644 index 000000000..c5c908a39 --- /dev/null +++ b/manufacturing_reports/views/mrp_report_views.xml @@ -0,0 +1,6 @@ + + + + + diff --git a/manufacturing_reports/wizards/__init__.py b/manufacturing_reports/wizards/__init__.py new file mode 100644 index 000000000..3151ab10c --- /dev/null +++ b/manufacturing_reports/wizards/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Jumana Haseen () +# +# 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 diff --git a/manufacturing_reports/wizards/mrp_report.py b/manufacturing_reports/wizards/mrp_report.py new file mode 100644 index 000000000..7c8cde8d0 --- /dev/null +++ b/manufacturing_reports/wizards/mrp_report.py @@ -0,0 +1,194 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Jumana Haseen () +# +# 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 api, fields, models +from odoo.tools import date_utils +from odoo.tools.safe_eval import json + + +class MrpReport(models.TransientModel): + _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') + state = fields.Selection( + [('draft', 'Draft'), ('confirmed', 'Confirmed'), ('planned', 'Planned'), + ('progress', 'In Progress'), + ('done', 'Done'), ('cancel', 'Cancelled')], string="Filter State") + + @api.onchange('filter_user') + def onchange_filter_mode(self): + if self.filter_user == 'False': + self.responsible_id = None + self.responsible_id = False + + @api.onchange('filter') + def onchange_filter_state(self): + if self.filter == 'False': + self.date_from = None + self.date_from = False + + def check_report(self): + """ + Function to fetch the mrp orders according to the filters given in + the wizard and print the XLS report + """ + orders = [] + conditions = [] + if self.product_id: + conditions.append(('product_id', 'in', self.product_id.ids)) + if self.state: + conditions.append(('state', '=', self.state)) + if self.date_from: + conditions.append(('date_start', '>=', self.date_from)) + if self.responsible_id: + conditions.append(('user_id', 'in', self.responsible_id.ids)) + + mrp_orders = self.env['mrp.production'].search(conditions) + 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_start, + 'state': dict(self.env['mrp.production']._fields[ + 'state']._description_selection( + self.env)).get(rec['state']), + }) + data = { + 'date_from': self.date_from, + 'state': dict(self.env['mrp.production']._fields[ + 'state']._description_selection( + self.env)).get(rec['state']), + '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 = [] + conditions = [] + if self.product_id: + conditions.append(('product_id', 'in', self.product_id.ids)) + if self.state: + conditions.append(('state', '=', self.state)) + if self.date_from: + conditions.append(('date_start', '>=', self.date_from)) + if self.responsible_id: + conditions.append(('user_id', 'in', self.responsible_id.ids)) + mrp_orders = self.env['mrp.production'].search(conditions) + 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_start, + 'state': dict(self.env['mrp.production']._fields[ + 'state']._description_selection( + self.env)).get(rec['state']), + }) + data = { + 'date_from': self.date_from, + 'state': [order['state'] for order in orders] if self.state else None, + 'mrp': orders + } + return self.env.ref( + 'manufacturing_reports.action_mrp_report').report_action(self, + data=data) + + def get_xlsx_report(self, data, response): + """ + Setting the position to print the datas in the xlsx file + """ + output = io.BytesIO() + workbook = xlsxwriter.Workbook(output, {'in_memory': True}) + head_format = workbook.add_format({ + 'bold': True, + 'align': 'center', + 'valign': 'vcenter', + 'fg_color': '#dec5c5' + }) + 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('C2:I3', 'Manufacturing Orders', head_format) + if data['date_from']: + sheet.write('C6', 'From:', cell_format) + sheet.merge_range('D6:E6', data['date_from'], txt_head) + if data['state'] and self.state: + sheet.write('C7', 'State:', cell_format) + sheet.merge_range('D7:E7', data['state'], txt_head) + else: + sheet.write('C7', 'State:', cell_format) + 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_report_views.xml b/manufacturing_reports/wizards/mrp_report_views.xml new file mode 100644 index 000000000..6afc09c1d --- /dev/null +++ b/manufacturing_reports/wizards/mrp_report_views.xml @@ -0,0 +1,41 @@ + + + + + MRP Report + ir.actions.act_window + mrp.report + form + new + + + + MRP Report + mrp.report + +
+ + + + + + + + + + + + + +
+
+
+