diff --git a/advance_cash_flow_statements/README.rst b/advance_cash_flow_statements/README.rst deleted file mode 100644 index 5e63de140..000000000 --- a/advance_cash_flow_statements/README.rst +++ /dev/null @@ -1,48 +0,0 @@ -.. 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 - -Advanced Cash Flow Statements -============================== -Generate 4 levels of Dynamic Cash Flow Statements Report. - -Configuration -============= -No configuration - -Company -------- -* `Cybrosys Techno Solutions `__ - -License -------- -General Public License, Version 3 (AGPL v3). -(https://www.gnu.org/licenses/agpl-3.0-standalone.html) - -Credits -------- -Developer: (V17) Mily Shajan , - (v17) Gayathri V, -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/advance_cash_flow_statements/__init__.py b/advance_cash_flow_statements/__init__.py deleted file mode 100644 index a48d98354..000000000 --- a/advance_cash_flow_statements/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################### -# -# Cybrosys Technologies Pvt. Ltd. -# -# Copyright (C) 2024-TODAY Cybrosys Technologies(). -# Author: Gayathri V (odoo@cybrosys.com) -# -# 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 wizard diff --git a/advance_cash_flow_statements/__manifest__.py b/advance_cash_flow_statements/__manifest__.py deleted file mode 100644 index 10b099095..000000000 --- a/advance_cash_flow_statements/__manifest__.py +++ /dev/null @@ -1,51 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################### -# -# Cybrosys Technologies Pvt. Ltd. -# -# Copyright (C) 2024-TODAY Cybrosys Technologies(). -# Author: Gayathri V (odoo@cybrosys.com) -# -# 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': 'Advanced Cash Flow Statements', - 'version': '17.0.1.0.0', - 'summary': """Generate four levels of cash flow statement reports in PDF and - Excel""", - 'description': """Generate four levels of cash flow statement reports in PDF - and Excel, pdf report, excel report, - cashflow, odoo17""", - 'author': "Cybrosys Techno Solutions", - 'company': 'Cybrosys Techno Solutions', - 'maintainer': 'Cybrosys Techno Solutions', - 'website': "https://www.cybrosys.com", - 'category': 'Accounting', - 'depends': ['account_accountant', 'account'], - 'data': ['security/ir.model.access.csv', - 'report/account_wizard_reports.xml', - 'report/account_wizard_templates.xml', - 'views/account_wizard_views.xml', - ], - 'assets': { - 'web.assets_backend': [ - 'advance_cash_flow_statements/static/src/js/action_manager.js' - ], - }, - 'images': ['static/description/banner.jpg'], - 'license': 'AGPL-3', - 'installable': True, - 'auto_install': False, - 'application': False, -} diff --git a/advance_cash_flow_statements/controllers/__init__.py b/advance_cash_flow_statements/controllers/__init__.py deleted file mode 100644 index bc361b4f2..000000000 --- a/advance_cash_flow_statements/controllers/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################### -# -# Cybrosys Technologies Pvt. Ltd. -# -# Copyright (C) 2024-TODAY Cybrosys Technologies(). -# Author: Gayathri V (odoo@cybrosys.com) -# -# 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 advance_cash_flow_statements diff --git a/advance_cash_flow_statements/controllers/advance_cash_flow_statements.py b/advance_cash_flow_statements/controllers/advance_cash_flow_statements.py deleted file mode 100644 index 6f240a561..000000000 --- a/advance_cash_flow_statements/controllers/advance_cash_flow_statements.py +++ /dev/null @@ -1,58 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################### -# -# Cybrosys Technologies Pvt. Ltd. -# -# Copyright (C) 2024-TODAY Cybrosys Technologies(). -# Author: Gayathri V (odoo@cybrosys.com) -# -# 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): - """ Generates an 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): - """ Generates an 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/advance_cash_flow_statements/doc/RELEASE_NOTES.md b/advance_cash_flow_statements/doc/RELEASE_NOTES.md deleted file mode 100644 index 5746e88fc..000000000 --- a/advance_cash_flow_statements/doc/RELEASE_NOTES.md +++ /dev/null @@ -1,6 +0,0 @@ -## Module - -#### 27.03.2024 -#### Version 17.0.1.0.0 -##### ADD -- Initial commit for Advanced Cash Flow Statements diff --git a/advance_cash_flow_statements/report/account_wizard_reports.xml b/advance_cash_flow_statements/report/account_wizard_reports.xml deleted file mode 100644 index c187dab4f..000000000 --- a/advance_cash_flow_statements/report/account_wizard_reports.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - Cash flow statement Pdf Report - account.wizard - qweb-pdf - advance_cash_flow_statements.cash_flow_pdf_report - advance_cash_flow_statements.cash_flow_pdf_report - - diff --git a/advance_cash_flow_statements/report/account_wizard_templates.xml b/advance_cash_flow_statements/report/account_wizard_templates.xml deleted file mode 100644 index 5324bc603..000000000 --- a/advance_cash_flow_statements/report/account_wizard_templates.xml +++ /dev/null @@ -1,233 +0,0 @@ - - - - - diff --git a/advance_cash_flow_statements/security/ir.model.access.csv b/advance_cash_flow_statements/security/ir.model.access.csv deleted file mode 100644 index b7a5b4683..000000000 --- a/advance_cash_flow_statements/security/ir.model.access.csv +++ /dev/null @@ -1,2 +0,0 @@ -id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink -access_account_wizard_user,account.wizard.user,model_account_wizard,base.group_user,1,1,1,1 diff --git a/advance_cash_flow_statements/static/description/assets/icons/capture (1).png b/advance_cash_flow_statements/static/description/assets/icons/capture (1).png deleted file mode 100644 index 8824deafc..000000000 Binary files a/advance_cash_flow_statements/static/description/assets/icons/capture (1).png and /dev/null differ diff --git a/advance_cash_flow_statements/static/description/assets/icons/check.png b/advance_cash_flow_statements/static/description/assets/icons/check.png deleted file mode 100644 index c8e85f51d..000000000 Binary files a/advance_cash_flow_statements/static/description/assets/icons/check.png and /dev/null differ diff --git a/advance_cash_flow_statements/static/description/assets/icons/chevron.png b/advance_cash_flow_statements/static/description/assets/icons/chevron.png deleted file mode 100644 index 2089293d6..000000000 Binary files a/advance_cash_flow_statements/static/description/assets/icons/chevron.png and /dev/null differ diff --git a/advance_cash_flow_statements/static/description/assets/icons/cogs.png b/advance_cash_flow_statements/static/description/assets/icons/cogs.png deleted file mode 100644 index 95d0bad62..000000000 Binary files a/advance_cash_flow_statements/static/description/assets/icons/cogs.png and /dev/null differ diff --git a/advance_cash_flow_statements/static/description/assets/icons/consultation.png b/advance_cash_flow_statements/static/description/assets/icons/consultation.png deleted file mode 100644 index 8319d4baa..000000000 Binary files a/advance_cash_flow_statements/static/description/assets/icons/consultation.png and /dev/null differ diff --git a/advance_cash_flow_statements/static/description/assets/icons/ecom-black.png b/advance_cash_flow_statements/static/description/assets/icons/ecom-black.png deleted file mode 100644 index a9385ff13..000000000 Binary files a/advance_cash_flow_statements/static/description/assets/icons/ecom-black.png and /dev/null differ diff --git a/advance_cash_flow_statements/static/description/assets/icons/education-black.png b/advance_cash_flow_statements/static/description/assets/icons/education-black.png deleted file mode 100644 index 3eb09b27b..000000000 Binary files a/advance_cash_flow_statements/static/description/assets/icons/education-black.png and /dev/null differ diff --git a/advance_cash_flow_statements/static/description/assets/icons/hotel-black.png b/advance_cash_flow_statements/static/description/assets/icons/hotel-black.png deleted file mode 100644 index 130f613be..000000000 Binary files a/advance_cash_flow_statements/static/description/assets/icons/hotel-black.png and /dev/null differ diff --git a/advance_cash_flow_statements/static/description/assets/icons/img.png b/advance_cash_flow_statements/static/description/assets/icons/img.png deleted file mode 100644 index 70197f477..000000000 Binary files a/advance_cash_flow_statements/static/description/assets/icons/img.png and /dev/null differ diff --git a/advance_cash_flow_statements/static/description/assets/icons/license.png b/advance_cash_flow_statements/static/description/assets/icons/license.png deleted file mode 100644 index a5869797e..000000000 Binary files a/advance_cash_flow_statements/static/description/assets/icons/license.png and /dev/null differ diff --git a/advance_cash_flow_statements/static/description/assets/icons/lifebuoy.png b/advance_cash_flow_statements/static/description/assets/icons/lifebuoy.png deleted file mode 100644 index 658d56ccc..000000000 Binary files a/advance_cash_flow_statements/static/description/assets/icons/lifebuoy.png and /dev/null differ diff --git a/advance_cash_flow_statements/static/description/assets/icons/manufacturing-black.png b/advance_cash_flow_statements/static/description/assets/icons/manufacturing-black.png deleted file mode 100644 index 697eb0e9f..000000000 Binary files a/advance_cash_flow_statements/static/description/assets/icons/manufacturing-black.png and /dev/null differ diff --git a/advance_cash_flow_statements/static/description/assets/icons/photo-capture.png b/advance_cash_flow_statements/static/description/assets/icons/photo-capture.png deleted file mode 100644 index 06c111758..000000000 Binary files a/advance_cash_flow_statements/static/description/assets/icons/photo-capture.png and /dev/null differ diff --git a/advance_cash_flow_statements/static/description/assets/icons/pos-black.png b/advance_cash_flow_statements/static/description/assets/icons/pos-black.png deleted file mode 100644 index 97c0f90c1..000000000 Binary files a/advance_cash_flow_statements/static/description/assets/icons/pos-black.png and /dev/null differ diff --git a/advance_cash_flow_statements/static/description/assets/icons/puzzle.png b/advance_cash_flow_statements/static/description/assets/icons/puzzle.png deleted file mode 100644 index 65cf854e7..000000000 Binary files a/advance_cash_flow_statements/static/description/assets/icons/puzzle.png and /dev/null differ diff --git a/advance_cash_flow_statements/static/description/assets/icons/restaurant-black.png b/advance_cash_flow_statements/static/description/assets/icons/restaurant-black.png deleted file mode 100644 index 4a35eb939..000000000 Binary files a/advance_cash_flow_statements/static/description/assets/icons/restaurant-black.png and /dev/null differ diff --git a/advance_cash_flow_statements/static/description/assets/icons/service-black.png b/advance_cash_flow_statements/static/description/assets/icons/service-black.png deleted file mode 100644 index 301ab51cb..000000000 Binary files a/advance_cash_flow_statements/static/description/assets/icons/service-black.png and /dev/null differ diff --git a/advance_cash_flow_statements/static/description/assets/icons/trading-black.png b/advance_cash_flow_statements/static/description/assets/icons/trading-black.png deleted file mode 100644 index 9398ba2f1..000000000 Binary files a/advance_cash_flow_statements/static/description/assets/icons/trading-black.png and /dev/null differ diff --git a/advance_cash_flow_statements/static/description/assets/icons/training.png b/advance_cash_flow_statements/static/description/assets/icons/training.png deleted file mode 100644 index 884ca024d..000000000 Binary files a/advance_cash_flow_statements/static/description/assets/icons/training.png and /dev/null differ diff --git a/advance_cash_flow_statements/static/description/assets/icons/update.png b/advance_cash_flow_statements/static/description/assets/icons/update.png deleted file mode 100644 index ecbc5a01a..000000000 Binary files a/advance_cash_flow_statements/static/description/assets/icons/update.png and /dev/null differ diff --git a/advance_cash_flow_statements/static/description/assets/icons/user.png b/advance_cash_flow_statements/static/description/assets/icons/user.png deleted file mode 100644 index 6ffb23d9f..000000000 Binary files a/advance_cash_flow_statements/static/description/assets/icons/user.png and /dev/null differ diff --git a/advance_cash_flow_statements/static/description/assets/icons/wrench.png b/advance_cash_flow_statements/static/description/assets/icons/wrench.png deleted file mode 100644 index 6c04dea0f..000000000 Binary files a/advance_cash_flow_statements/static/description/assets/icons/wrench.png and /dev/null differ diff --git a/advance_cash_flow_statements/static/description/assets/misc/Cybrosys R.png b/advance_cash_flow_statements/static/description/assets/misc/Cybrosys R.png deleted file mode 100644 index da4058087..000000000 Binary files a/advance_cash_flow_statements/static/description/assets/misc/Cybrosys R.png and /dev/null differ diff --git a/advance_cash_flow_statements/static/description/assets/misc/email.svg b/advance_cash_flow_statements/static/description/assets/misc/email.svg deleted file mode 100644 index 15291cdc3..000000000 --- a/advance_cash_flow_statements/static/description/assets/misc/email.svg +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/advance_cash_flow_statements/static/description/assets/misc/phone.svg b/advance_cash_flow_statements/static/description/assets/misc/phone.svg deleted file mode 100644 index b7bd7f251..000000000 --- a/advance_cash_flow_statements/static/description/assets/misc/phone.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/advance_cash_flow_statements/static/description/assets/misc/star (1) 2.svg b/advance_cash_flow_statements/static/description/assets/misc/star (1) 2.svg deleted file mode 100644 index 5ae9f507a..000000000 --- a/advance_cash_flow_statements/static/description/assets/misc/star (1) 2.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/advance_cash_flow_statements/static/description/assets/misc/support (1) 1.svg b/advance_cash_flow_statements/static/description/assets/misc/support (1) 1.svg deleted file mode 100644 index 7d37a8f30..000000000 --- a/advance_cash_flow_statements/static/description/assets/misc/support (1) 1.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/advance_cash_flow_statements/static/description/assets/misc/support-email.svg b/advance_cash_flow_statements/static/description/assets/misc/support-email.svg deleted file mode 100644 index eb70370d6..000000000 --- a/advance_cash_flow_statements/static/description/assets/misc/support-email.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/advance_cash_flow_statements/static/description/assets/misc/tick-mark.svg b/advance_cash_flow_statements/static/description/assets/misc/tick-mark.svg deleted file mode 100644 index 2dbb40187..000000000 --- a/advance_cash_flow_statements/static/description/assets/misc/tick-mark.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/advance_cash_flow_statements/static/description/assets/misc/whatsapp 1.svg b/advance_cash_flow_statements/static/description/assets/misc/whatsapp 1.svg deleted file mode 100644 index 0bfaf8fc6..000000000 --- a/advance_cash_flow_statements/static/description/assets/misc/whatsapp 1.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/advance_cash_flow_statements/static/description/assets/misc/whatsapp.svg b/advance_cash_flow_statements/static/description/assets/misc/whatsapp.svg deleted file mode 100644 index b618aea1d..000000000 --- a/advance_cash_flow_statements/static/description/assets/misc/whatsapp.svg +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/advance_cash_flow_statements/static/description/assets/modules/1.png b/advance_cash_flow_statements/static/description/assets/modules/1.png deleted file mode 100644 index ba1058c42..000000000 Binary files a/advance_cash_flow_statements/static/description/assets/modules/1.png and /dev/null differ diff --git a/advance_cash_flow_statements/static/description/assets/modules/2.png b/advance_cash_flow_statements/static/description/assets/modules/2.png deleted file mode 100644 index 6949185dd..000000000 Binary files a/advance_cash_flow_statements/static/description/assets/modules/2.png and /dev/null differ diff --git a/advance_cash_flow_statements/static/description/assets/modules/3.png b/advance_cash_flow_statements/static/description/assets/modules/3.png deleted file mode 100644 index 4e506f79b..000000000 Binary files a/advance_cash_flow_statements/static/description/assets/modules/3.png and /dev/null differ diff --git a/advance_cash_flow_statements/static/description/assets/modules/4.png b/advance_cash_flow_statements/static/description/assets/modules/4.png deleted file mode 100644 index e78427938..000000000 Binary files a/advance_cash_flow_statements/static/description/assets/modules/4.png and /dev/null differ diff --git a/advance_cash_flow_statements/static/description/assets/modules/5.png b/advance_cash_flow_statements/static/description/assets/modules/5.png deleted file mode 100755 index 272ec20f9..000000000 Binary files a/advance_cash_flow_statements/static/description/assets/modules/5.png and /dev/null differ diff --git a/advance_cash_flow_statements/static/description/assets/modules/6.png b/advance_cash_flow_statements/static/description/assets/modules/6.png deleted file mode 100644 index 7d5c3154f..000000000 Binary files a/advance_cash_flow_statements/static/description/assets/modules/6.png and /dev/null differ diff --git a/advance_cash_flow_statements/static/description/assets/screenshots/1.png b/advance_cash_flow_statements/static/description/assets/screenshots/1.png deleted file mode 100644 index 305c7128e..000000000 Binary files a/advance_cash_flow_statements/static/description/assets/screenshots/1.png and /dev/null differ diff --git a/advance_cash_flow_statements/static/description/assets/screenshots/10.png b/advance_cash_flow_statements/static/description/assets/screenshots/10.png deleted file mode 100644 index 1a27fcd16..000000000 Binary files a/advance_cash_flow_statements/static/description/assets/screenshots/10.png and /dev/null differ diff --git a/advance_cash_flow_statements/static/description/assets/screenshots/2.png b/advance_cash_flow_statements/static/description/assets/screenshots/2.png deleted file mode 100644 index 9463126b0..000000000 Binary files a/advance_cash_flow_statements/static/description/assets/screenshots/2.png and /dev/null differ diff --git a/advance_cash_flow_statements/static/description/assets/screenshots/3.png b/advance_cash_flow_statements/static/description/assets/screenshots/3.png deleted file mode 100644 index db43d5277..000000000 Binary files a/advance_cash_flow_statements/static/description/assets/screenshots/3.png and /dev/null differ diff --git a/advance_cash_flow_statements/static/description/assets/screenshots/4.png b/advance_cash_flow_statements/static/description/assets/screenshots/4.png deleted file mode 100644 index d88331e67..000000000 Binary files a/advance_cash_flow_statements/static/description/assets/screenshots/4.png and /dev/null differ diff --git a/advance_cash_flow_statements/static/description/assets/screenshots/5.png b/advance_cash_flow_statements/static/description/assets/screenshots/5.png deleted file mode 100644 index 8bb72be43..000000000 Binary files a/advance_cash_flow_statements/static/description/assets/screenshots/5.png and /dev/null differ diff --git a/advance_cash_flow_statements/static/description/assets/screenshots/6.png b/advance_cash_flow_statements/static/description/assets/screenshots/6.png deleted file mode 100644 index 9b0111dda..000000000 Binary files a/advance_cash_flow_statements/static/description/assets/screenshots/6.png and /dev/null differ diff --git a/advance_cash_flow_statements/static/description/assets/screenshots/7.png b/advance_cash_flow_statements/static/description/assets/screenshots/7.png deleted file mode 100644 index 63c0ea456..000000000 Binary files a/advance_cash_flow_statements/static/description/assets/screenshots/7.png and /dev/null differ diff --git a/advance_cash_flow_statements/static/description/assets/screenshots/8.png b/advance_cash_flow_statements/static/description/assets/screenshots/8.png deleted file mode 100644 index 97f0c2f88..000000000 Binary files a/advance_cash_flow_statements/static/description/assets/screenshots/8.png and /dev/null differ diff --git a/advance_cash_flow_statements/static/description/assets/screenshots/9.png b/advance_cash_flow_statements/static/description/assets/screenshots/9.png deleted file mode 100644 index d797f17ba..000000000 Binary files a/advance_cash_flow_statements/static/description/assets/screenshots/9.png and /dev/null differ diff --git a/advance_cash_flow_statements/static/description/assets/screenshots/hero.png b/advance_cash_flow_statements/static/description/assets/screenshots/hero.png deleted file mode 100644 index 006db6822..000000000 Binary files a/advance_cash_flow_statements/static/description/assets/screenshots/hero.png and /dev/null differ diff --git a/advance_cash_flow_statements/static/description/banner.jpg b/advance_cash_flow_statements/static/description/banner.jpg deleted file mode 100644 index 3d85cac82..000000000 Binary files a/advance_cash_flow_statements/static/description/banner.jpg and /dev/null differ diff --git a/advance_cash_flow_statements/static/description/icon.png b/advance_cash_flow_statements/static/description/icon.png deleted file mode 100644 index 3f3454cfe..000000000 Binary files a/advance_cash_flow_statements/static/description/icon.png and /dev/null differ diff --git a/advance_cash_flow_statements/static/description/index.html b/advance_cash_flow_statements/static/description/index.html deleted file mode 100644 index f71b3cd5f..000000000 --- a/advance_cash_flow_statements/static/description/index.html +++ /dev/null @@ -1,712 +0,0 @@ - - - - - - - Odoo App 3 Index - - - - - - - - -
-
-
-
-
- -
-
-
- Community -
-
- Enterprise -
-
- Odoo.sh -
-
-
-
-
-
-

- Advanced Cash Flow Statements

-

- Generate four levels of cash flow statements. - Print reports in both PDF and XLSX formats -

-
- -
-
-
-
-
-

Key Highlights -

-
-
-
-
-
- -
-
-

Levels of Cash Flow

-

Generate four levels of cash flow statements. -

-
-
-
-
-
-
- -
-
-

Print reports in both PDF and XLSX - formats

-

It gives four levels reports in both formats -

-
-
-
-
-
- -
-
-
-
-
- -
-
-

- Access Advanced Cash Flow from the Menu -
- Go to Invoicing --> Reporting --> Financial Reports --> Adv Cash Flow Statement. -

-
-
-
-
-
-
- -
-
-

- Cash Flow Report in PDF and Excel

-
-
-
-
-
-
- -
-
-

- Cash Flow Statement Summary PDF

-
-
-
-
-
-
- -
-
-

- Cash Flow Statement Summary Excel

-
-
-
-
-
-
- -
-
-

- Cash flow Statement Consolidated PDF Report.

-
-
-
-
-
-
- -
-
-

- Cash Flow Statement Consolidated Excel

-
-
-
-
-
-
- -
-
-

- Cash flow Statement Detailed PDF Report

-
-
-
-
-
-
- -
-
-

- Cash flow Statement Detailed Excel Report

-
-
-
- -
-
-
- -
-
-

- Cash flow Statement Very Detailed PDF Report.

-
-
-
-
-
-
- -
-
-

- Cash flow Statement Very Detailed Excel Report.

-
-
-
-
-
-
-
    -
  • - Based on the chosen date - gives four levels of cash flow -
  • -
  • - Analysing of Cash flow as - more easier -
  • -
  • - - Summary -
      -
    • Month wise cash flow report. -
    • -
    -
  • -
  • - - Consolidated -
      -
    • Report based on the cash flow affected accounts. -
    • -
    -
  • -
  • - - Detailed -
      -
    • Report based on the cash flow affected accounts. -
    • -
    -
  • -
  • - Very Detailed -
      -
    • Report shows the cash flow affected account,corresponding journal entries - and its move lines -
    • -
    -
  • - -
-
-
-
-
-
-
Version - 17.0.1.0.0|Released on:27th March 2024 -
-

- - Initial Commit for Advanced Cash Flow Statements.

-
-
-
-
-
-
-
-

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/advance_cash_flow_statements/static/src/js/action_manager.js b/advance_cash_flow_statements/static/src/js/action_manager.js deleted file mode 100644 index 8eed9cf0e..000000000 --- a/advance_cash_flow_statements/static/src/js/action_manager.js +++ /dev/null @@ -1,16 +0,0 @@ -/** @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/advance_cash_flow_statements/views/account_wizard_views.xml b/advance_cash_flow_statements/views/account_wizard_views.xml deleted file mode 100644 index 18ed1bbb3..000000000 --- a/advance_cash_flow_statements/views/account_wizard_views.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - account.wizard.form.view - account.wizard - -
- - - - - - - - - - -
-
-
-
-
- - - Cash Flow Statements - ir.actions.act_window - account.wizard - - form - new - - - - -
diff --git a/advance_cash_flow_statements/wizard/__init__.py b/advance_cash_flow_statements/wizard/__init__.py deleted file mode 100644 index ebcc2a719..000000000 --- a/advance_cash_flow_statements/wizard/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################### -# -# Cybrosys Technologies Pvt. Ltd. -# -# Copyright (C) 2024-TODAY Cybrosys Technologies(). -# Author: Gayathri V (odoo@cybrosys.com) -# -# 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 account_account -from . import account_wizard -from . import report_account_wizard diff --git a/advance_cash_flow_statements/wizard/account_account.py b/advance_cash_flow_statements/wizard/account_account.py deleted file mode 100644 index 707b234b6..000000000 --- a/advance_cash_flow_statements/wizard/account_account.py +++ /dev/null @@ -1,90 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################### -# -# Cybrosys Technologies Pvt. Ltd. -# -# Copyright (C) 2024-TODAY Cybrosys Technologies(). -# Author: Gayathri V (odoo@cybrosys.com) -# -# 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 odoo import api, models, fields -from odoo.tools.misc import get_lang - - -class Account(models.Model): - _inherit = "account.report" - _description = "Account Common Report" - """This is used to inherit account report to add more fields and - functions""" - - company_id = fields.Many2one('res.company', string='Company', required=True, - readonly=True, - default=lambda self: self.env.company, - help='default Company') - journal_ids = fields.Many2many( - comodel_name='account.journal', - string='Journals', - required=True, - default=lambda self: self.env['account.journal'].search( - [('company_id', '=', self.company_id.id)]), - domain="[('company_id', '=', company_id)]", help='Gives the journal of ' - 'the default company') - date_from = fields.Date(string='Start Date', - help='Date at which report need to be start') - date_to = fields.Date(string='End Date', - help='Date at which report need to be End') - target_move = fields.Selection([('posted', 'All Posted Entries'), - ('all', 'All Entries'), - ], string='Target Moves', required=True, - default='posted', help='Type of entries') - - @api.onchange('company_id') - def _onchange_company_id(self): - """ Fetch the journal values based on company""" - if self.company_id: - self.journal_ids = self.env['account.journal'].search( - [('company_id', '=', self.company_id.id)]) - else: - self.journal_ids = self.env['account.journal'].search([]) - - def _build_contexts(self, data): - """ Pass the context values for report""" - result = {} - result['journal_ids'] = 'journal_ids' in data['form'] and data['form'][ - 'journal_ids'] or False - result['state'] = 'target_move' in data['form'] and data['form'][ - 'target_move'] or '' - result['date_from'] = data['form']['date_from'] or False - result['date_to'] = data['form']['date_to'] or False - result['strict_range'] = True if result['date_from'] else False - result['company_id'] = data['form']['company_id'][0] or False - return result - - def _print_report(self, data): - """ Report print action""" - raise NotImplementedError() - - def check_report(self): - """ Return the values for report""" - self.ensure_one() - data = {'ids': self.env.context.get('active_ids', []), - 'model': self.env.context.get('active_model', 'ir.ui.menu'), - 'form': self.read( - ['date_from', 'date_to', 'journal_ids', 'target_move', - 'company_id'])[0]} - used_context = self._build_contexts(data) - data['form']['used_context'] = dict(used_context, - lang=get_lang(self.env).code) - return self.with_context(discard_logo_check=True)._print_report(data) diff --git a/advance_cash_flow_statements/wizard/account_wizard.py b/advance_cash_flow_statements/wizard/account_wizard.py deleted file mode 100644 index de2d59e12..000000000 --- a/advance_cash_flow_statements/wizard/account_wizard.py +++ /dev/null @@ -1,467 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################### -# -# Cybrosys Technologies Pvt. Ltd. -# -# Copyright (C) 2024-TODAY Cybrosys Technologies(). -# Author: Gayathri V (odoo@cybrosys.com) -# -# 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 datetime import datetime -from odoo import models, fields, _ -from odoo.exceptions import UserError -from odoo.tools import date_utils, io - -try: - from odoo.tools.misc import xlsxwriter -except ImportError: - import xlsxwriter - - -class AccountWizard(models.TransientModel): - _name = "account.wizard" - _description = 'Account Wizard' - - name = fields.Char(default="Invoice", help='Name of Invoice ') - date_from = fields.Date(string="Start Date", required=True, - help='Date at which report need to be start') - date_to = fields.Date(string="End Date", default=fields.Date.today, - required=True, - help='Date at which report need to be end') - today = fields.Date("Report Date", default=fields.Date.today, - help='Date at which report is generated') - levels = fields.Selection([('summary', 'Summary'), - ('consolidated', 'Consolidated'), - ('detailed', 'Detailed'), - ('very', 'Very Detailed')], - string='Levels', required=True, default='summary', - help='Different levels for cash flow statements\n' - 'Summary: Month wise report.\n' - 'Consolidated: Based on account types.\n' - 'Detailed: Based on accounts.\n' - 'Very Detailed: Accounts with their move lines') - target_move = fields.Selection([('posted', 'All Posted Entries'), - ('all', 'All Entries'), - ], string='Target Moves', required=True, - default='posted', help='Type of entries') - - def generate_pdf_report(self): - """ Generate the pdf reports and return values to template""" - self.ensure_one() - logged_users = self.env['res.company']._company_default_get( - 'account.account') - if self.date_from: - if self.date_from > self.date_to: - raise UserError(_("Start date should be less than end date")) - data = { - 'ids': self.ids, - 'model': self._name, - 'date_from': self.date_from, - 'date_to': self.date_to, - 'levels': self.levels, - 'target_move': self.target_move, - 'today': self.today, - 'logged_users': logged_users.name, - } - return self.env.ref( - 'advance_cash_flow_statements.pdf_report_action').report_action( - self, - data=data) - - def generate_xlsx_report(self): - """ Generate xlsx report return values to template""" - date_from = datetime.strptime(str(self.date_from), "%Y-%m-%d") - date_to = datetime.strptime(str(self.date_to), "%Y-%m-%d") - if date_from: - if date_from > date_to: - raise UserError(_("Start date should be less than end date")) - data = { - 'ids': self.ids, - 'model': self._name, - 'date_from': self.date_from, - 'date_to': self.date_to, - 'levels': self.levels, - 'target_move': self.target_move, - 'today': self.today, - } - return { - 'type': 'ir.actions.report', - 'report_type': 'xlsx', - 'data': {'model': 'account.wizard', - 'output_format': 'xlsx', - 'options': json.dumps(data, - default=date_utils.json_default), - 'report_name': 'Adv Cash Flow Statement', - }, - } - - def get_xlsx_report(self, data, response): - """ Update the xlsx template and pass values to templates""" - output = io.BytesIO() - workbook = xlsxwriter.Workbook(output, {'in_memory': True}) - fetched_data = [] - account_res = [] - journal_res = [] - fetched = [] - currency_symbol = self.env.user.company_id.currency_id.symbol - if data['levels'] == 'summary': - state = """ WHERE am.state = 'posted' """ if data[ - 'target_move'] == 'posted' else '' - query3 = """SELECT to_char(am.date, 'Month') as month_part, extract( - YEAR from am.date) as year_part, sum(aml.debit) AS total_debit, sum( - aml.credit) AS total_credit, sum(aml.balance) AS total_balance FROM( - SELECT am.date, am.id, am.state FROM account_move as am - LEFT JOIN account_move_line aml ON aml.move_id = am.id - LEFT JOIN account_account aa ON aa.id = aml.account_id - WHERE am.date BETWEEN '""" + str( - data['date_from']) + """' and '""" + str( - data['date_to']) + """' ) am - LEFT JOIN account_move_line aml ON aml.move_id = am.id - LEFT JOIN account_account aa ON aa.id = aml.account_id - """ + state + """GROUP BY month_part,year_part""" - cr = self._cr - cr.execute(query3) - fetched_data = cr.dictfetchall() - elif data['levels'] == 'consolidated': - state = """ WHERE am.state = 'posted' """ if data[ - 'target_move'] == 'posted' else '' - query2 = """SELECT aa.id,aa.name, sum(aml.debit) AS total_debit, sum( - aml.credit) AS total_credit,sum(aml.balance) AS total_balance FROM ( - SELECT am.id, am.state FROM account_move as am - LEFT JOIN account_move_line aml ON aml.move_id = am.id - LEFT JOIN account_account aa ON aa.id = aml.account_id - WHERE am.date BETWEEN '""" + str( - data['date_from']) + """' and '""" + str( - data['date_to']) + """' ) am - LEFT JOIN account_move_line aml ON aml.move_id = am.id - LEFT JOIN account_account aa ON aa.id = aml.account_id - """ + state + """GROUP BY aa.id,aa.name""" - cr = self._cr - cr.execute(query2) - fetched_data = cr.dictfetchall() - elif data['levels'] == 'detailed': - state = """ WHERE am.state = 'posted' """ if data[ - 'target_move'] == 'posted' else '' - query1 = """SELECT aa.id,aa.name,aa.code, sum(aml.debit) AS total_debit, - sum(aml.credit) AS total_credit,sum( - aml.balance) AS total_balance FROM ( - SELECT am.id, am.state FROM account_move as am - LEFT JOIN account_move_line aml ON aml.move_id = am.id - LEFT JOIN account_account aa ON aa.id = aml.account_id - WHERE am.date BETWEEN '""" + str( - data['date_from']) + """' and '""" + str( - data['date_to']) + """' ) am - LEFT JOIN account_move_line aml ON aml.move_id = am.id - LEFT JOIN account_account aa ON aa.id = aml.account_id - """ + state + """GROUP BY aa.id,aa.name, aa.code""" - cr = self._cr - cr.execute(query1) - fetched_data = cr.dictfetchall() - for account in self.env['account.account'].search([]): - child_lines = self._get_journal_lines(account, data) - if child_lines: - journal_res.append(child_lines) - else: - state = """AND am.state = 'posted' """ if data[ - 'target_move'] == 'posted' else '' - sql = """SELECT DISTINCT aa.name,aa.code, sum( - aml.debit) AS total_debit, - sum(aml.credit) AS total_credit FROM ( - SELECT am.* FROM account_move as am - LEFT JOIN account_move_line aml ON aml.move_id = am.id - LEFT JOIN account_account aa ON aa.id = aml.account_id - WHERE am.date BETWEEN '""" + str( - data['date_from']) + """' and '""" + str( - data['date_to']) + """' """ + state + """) am - LEFT JOIN account_move_line aml ON aml.move_id = am.id - LEFT JOIN account_account aa ON aa.id = aml.account_id - GROUP BY aa.name, aa.code""" - cr = self._cr - cr.execute(sql) - fetched = cr.dictfetchall() - for account in self.env['account.account'].search([]): - child_lines = self._get_lines(account, data) - if child_lines: - account_res.append(child_lines) - - logged_users = self.env['res.company']._company_default_get( - 'account.account') - sheet = workbook.add_worksheet() - bold = workbook.add_format({'align': 'center', - 'bold': True, - 'font_size': '10px', - 'border': 1}) - date = workbook.add_format({'font_size': '10px'}) - cell_format = workbook.add_format({'bold': True, - 'font_size': '10px'}) - head = workbook.add_format({'align': 'center', - 'bold': True, - 'bg_color': '#D3D3D3', - 'font_size': '15px'}) - txt = workbook.add_format({'align': 'left', - 'font_size': '10px'}) - txt_left = workbook.add_format({'align': 'left', - 'font_size': '10px', - 'border': 1}) - txt_center = workbook.add_format({'align': 'center', - 'font_size': '10px', - 'border': 1}) - amount = workbook.add_format({'align': 'right', - 'font_size': '10px', - 'border': 1}) - amount_bold = workbook.add_format({'align': 'right', - 'bold': True, - 'font_size': '10px', - 'border': 1}) - txt_bold = workbook.add_format({'align': 'left', - 'bold': True, - 'font_size': '10px', - 'border': 1}) - - sheet.set_column('C:C', 30, cell_format) - sheet.set_column('D:E', 20, cell_format) - sheet.set_column('F:F', 20, cell_format) - sheet.write('C2', "Report Date", txt) - sheet.write('D2', str(data['today']), txt) - sheet.write('F2', logged_users.name, txt) - sheet.merge_range('C3:F4', 'CASH FLOW STATEMENTS', head) - - if data['target_move'] == 'posted': - sheet.write('C6', "Target Moves :", cell_format) - sheet.write('C7', 'All Posted Entries', date) - else: - sheet.write('C6', "Target Moves :", cell_format) - sheet.write('C7', 'All Entries', date) - - sheet.write('D6', "Date From", cell_format) - sheet.write('E6', str(data['date_from']), date) - sheet.write('D7', "Date To", cell_format) - sheet.write('E7', str(data['date_to']), date) - - sheet.merge_range('C8:F8', '', head) - sheet.write('C9', 'NAME', bold) - sheet.write('D9', 'CASH IN', bold) - sheet.write('E9', 'CASH OUT', bold) - sheet.write('F9', 'BALANCE', bold) - - row_num = 8 - col_num = 2 - fetched_data_list = fetched_data.copy() - account_res_list = account_res.copy() - journal_res_list = journal_res.copy() - fetched_list = fetched.copy() - filtered_fetched_data_list = [entry for entry in fetched_data_list if - None not in entry.values()] - - for i in filtered_fetched_data_list: - if data['levels'] == 'summary': - sheet.write(row_num + 1, col_num, - str(i['month_part']) + str(int(i['year_part'])), - txt_left) - sheet.write(row_num + 1, col_num + 1, - '{:.2f} %'.format(i['total_debit']) + str(currency_symbol), - amount) - sheet.write(row_num + 1, col_num + 2, - '{:.2f} %'.format(i['total_credit']) + str(currency_symbol), - amount) - sheet.write(row_num + 1, col_num + 3, - '{:.2f} %'.format(i['total_debit'] - i['total_credit']) + str( - currency_symbol), - amount) - row_num = row_num + 1 - elif data['levels'] == 'consolidated': - acc = self.env['account.account'].browse(i['id']) - sheet.write(row_num + 1, col_num, acc.name, txt_left) - sheet.write(row_num + 1, col_num + 1, - '{:.2f} %'.format(i['total_debit']) + str(currency_symbol), - amount) - sheet.write(row_num + 1, col_num + 2, - '{:.2f} %'.format(i['total_credit']) + str(currency_symbol), - amount) - if i['total_credit'] and i['total_credit']: - sheet.write(row_num + 1, col_num + 3, - '{:.2f} %'.format(i['total_debit'] - i['total_credit']) + str( - currency_symbol), - amount) - else: - sheet.write(row_num + 1, col_num + 3, - str(0) + str(currency_symbol), - amount) - row_num = row_num + 1 - - for j in journal_res_list: - for k in filtered_fetched_data_list: - account_name = self.env['account.account'].browse(k['id']) - if account_name.name == j['account']: - sheet.write(row_num + 1, col_num, - str(k['code']) + str(account_name.name), - txt_bold) - sheet.write(row_num + 1, col_num + 1, - '{:.2f} %'.format(k['total_debit']) + str(currency_symbol), - amount_bold) - sheet.write(row_num + 1, col_num + 2, - '{:.2f} %'.format(k['total_credit']) + str(currency_symbol), - amount_bold) - if k['total_debit'] and k['total_credit']: - sheet.write(row_num + 1, col_num + 3, - '{:.2f} %'.format(k['total_debit'] - k[ - 'total_credit']) + str( - currency_symbol), amount_bold) - else: - sheet.write(row_num + 1, col_num + 3, - str(0) + str( - currency_symbol), amount_bold) - row_num = row_num + 1 - for l in j['journal_lines']: - acc = self.env['account.account'].browse(l['id']) - sheet.write(row_num + 1, col_num, acc.name, txt_left) - sheet.write(row_num + 1, col_num + 1, - '{:.2f} %'.format(l['total_debit']) + str(currency_symbol), - amount) - sheet.write(row_num + 1, col_num + 2, - '{:.2f} %'.format(l['total_credit']) + str(currency_symbol), - amount) - sheet.write(row_num + 1, col_num + 3, - '{:.2f} %'.format(l['total_debit'] - l['total_credit']) + str( - currency_symbol), - amount) - row_num = row_num + 1 - - for j in account_res_list: - for k in fetched_list: - - if k['name'] == j['account']: - sheet.write(row_num + 1, col_num, - str(k['code']) + str(k['name']), txt_bold) - sheet.write(row_num + 1, col_num + 1, - '{:.2f} %'.format(k['total_debit']) + str(currency_symbol), - amount_bold) - sheet.write(row_num + 1, col_num + 2, - '{:.2f} %'.format(k['total_credit']) + str(currency_symbol), - amount_bold) - sheet.write(row_num + 1, col_num + 3, - '{:.2f} %'.format(k['total_debit'] - k['total_credit']) + str( - currency_symbol), amount_bold) - row_num = row_num + 1 - for l in j['journal_lines']: - if l['account_name'] == j['account']: - sheet.write(row_num + 1, col_num, l['name'], txt_left) - sheet.write(row_num + 1, col_num + 1, - '{:.2f} %'.format(l['total_debit']) + str(currency_symbol), - amount) - sheet.write(row_num + 1, col_num + 2, - '{:.2f} %'.format(l['total_credit']) + str(currency_symbol), - amount) - sheet.write(row_num + 1, col_num + 3, - '{:.2f} %'.format(l['total_debit'] - l['total_credit']) + str( - currency_symbol), - amount) - row_num = row_num + 1 - for m in j['move_lines']: - if m['name'] == l['name']: - sheet.write(row_num + 1, col_num, m['move_name'], - txt_center) - sheet.write(row_num + 1, col_num + 1, - '{:.2f} %'.format(m['total_debit']) + str( - currency_symbol), amount) - sheet.write(row_num + 1, col_num + 2, - '{:.2f} %'.format(m['total_credit']) + str( - currency_symbol), amount) - sheet.write(row_num + 1, col_num + 3, - '{:.2f} %'.format(m['total_debit'] - m[ - 'total_credit']) + str(currency_symbol), - amount) - row_num = row_num + 1 - workbook.close() - output.seek(0) - response.stream.write(output.read()) - output.close() - - def _get_lines(self, account, data): - """ Fetch values for lines""" - state = """AND am.state = 'posted' """ if data[ - 'target_move'] == 'posted' else '' - query = """SELECT aml.account_id,aj.name, am.name as move_name, sum( - aml.debit) AS total_debit, - sum(aml.credit) AS total_credit FROM ( - SELECT am.* FROM account_move as am - LEFT JOIN account_move_line aml ON aml.move_id = am.id - LEFT JOIN account_account aa ON aa.id = aml.account_id - WHERE am.date BETWEEN '""" + str( - data['date_from']) + """' and '""" + str( - data['date_to']) + """' """ + state + """) am - LEFT JOIN account_move_line aml ON aml.move_id = am.id - LEFT JOIN account_account aa ON aa.id = aml.account_id - LEFT JOIN account_journal aj ON aj.id = am.journal_id - WHERE aa.id = """ + str(account.id) + """ - GROUP BY am.name, aml.account_id, aj.name""" - - cr = self._cr - cr.execute(query) - fetched_data = cr.dictfetchall() - - sql2 = """SELECT aa.name as account_name, aj.id, aj.name, sum( - aml.debit) AS total_debit, - sum(aml.credit) AS total_credit FROM ( - SELECT am.* FROM account_move as am - LEFT JOIN account_move_line aml ON aml.move_id = am.id - LEFT JOIN account_account aa ON aa.id = aml.account_id - WHERE am.date BETWEEN '""" + str( - data['date_from']) + """' and '""" + str( - data['date_to']) + """' """ + state + """) am - LEFT JOIN account_move_line aml ON aml.move_id = am.id - LEFT JOIN account_account aa ON aa.id = aml.account_id - LEFT JOIN account_journal aj ON aj.id = am.journal_id - WHERE aa.id = """ + str(account.id) + """ - GROUP BY aa.name, aj.name, aj.id""" - - cr = self._cr - cr.execute(sql2) - fetch_data = cr.dictfetchall() - if fetched_data: - return { - 'account': account.name, - 'code': account.code, - 'move_lines': fetched_data, - 'journal_lines': fetch_data, - } - - def _get_journal_lines(self, account, data): - """ Fetch values based on journal and pass it in sublines""" - state = """AND am.state = 'posted' """ if data[ - 'target_move'] == 'posted' else '' - sql2 = """SELECT aa.id,aa.name as account_name, aj.id, aj.name, sum( - aml.debit) AS total_debit, - sum(aml.credit) AS total_credit FROM ( - SELECT am.* FROM account_move as am - LEFT JOIN account_move_line aml ON aml.move_id = am.id - LEFT JOIN account_account aa ON aa.id = aml.account_id - WHERE am.date BETWEEN '""" + str( - data['date_from']) + """' and '""" + str( - data['date_to']) + """' """ + state + """) am - LEFT JOIN account_move_line aml ON aml.move_id = am.id - LEFT JOIN account_account aa ON aa.id = aml.account_id - LEFT JOIN account_journal aj ON aj.id = am.journal_id - WHERE aa.id = """ + str(account.id) + """ - GROUP BY aa.id,aa.name, aj.name, aj.id""" - cr = self._cr - cr.execute(sql2) - fetched_data = cr.dictfetchall() - if fetched_data: - return { - 'account': account.name, - 'journal_lines': fetched_data, - } diff --git a/advance_cash_flow_statements/wizard/report_account_wizard.py b/advance_cash_flow_statements/wizard/report_account_wizard.py deleted file mode 100644 index f52cbb145..000000000 --- a/advance_cash_flow_statements/wizard/report_account_wizard.py +++ /dev/null @@ -1,213 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################### -# -# Cybrosys Technologies Pvt. Ltd. -# -# Copyright (C) 2024-TODAY Cybrosys Technologies(). -# Author: Gayathri V (odoo@cybrosys.com) -# -# 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 odoo import models, api - - -class ReportAccountWizard(models.AbstractModel): - _name = "report.advance_cash_flow_statements.cash_flow_pdf_report" - _description = 'Report advanced cash flows' - - @api.model - def _get_report_values(self, docids, data=None): - """ Get values return to pdf report""" - fetched_data = [] - account_res = [] - journal_res = [] - fetched = [] - active_model = self.env.context.get('active_model') - docs = self.env[self.env.context.get('active_model')].browse( - self.env.context.get('active_id')) - if data['levels'] == 'summary': - state = """ WHERE am.state = 'posted' """ if data[ - 'target_move'] == 'posted' else '' - query3 = """SELECT to_char(am.date, 'Month') as month_part, extract( - YEAR from am.date) as year_part,sum(aml.debit) AS total_debit, sum( - aml.credit) AS total_credit,sum(aml.balance) AS total_balance FROM( - SELECT am.date, am.id, am.state FROM account_move as am - LEFT JOIN account_move_line aml ON aml.move_id = am.id - LEFT JOIN account_account aa ON aa.id = aml.account_id - WHERE am.date BETWEEN '""" + str( - data['date_from']) + """' and '""" + str( - data['date_to']) + """' ) am - LEFT JOIN account_move_line aml ON aml.move_id = am.id - LEFT JOIN account_account aa ON aa.id = aml.account_id - """ + state + """GROUP BY month_part,year_part""" - cr = self._cr - cr.execute(query3) - fetched_data = cr.dictfetchall() - elif data['levels'] == 'consolidated': - user_lang = self.env.user.lang - state = """ WHERE am.state = 'posted' """ if data[ - 'target_move'] == 'posted' else '' - query2 = """SELECT aa.name ->'%s' as name, sum(aml.debit) AS total_debit, sum( - aml.credit) AS total_credit,sum(aml.balance) AS total_balance FROM( - SELECT am.id, am.state FROM account_move as am - LEFT JOIN account_move_line aml ON aml.move_id = am.id - LEFT JOIN account_account aa ON aa.id = aml.account_id - WHERE am.date BETWEEN '""" %(user_lang) + str( - data['date_from']) + """' and '""" + str( - data['date_to']) + """' ) am - LEFT JOIN account_move_line aml ON aml.move_id = am.id - LEFT JOIN account_account aa ON aa.id = aml.account_id - """ + state + """GROUP BY aa.name""" - cr = self._cr - cr.execute(query2) - fetched_data = cr.dictfetchall() - elif data['levels'] == 'detailed': - user_lang = self.env.user.lang - state = """ WHERE am.state = 'posted' """ if data[ - 'target_move'] == 'posted' else '' - query1 = """SELECT aa.name ->'%s' as name,aa.code, sum( - aml.debit) AS total_debit, sum(aml.credit) AS total_credit, - sum(aml.balance) AS total_balance FROM ( - SELECT am.id, am.state FROM account_move as am - LEFT JOIN account_move_line aml ON aml.move_id = am.id - LEFT JOIN account_account aa ON aa.id = aml.account_id - WHERE am.date BETWEEN '""" %(user_lang) + str( - data['date_from']) + """' and '""" + str( - data['date_to']) + """' ) am - LEFT JOIN account_move_line aml ON aml.move_id = am.id - LEFT JOIN account_account aa ON aa.id = aml.account_id - """ + state + """GROUP BY aa.name, aa.code""" - cr = self._cr - cr.execute(query1) - fetched_data = cr.dictfetchall() - for account in self.env['account.account'].search([]): - child_lines = self._get_journal_lines(account, data) - if child_lines: - journal_res.append(child_lines) - else: - user_lang = self.env.user.lang - state = """AND am.state = 'posted' """ if data[ - 'target_move'] == 'posted' else '' - sql = """SELECT DISTINCT aa.name ->'%s' as name,aa.code, sum( - aml.debit) AS total_debit, - sum(aml.credit) AS total_credit FROM ( - SELECT am.* FROM account_move as am - LEFT JOIN account_move_line aml ON aml.move_id = am.id - LEFT JOIN account_account aa ON aa.id = aml.account_id - WHERE am.date BETWEEN '""" %(user_lang) + str( - data['date_from']) + """' and '""" + str( - data['date_to']) + """' """ + state + """) am - LEFT JOIN account_move_line aml ON aml.move_id = am.id - LEFT JOIN account_account aa ON aa.id = aml.account_id - GROUP BY aa.name, aa.code""" - cr = self._cr - cr.execute(sql) - fetched = cr.dictfetchall() - for account in self.env['account.account'].search([]): - child_lines = self._get_lines(account, data) - if child_lines: - account_res.append(child_lines) - - filtered_fetched_data = [entry for entry in fetched_data if - None not in entry.values()] - - return { - 'date_from': data['date_from'], - 'date_to': data['date_to'], - 'levels': data['levels'], - 'doc_ids': self.ids, - 'doc_model': active_model, - 'docs': docs, - 'fetched_data': filtered_fetched_data, - 'account_res': account_res, - 'journal_res': journal_res, - 'fetched': fetched, - } - - def _get_lines(self, account, data): - """ fetch values for lines""" - user_lang = self.env.user.lang - state = """AND am.state = 'posted' """ if data[ - 'target_move'] == 'posted' else '' - query = """SELECT aml.account_id,aj.name ->'%s' as name, am.name as move_name, sum( - aml.debit) AS total_debit, - sum(aml.credit) AS total_credit FROM ( - SELECT am.* FROM account_move as am - LEFT JOIN account_move_line aml ON aml.move_id = am.id - LEFT JOIN account_account aa ON aa.id = aml.account_id - WHERE am.date BETWEEN '""" %(user_lang) + str( - data['date_from']) + """' and '""" + str( - data['date_to']) + """' """ + state + """) am - LEFT JOIN account_move_line aml ON aml.move_id = am.id - LEFT JOIN account_account aa ON aa.id = aml.account_id - LEFT JOIN account_journal aj ON aj.id = am.journal_id - WHERE aa.id = """ + str(account.id) + """ - GROUP BY am.name, aml.account_id, aj.name""" - - cr = self._cr - cr.execute(query) - fetched_data = cr.dictfetchall() - user_lang = self.env.user.lang - sql2 = """SELECT aa.name ->'%s' as account_name, aj.id, aj.name ->'%s' as name, sum( - aml.debit) AS total_debit, - sum(aml.credit) AS total_credit FROM ( - SELECT am.* FROM account_move as am - LEFT JOIN account_move_line aml ON aml.move_id = am.id - LEFT JOIN account_account aa ON aa.id = aml.account_id - WHERE am.date BETWEEN '""" %(user_lang,user_lang)+ str( - data['date_from']) + """' and '""" + str( - data['date_to']) + """' """ + state + """) am - LEFT JOIN account_move_line aml ON aml.move_id = am.id - LEFT JOIN account_account aa ON aa.id = aml.account_id - LEFT JOIN account_journal aj ON aj.id = am.journal_id - WHERE aa.id = """ + str(account.id) + """ - GROUP BY aa.name, aj.name, aj.id""" - cr = self._cr - cr.execute(sql2) - fetch_data = cr.dictfetchall() - if fetched_data: - return { - 'account': account.name, - 'code': account.code, - 'move_lines': fetched_data, - 'journal_lines': fetch_data, - } - - def _get_journal_lines(self, account, data): - """ fetch values based on journal and pass it in sublines""" - user_lang = self.env.user.lang - state = """AND am.state = 'posted' """ if data[ - 'target_move'] == 'posted' else '' - sql2 = """SELECT aa.name ->'%s' as account_name, aj.id, aj.name ->'%s' as name, sum( - aml.debit) AS total_debit, - sum(aml.credit) AS total_credit FROM ( - SELECT am.* FROM account_move as am - LEFT JOIN account_move_line aml ON aml.move_id = am.id - LEFT JOIN account_account aa ON aa.id = aml.account_id - WHERE am.date BETWEEN '""" %(user_lang,user_lang) + str( - data['date_from']) + """' and '""" + str( - data['date_to']) + """' """ + state + """) am - LEFT JOIN account_move_line aml ON aml.move_id = am.id - LEFT JOIN account_account aa ON aa.id = aml.account_id - LEFT JOIN account_journal aj ON aj.id = am.journal_id - WHERE aa.id = """ + str(account.id) + """ - GROUP BY aa.name, aj.name, aj.id""" - cr = self._cr - cr.execute(sql2) - fetched_data = cr.dictfetchall() - if fetched_data: - return { - 'account': account.name, - 'journal_lines': fetched_data, - }