diff --git a/po_fourway_match_report/README.rst b/po_fourway_match_report/README.rst new file mode 100755 index 000000000..40205b483 --- /dev/null +++ b/po_fourway_match_report/README.rst @@ -0,0 +1,47 @@ +.. 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 + +Purchase Order-4Way Matching Report +=================================== +This module helps to Generate excel of 4Way matching purchase order report. + +Configuration +============= +* No additional configurations needed + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +* Developers: (V16) Anagha NK , + (V17) Akhil Ashok , + Contact:odoo@cybrosys.com + +License +======= +GNU AFFERO GENERAL PUBLIC LICENSE, Version 3 (AGPLv3) +(http://www.gnu.org/licenses/agpl.html) + +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/po_fourway_match_report/__init__.py b/po_fourway_match_report/__init__.py new file mode 100644 index 000000000..cfb05787d --- /dev/null +++ b/po_fourway_match_report/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Akhil Ashok () +# +# You can modify it under the terms of the GNU LESSER +# 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 LESSER GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +from . import controllers +from . import wizard diff --git a/po_fourway_match_report/__manifest__.py b/po_fourway_match_report/__manifest__.py new file mode 100644 index 000000000..3eb02f353 --- /dev/null +++ b/po_fourway_match_report/__manifest__.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Akhil Ashok () +# +# You can modify it under the terms of the GNU LESSER +# 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 LESSER GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +{ + 'name': 'Purchase Order-4Way Matching Report', + 'version': '17.0.1.0.0', + 'category': 'Purchases', + 'summary': """ + Helps to Generate excel of purchase order four way match report""", + 'description': """This module helps to Generate excel of purchase order + four way match report includes purchase order line, move lines,invoice + lines and payments in excel report """, + 'author': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'depends': ['purchase', 'stock'], + 'data': [ + 'security/ir.model.access.csv', + 'wizard/po_fourway_match_report_views.xml', + ], + 'assets': { + 'web.assets_backend': [ + 'po_fourway_match_report/static/src/js/action_manager.js', + ], + }, + 'images': ['static/description/banner.jpg'], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/po_fourway_match_report/controllers/__init__.py b/po_fourway_match_report/controllers/__init__.py new file mode 100644 index 000000000..63dc34514 --- /dev/null +++ b/po_fourway_match_report/controllers/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Akhil Ashok () +# +# You can modify it under the terms of the GNU LESSER +# 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 LESSER GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +from . import po_fourway_match_report diff --git a/po_fourway_match_report/controllers/po_fourway_match_report.py b/po_fourway_match_report/controllers/po_fourway_match_report.py new file mode 100644 index 000000000..3e2293fd1 --- /dev/null +++ b/po_fourway_match_report/controllers/po_fourway_match_report.py @@ -0,0 +1,59 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Akhil Ashok () +# +# You can modify it under the terms of the GNU LESSER +# 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 LESSER GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER 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): + """Defining controller for 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, **kw): + """Generating xlsx report""" + 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/po_fourway_match_report/doc/RELEASE_NOTES.md b/po_fourway_match_report/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..ed72053e1 --- /dev/null +++ b/po_fourway_match_report/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 02.12.2024 +#### Version 17.0.1.0.0 +#### ADD +- Initial commit for Purchase Order-4Way Matching Report diff --git a/po_fourway_match_report/security/ir.model.access.csv b/po_fourway_match_report/security/ir.model.access.csv new file mode 100644 index 000000000..5045db04d --- /dev/null +++ b/po_fourway_match_report/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_fourway_report_user,access.fourway.report.user,model_fourway_report,base.group_user,1,1,1,1 diff --git a/po_fourway_match_report/static/description/assets/icons/capture (1).png b/po_fourway_match_report/static/description/assets/icons/capture (1).png new file mode 100644 index 000000000..8824deafc Binary files /dev/null and b/po_fourway_match_report/static/description/assets/icons/capture (1).png differ diff --git a/po_fourway_match_report/static/description/assets/icons/check.png b/po_fourway_match_report/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/po_fourway_match_report/static/description/assets/icons/check.png differ diff --git a/po_fourway_match_report/static/description/assets/icons/chevron.png b/po_fourway_match_report/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/po_fourway_match_report/static/description/assets/icons/chevron.png differ diff --git a/po_fourway_match_report/static/description/assets/icons/cogs.png b/po_fourway_match_report/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/po_fourway_match_report/static/description/assets/icons/cogs.png differ diff --git a/po_fourway_match_report/static/description/assets/icons/consultation.png b/po_fourway_match_report/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/po_fourway_match_report/static/description/assets/icons/consultation.png differ diff --git a/po_fourway_match_report/static/description/assets/icons/ecom-black.png b/po_fourway_match_report/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/po_fourway_match_report/static/description/assets/icons/ecom-black.png differ diff --git a/po_fourway_match_report/static/description/assets/icons/education-black.png b/po_fourway_match_report/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/po_fourway_match_report/static/description/assets/icons/education-black.png differ diff --git a/po_fourway_match_report/static/description/assets/icons/hotel-black.png b/po_fourway_match_report/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/po_fourway_match_report/static/description/assets/icons/hotel-black.png differ diff --git a/po_fourway_match_report/static/description/assets/icons/img.png b/po_fourway_match_report/static/description/assets/icons/img.png new file mode 100644 index 000000000..70197f477 Binary files /dev/null and b/po_fourway_match_report/static/description/assets/icons/img.png differ diff --git a/po_fourway_match_report/static/description/assets/icons/license.png b/po_fourway_match_report/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/po_fourway_match_report/static/description/assets/icons/license.png differ diff --git a/po_fourway_match_report/static/description/assets/icons/lifebuoy.png b/po_fourway_match_report/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/po_fourway_match_report/static/description/assets/icons/lifebuoy.png differ diff --git a/po_fourway_match_report/static/description/assets/icons/manufacturing-black.png b/po_fourway_match_report/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/po_fourway_match_report/static/description/assets/icons/manufacturing-black.png differ diff --git a/po_fourway_match_report/static/description/assets/icons/photo-capture.png b/po_fourway_match_report/static/description/assets/icons/photo-capture.png new file mode 100644 index 000000000..06c111758 Binary files /dev/null and b/po_fourway_match_report/static/description/assets/icons/photo-capture.png differ diff --git a/po_fourway_match_report/static/description/assets/icons/pos-black.png b/po_fourway_match_report/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/po_fourway_match_report/static/description/assets/icons/pos-black.png differ diff --git a/po_fourway_match_report/static/description/assets/icons/puzzle.png b/po_fourway_match_report/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/po_fourway_match_report/static/description/assets/icons/puzzle.png differ diff --git a/po_fourway_match_report/static/description/assets/icons/restaurant-black.png b/po_fourway_match_report/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/po_fourway_match_report/static/description/assets/icons/restaurant-black.png differ diff --git a/po_fourway_match_report/static/description/assets/icons/service-black.png b/po_fourway_match_report/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/po_fourway_match_report/static/description/assets/icons/service-black.png differ diff --git a/po_fourway_match_report/static/description/assets/icons/trading-black.png b/po_fourway_match_report/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/po_fourway_match_report/static/description/assets/icons/trading-black.png differ diff --git a/po_fourway_match_report/static/description/assets/icons/training.png b/po_fourway_match_report/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/po_fourway_match_report/static/description/assets/icons/training.png differ diff --git a/po_fourway_match_report/static/description/assets/icons/update.png b/po_fourway_match_report/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/po_fourway_match_report/static/description/assets/icons/update.png differ diff --git a/po_fourway_match_report/static/description/assets/icons/user.png b/po_fourway_match_report/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/po_fourway_match_report/static/description/assets/icons/user.png differ diff --git a/po_fourway_match_report/static/description/assets/icons/wrench.png b/po_fourway_match_report/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/po_fourway_match_report/static/description/assets/icons/wrench.png differ diff --git a/po_fourway_match_report/static/description/assets/misc/Cybrosys R.png b/po_fourway_match_report/static/description/assets/misc/Cybrosys R.png new file mode 100644 index 000000000..da4058087 Binary files /dev/null and b/po_fourway_match_report/static/description/assets/misc/Cybrosys R.png differ diff --git a/po_fourway_match_report/static/description/assets/misc/email.svg b/po_fourway_match_report/static/description/assets/misc/email.svg new file mode 100644 index 000000000..15291cdc3 --- /dev/null +++ b/po_fourway_match_report/static/description/assets/misc/email.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/po_fourway_match_report/static/description/assets/misc/phone.svg b/po_fourway_match_report/static/description/assets/misc/phone.svg new file mode 100644 index 000000000..b7bd7f251 --- /dev/null +++ b/po_fourway_match_report/static/description/assets/misc/phone.svg @@ -0,0 +1,3 @@ + + + diff --git a/po_fourway_match_report/static/description/assets/misc/star (1) 2.svg b/po_fourway_match_report/static/description/assets/misc/star (1) 2.svg new file mode 100644 index 000000000..5ae9f507a --- /dev/null +++ b/po_fourway_match_report/static/description/assets/misc/star (1) 2.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/po_fourway_match_report/static/description/assets/misc/support (1) 1.svg b/po_fourway_match_report/static/description/assets/misc/support (1) 1.svg new file mode 100644 index 000000000..7d37a8f30 --- /dev/null +++ b/po_fourway_match_report/static/description/assets/misc/support (1) 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/po_fourway_match_report/static/description/assets/misc/support-email.svg b/po_fourway_match_report/static/description/assets/misc/support-email.svg new file mode 100644 index 000000000..eb70370d6 --- /dev/null +++ b/po_fourway_match_report/static/description/assets/misc/support-email.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/po_fourway_match_report/static/description/assets/misc/tick-mark.svg b/po_fourway_match_report/static/description/assets/misc/tick-mark.svg new file mode 100644 index 000000000..2dbb40187 --- /dev/null +++ b/po_fourway_match_report/static/description/assets/misc/tick-mark.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/po_fourway_match_report/static/description/assets/misc/whatsapp 1.svg b/po_fourway_match_report/static/description/assets/misc/whatsapp 1.svg new file mode 100644 index 000000000..0bfaf8fc6 --- /dev/null +++ b/po_fourway_match_report/static/description/assets/misc/whatsapp 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/po_fourway_match_report/static/description/assets/misc/whatsapp.svg b/po_fourway_match_report/static/description/assets/misc/whatsapp.svg new file mode 100644 index 000000000..b618aea1d --- /dev/null +++ b/po_fourway_match_report/static/description/assets/misc/whatsapp.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/po_fourway_match_report/static/description/assets/modules/1.png b/po_fourway_match_report/static/description/assets/modules/1.png new file mode 100644 index 000000000..64d47fed4 Binary files /dev/null and b/po_fourway_match_report/static/description/assets/modules/1.png differ diff --git a/po_fourway_match_report/static/description/assets/modules/2.png b/po_fourway_match_report/static/description/assets/modules/2.png new file mode 100644 index 000000000..1747140bd Binary files /dev/null and b/po_fourway_match_report/static/description/assets/modules/2.png differ diff --git a/po_fourway_match_report/static/description/assets/modules/3.png b/po_fourway_match_report/static/description/assets/modules/3.png new file mode 100644 index 000000000..3bf448d7a Binary files /dev/null and b/po_fourway_match_report/static/description/assets/modules/3.png differ diff --git a/po_fourway_match_report/static/description/assets/modules/banner4.jpg b/po_fourway_match_report/static/description/assets/modules/banner4.jpg new file mode 100644 index 000000000..a68431b9d Binary files /dev/null and b/po_fourway_match_report/static/description/assets/modules/banner4.jpg differ diff --git a/po_fourway_match_report/static/description/assets/modules/banner5.jpg b/po_fourway_match_report/static/description/assets/modules/banner5.jpg new file mode 100644 index 000000000..5d47bad17 Binary files /dev/null and b/po_fourway_match_report/static/description/assets/modules/banner5.jpg differ diff --git a/po_fourway_match_report/static/description/assets/modules/banner6.jpg b/po_fourway_match_report/static/description/assets/modules/banner6.jpg new file mode 100644 index 000000000..614902f75 Binary files /dev/null and b/po_fourway_match_report/static/description/assets/modules/banner6.jpg differ diff --git a/po_fourway_match_report/static/description/assets/screenshots/1.png b/po_fourway_match_report/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..bc0d133d1 Binary files /dev/null and b/po_fourway_match_report/static/description/assets/screenshots/1.png differ diff --git a/po_fourway_match_report/static/description/assets/screenshots/2.png b/po_fourway_match_report/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..b670bbde2 Binary files /dev/null and b/po_fourway_match_report/static/description/assets/screenshots/2.png differ diff --git a/po_fourway_match_report/static/description/assets/screenshots/3.png b/po_fourway_match_report/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..8bccf5479 Binary files /dev/null and b/po_fourway_match_report/static/description/assets/screenshots/3.png differ diff --git a/po_fourway_match_report/static/description/assets/screenshots/4.png b/po_fourway_match_report/static/description/assets/screenshots/4.png new file mode 100644 index 000000000..3a730ac1b Binary files /dev/null and b/po_fourway_match_report/static/description/assets/screenshots/4.png differ diff --git a/po_fourway_match_report/static/description/assets/screenshots/hero.gif b/po_fourway_match_report/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..9b602febd Binary files /dev/null and b/po_fourway_match_report/static/description/assets/screenshots/hero.gif differ diff --git a/po_fourway_match_report/static/description/banner.jpg b/po_fourway_match_report/static/description/banner.jpg new file mode 100644 index 000000000..07c98ef6e Binary files /dev/null and b/po_fourway_match_report/static/description/banner.jpg differ diff --git a/po_fourway_match_report/static/description/icon.png b/po_fourway_match_report/static/description/icon.png new file mode 100644 index 000000000..936b3c1f0 Binary files /dev/null and b/po_fourway_match_report/static/description/icon.png differ diff --git a/po_fourway_match_report/static/description/index.html b/po_fourway_match_report/static/description/index.html new file mode 100644 index 000000000..5de17b92a --- /dev/null +++ b/po_fourway_match_report/static/description/index.html @@ -0,0 +1,674 @@ + + + + + + + Odoo App 3 Index + + + + + + + + +
+
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+
+
+
+

+ Purchase Order-4Way Matching Report

+

+ Helps To Create 4way Matching Report based On + PO/Shipment/Vendor Bill/Payment. +

+
+ +
+
+
+
+
+

+ Key Highlights +

+
+
+
+
+
+ +
+
+

+ Community & Enterprise Support.

+
+
+
+
+
+
+ +
+
+

+ Allow to print purchase order line, move lines, invoice lines and payments into Excel 4-Way Matching report

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

+ Menu For 4Way Match Report +

+
+
+
+
+
+
+ +
+
+

After + Print Xlsx Report Based On Given Details. +

+
+
+
+
+
+
+ +
+
+

+ Xlsx Report Based On Vendors,Multiple Orders

+
+
+
+
+
+
+
    +
  • + Community & Enterprise Support. +
  • +
  • + Allow to print purchase order line, move lines, invoice lines and payments into Excel 4-Way Matching report +
  • +
+
+
+
+
+
+
Version + 17.0.1.0.0|Released on:23rd July 2024 +
+

+ Initial Commit for Automatic Invoice And + Post

+
+
+
+
+
+
+
+

+ 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/po_fourway_match_report/static/src/js/action_manager.js b/po_fourway_match_report/static/src/js/action_manager.js new file mode 100644 index 000000000..44e3b38e6 --- /dev/null +++ b/po_fourway_match_report/static/src/js/action_manager.js @@ -0,0 +1,18 @@ +/** @odoo-module **/ +import { registry } from "@web/core/registry"; +import { BlockUI } from "@web/core/ui/block_ui"; +import { download } from "@web/core/network/download"; +/** +This handler is responsible for generating XLSX reports. +*/ +registry.category("ir.actions.report handlers").add("qwerty_xlsx", async function (action) { + if (action.report_type === 'xlsx') { + BlockUI; + await download({ + url: '/xlsx_reports', + data: action.data, + complete: () => unblockUI, + error: (error) => self.call('crash_manager', 'rpc_error', error), + }); + } +}); diff --git a/po_fourway_match_report/wizard/__init__.py b/po_fourway_match_report/wizard/__init__.py new file mode 100644 index 000000000..63dc34514 --- /dev/null +++ b/po_fourway_match_report/wizard/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Akhil Ashok () +# +# You can modify it under the terms of the GNU LESSER +# 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 LESSER GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +from . import po_fourway_match_report diff --git a/po_fourway_match_report/wizard/po_fourway_match_report.py b/po_fourway_match_report/wizard/po_fourway_match_report.py new file mode 100644 index 000000000..5d343bc42 --- /dev/null +++ b/po_fourway_match_report/wizard/po_fourway_match_report.py @@ -0,0 +1,155 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Akhil Ashok () +# +# You can modify it under the terms of the GNU LESSER +# 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 LESSER GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +import io +import json +from odoo import api, fields, models +from odoo.tools import date_utils + +try: + from odoo.tools.misc import xlsxwriter +except ImportError: + import xlsxwriter + + +class FourwayReport(models.TransientModel): + """Defines fields that needed to fetching data for generating fourway xlsx + report""" + _name = "fourway.report" + _description = "Fourway Report" + + partner_id = fields.Many2one('res.partner', string='Vendor', + help="Select one or more vendors to get " + "specified details") + order_ids = fields.Many2many('purchase.order', string='Purchase Order', + domain="[('partner_id', '=', partner_id)]", + help="Select multiple purchase orders to " + "generate report.") + + @api.onchange('partner_id') + def _onchange_partner_id(self): + """ + Triggered when the partner_id field changes. + + This method clears the order_ids related to the current record + by removing all existing entries. This is useful for resetting + the order list when a new partner is selected, ensuring that + only relevant orders are displayed for the selected partner. + + :return: None + """ + self.order_ids = [(5, 0, 0)] + + def print_xlsx(self): + """Action for printing xlsx fourway report""" + data = { + 'partner_id': self.partner_id.id, + 'order_ids': self.order_ids.ids, + } + return { + 'type': 'ir.actions.report', + 'data': { + 'model': 'fourway.report', + 'options': json.dumps(data, + default=date_utils.json_default), + 'output_format': 'xlsx', + 'report_name': 'Four Way Matching Report', + }, + 'report_type': 'xlsx', + } + + def get_xlsx_report(self, data, response): + """Generating the XLSX report based on selected fields""" + output = io.BytesIO() + workbook = xlsxwriter.Workbook(output, {'in_memory': True}) + sheet = workbook.add_worksheet() + sheet.set_row(9, 30) + # Set the width of the columns + column_widths = [10, 13, 10, 13, 17, 10, 10, 10, 10, 15, 10, 11, 10, 17, + 12, 12, 18, 10, 12] + for i, width in enumerate(column_widths): + sheet.set_column(i, i, width) + cell_format = workbook.add_format( + {'align': 'center', 'bold': True, 'font_size': '10px', + 'bg_color': '#AAAAAA', 'text_wrap': True}) + head = workbook.add_format( + {'align': 'center', 'bold': True, 'font_size': '20px', }) + sheet.merge_range('B2:I3', '4WAY MATCHING PO REPORT', head) + + # Write column headers + headers = ['PURCHASE ORDER', 'VENDOR', 'PO DATE', 'PRODUCT CODE', + 'DESCRIPTION', 'UNIT PRICE', 'ORDER QTY', 'TAX AMOUNT', + 'AMOUNT TOTAL', 'REFERENCE', 'VALIDATE DATE', + 'DESTINATION LOCATION', 'QUANTITY', 'BILL', 'BILL DATE', + 'BILL AMOUNT', 'PAYMENT NUMBER', 'PAYMENT DATE', + 'PAYMENT AMOUNT'] + for i, header in enumerate(headers): + sheet.write(9, i, header, cell_format) + + purchase = self.env['purchase.order'].browse(data['order_ids']) + purchase_orderline = purchase.mapped('order_line') + row = 10 + for rec in purchase_orderline: + sheet.write(row, 0, rec.order_id.name) + sheet.write(row, 1, rec.order_id.partner_id.name) + sheet.write(row, 2, str(rec.order_id.date_order.date())) + sheet.write(row, 3, rec.product_id.default_code) + sheet.write(row, 4, rec.product_id.name) + sheet.write(row, 5, float(rec.price_unit)) + sheet.write(row, 6, rec.product_qty) + sheet.write(row, 7, float(rec.price_tax)) + sheet.write(row, 8, float(rec.price_total)) + row += 1 + + # Moves + if rec.move_ids: + for move in rec.move_ids: + sheet.write(row, 9, move.picking_id.name) + if move.picking_id.state == 'done': + sheet.write(row, 10, + str(move.picking_id.date_done.date())) + sheet.write(row, 11, move.location_dest_id.display_name) + sheet.write(row, 12, move.quantity) + row += 1 + + # Invoice lines + if rec.invoice_lines: + for bill_line in rec.invoice_lines: + sheet.write(row, 13, bill_line.move_id.name) + sheet.write(row, 14, str(bill_line.move_id.date)) + sheet.write(row, 15, float(bill_line.price_total)) + row += 1 + payments = self.env['account.payment'].search([]).filtered( + lambda + x: bill_line.move_id.id in x.reconciled_bill_ids.ids) + if payments: + for pay in payments: + sheet.write(row, 16, pay.name) + sheet.write(row, 17, str(pay.date)) + sheet.write(row, 18, float(pay.amount)) + row += 1 + else: + row += 1 + + workbook.close() + output.seek(0) + response.stream.write(output.read()) + output.close() diff --git a/po_fourway_match_report/wizard/po_fourway_match_report_views.xml b/po_fourway_match_report/wizard/po_fourway_match_report_views.xml new file mode 100644 index 000000000..68072409e --- /dev/null +++ b/po_fourway_match_report/wizard/po_fourway_match_report_views.xml @@ -0,0 +1,37 @@ + + + + + fourway.report.view.form + fourway.report + +
+ + + + + + +
+
+
+
+
+ + + PO 4way Matching + ir.actions.act_window + fourway.report + form + new + + + +