From 3b5ad32efb976575d886af5869a0e7f858b316da Mon Sep 17 00:00:00 2001 From: Risvana Cybro Date: Thu, 4 Dec 2025 16:04:27 +0530 Subject: [PATCH] :Dec 04 [FIX] Bug Fixed 'dynamic_accounts_report' --- dynamic_accounts_report/__init__.py | 1 - dynamic_accounts_report/__manifest__.py | 2 +- .../controllers/__init__.py | 22 ------ .../controllers/controllers.py | 71 ------------------- dynamic_accounts_report/doc/RELEASE_NOTES.md | 5 ++ 5 files changed, 6 insertions(+), 95 deletions(-) delete mode 100644 dynamic_accounts_report/controllers/__init__.py delete mode 100644 dynamic_accounts_report/controllers/controllers.py diff --git a/dynamic_accounts_report/__init__.py b/dynamic_accounts_report/__init__.py index 3c149a986..7a4467bb9 100644 --- a/dynamic_accounts_report/__init__.py +++ b/dynamic_accounts_report/__init__.py @@ -19,5 +19,4 @@ # If not, see . # ################################################################################ -from . import controllers from . import models diff --git a/dynamic_accounts_report/__manifest__.py b/dynamic_accounts_report/__manifest__.py index d3de9fa9b..d39edd231 100644 --- a/dynamic_accounts_report/__manifest__.py +++ b/dynamic_accounts_report/__manifest__.py @@ -21,7 +21,7 @@ ################################################################################ { 'name': 'Odoo18 Dynamic Accounting Reports', - 'version': '18.0.1.2.5', + 'version': '18.0.1.2.6', 'category': 'Accounting', 'summary': "Odoo 18 Accounting Financial Reports,Dynamic Accounting Reports, Dynamic Financial Reports,Dynamic Report Odoo18, Odoo18,Financial Reports, Odoo18 Accounting,Accounting, Odoo Apps", 'description': "This module creates dynamic Accounting General Ledger, Trial" diff --git a/dynamic_accounts_report/controllers/__init__.py b/dynamic_accounts_report/controllers/__init__.py deleted file mode 100644 index 37edc9a8c..000000000 --- a/dynamic_accounts_report/controllers/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# -*- coding: utf-8 -*- -################################################################################ -# -# Cybrosys Technologies Pvt. Ltd. -# -# Copyright (C) 2024-TODAY Cybrosys Technologies() -# Author: Bhagyadev KP () -# -# You can modify it under the terms of the GNU LESSER -# GENERAL PUBLIC LICENSE (LGPL 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 (LGPL v3) for more details. -# -# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE -# (LGPL v3) along with this program. -# If not, see . -# -################################################################################ -from . import controllers diff --git a/dynamic_accounts_report/controllers/controllers.py b/dynamic_accounts_report/controllers/controllers.py deleted file mode 100644 index 02f78d48a..000000000 --- a/dynamic_accounts_report/controllers/controllers.py +++ /dev/null @@ -1,71 +0,0 @@ -# -*- coding: utf-8 -*- -################################################################################ -# -# Cybrosys Technologies Pvt. Ltd. -# -# Copyright (C) 2024-TODAY Cybrosys Technologies() -# Author: Bhagyadev KP () -# -# You can modify it under the terms of the GNU LESSER -# GENERAL PUBLIC LICENSE (LGPL 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 (LGPL v3) for more details. -# -# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE -# (LGPL 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_report', type='http', auth='user', methods=['POST'], - csrf=False) - def get_report_xlsx(self, model, data, output_format, report_name, - report_action): - """Generate an XLSX report based on the provided data and return it as - a response. - Args: - model (str): The name of the model on which the report is based. - data (str): The data required for generating the report. - output_format (str): The desired output format for the report - (e.g., 'xlsx'). - report_name (str): The name to be given to the generated report - file. - Returns: - Response: The generated report file as a response. - Raises: - Exception: If an error occurs during report generation. - """ - uid = request.session.uid - report_obj = request.env[model].with_user(uid) - 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(data, response, report_name, - report_action) - 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/dynamic_accounts_report/doc/RELEASE_NOTES.md b/dynamic_accounts_report/doc/RELEASE_NOTES.md index d9a5515f6..a7edf3c99 100644 --- a/dynamic_accounts_report/doc/RELEASE_NOTES.md +++ b/dynamic_accounts_report/doc/RELEASE_NOTES.md @@ -29,3 +29,8 @@ #### Version 18.0.1.2.5 #### UPDT - Bug Fixing in the accounting report (Trial Balance). + +#### 03.12.2025 +#### Version 18.0.1.2.6 +#### BUG FIX +- Removed the controller for xlsx report generation which was already present in the dependent module base_accounting_kit.