@ -0,0 +1,49 @@ |
|||
.. image:: https://img.shields.io/badge/license-LGPL--3-green.svg |
|||
:target: https://www.gnu.org/licenses/lgpl-3.0-standalone.html |
|||
:alt: License: LGPL-3 |
|||
|
|||
Advanced Cash Flow Statements |
|||
============================== |
|||
Generate 4 levels of Dynamic Cash Flow Statements Report. |
|||
|
|||
Configuration |
|||
============= |
|||
No configuration |
|||
|
|||
Company |
|||
------- |
|||
* `Cybrosys Techno Solutions <https://cybrosys.com/>`__ |
|||
|
|||
License |
|||
------- |
|||
General Public License, Version 3 (LGPL v3). |
|||
(https://www.gnu.org/licenses/lgpl-3.0-standalone.html) |
|||
|
|||
Credits |
|||
------- |
|||
Developer: (V17) Mily Shajan , |
|||
(v17) Gayathri V, |
|||
(V18) Abbas P , |
|||
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 <https://cybrosys.com/>`__ |
|||
|
|||
Further information |
|||
=================== |
|||
HTML Description: `<static/description/index.html>`__ |
@ -0,0 +1,24 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################ |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Abbas P (odoo@cybrosys.com) |
|||
# |
|||
# 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 <http://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################ |
|||
from . import controllers |
|||
from . import models |
|||
from . import wizard |
@ -0,0 +1,50 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################ |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Abbas P (odoo@cybrosys.com) |
|||
# |
|||
# 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 <http://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################ |
|||
{ |
|||
'name': 'Advanced Cash Flow Statements', |
|||
'version': '18.0.1.0.0', |
|||
'summary': """Generate four levels of cash flow statement reports""", |
|||
'description': """Generate four hierarchical levels of cash flow statements |
|||
and provide options to print reports in both PDF and XLSX |
|||
formats for analysis.""", |
|||
'author': "Cybrosys Techno Solutions", |
|||
'company': 'Cybrosys Techno Solutions', |
|||
'maintainer': 'Cybrosys Techno Solutions', |
|||
'website': "https://www.cybrosys.com", |
|||
'category': 'Accounting', |
|||
'depends': ['base', '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': 'LGPL-3', |
|||
'installable': True, |
|||
'auto_install': False, |
|||
'application': False, |
|||
} |
@ -0,0 +1,22 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################ |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Abbas P (odoo@cybrosys.com) |
|||
# |
|||
# 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 <http://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################ |
|||
from . import advance_cash_flow_statements |
@ -0,0 +1,58 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################ |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Abbas P (odoo@cybrosys.com) |
|||
# |
|||
# 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 <http://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################ |
|||
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('/cash_flow_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))) |
@ -0,0 +1,6 @@ |
|||
## Module <advance_cash_flow_statements> |
|||
|
|||
#### 31.05.2025 |
|||
#### Version 18.0.1.0.0 |
|||
##### ADD |
|||
- Initial commit for Advanced Cash Flow Statements |
@ -0,0 +1,22 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################ |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Abbas P (odoo@cybrosys.com) |
|||
# |
|||
# 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 <http://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################ |
|||
from . import account_report |
@ -0,0 +1,90 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################ |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Abbas P (odoo@cybrosys.com) |
|||
# |
|||
# 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 <http://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################ |
|||
from odoo import api, models, fields |
|||
from odoo.tools.misc import get_lang |
|||
|
|||
|
|||
class AccountReport(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) |
@ -0,0 +1,11 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<odoo> |
|||
<!-- Report action for cash flow statement--> |
|||
<record id="pdf_report_action" model="ir.actions.report"> |
|||
<field name="name">Cash flow statement Pdf Report</field> |
|||
<field name="model">account.wizard</field> |
|||
<field name="report_type">qweb-pdf</field> |
|||
<field name="report_name">advance_cash_flow_statements.cash_flow_pdf_report</field> |
|||
<field name="report_file">advance_cash_flow_statements.cash_flow_pdf_report</field> |
|||
</record> |
|||
</odoo> |
@ -0,0 +1,233 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<odoo> |
|||
<!-- Template for cash flow report--> |
|||
<template id="cash_flow_pdf_report"> |
|||
<t t-call="web.html_container"> |
|||
<t t-call="web.internal_layout"> |
|||
<div style="font-size:12px" class="col-4"> |
|||
<b>Report Date :</b> |
|||
<span t-esc='today'/> |
|||
<br/> |
|||
<span t-esc='logged_users'/> |
|||
</div> |
|||
<br/> |
|||
<div class="page"> |
|||
<h4 style="padding-left:10px !important">Cash Flow |
|||
statements |
|||
</h4> |
|||
<div style="width:90%;margin:1px auto;font-size:12px" |
|||
class="row mt32 mb32"> |
|||
<div class="col-4"> |
|||
<strong>Target Moves:</strong> |
|||
<p> |
|||
<span t-if="target_move == 'posted'">All Posted |
|||
Entries |
|||
</span> |
|||
<span t-if="target_move == 'all'">All Entries |
|||
</span> |
|||
</p> |
|||
</div> |
|||
<div class="col-4"> |
|||
<p> |
|||
<strong>Date from :</strong> |
|||
<span t-esc='date_from'/> |
|||
<br/> |
|||
<strong>Date to :</strong> |
|||
<span t-esc='date_to'/> |
|||
</p> |
|||
</div> |
|||
</div> |
|||
<table style="width:90%;margin:2px auto;" |
|||
class="table table-condensed"> |
|||
<thead> |
|||
<tr style="font-size:13px; padding: 0.25rem !important;"> |
|||
<th style="text-align:left;">Name</th> |
|||
<th style="text-align:right;">Cash In</th> |
|||
<th style="text-align:right;">Cash Out</th> |
|||
<th style="text-align:right;">Balance</th> |
|||
</tr> |
|||
</thead> |
|||
<tbody style="font-size:12px" t-foreach="fetched_data" |
|||
t-as="fetch"> |
|||
<tr t-if="levels == 'summary'"> |
|||
<td> |
|||
<span t-esc="fetch.get('month_part')"/> |
|||
<span t-esc="int(fetch.get('year_part'))"/> |
|||
</td> |
|||
<td style="text-align:right;"> |
|||
<span t-esc="fetch.get('total_debit')" |
|||
t-options="{'widget': 'monetary', |
|||
'display_currency': res_company.currency_id}"/> |
|||
</td> |
|||
<td style="text-align:right;"> |
|||
<span t-esc="fetch.get('total_credit')" |
|||
t-options="{'widget': 'monetary', |
|||
'display_currency': res_company.currency_id}"/> |
|||
</td> |
|||
<td style="text-align:right;"> |
|||
<span t-esc="fetch.get('total_balance')" |
|||
t-options="{'widget': 'monetary', |
|||
'display_currency': res_company.currency_id}"/> |
|||
</td> |
|||
</tr> |
|||
<tr style="font-size:13px" |
|||
t-if="levels == 'consolidated'"> |
|||
<td> |
|||
<span t-esc="fetch.get('name')"/> |
|||
</td> |
|||
<td style="text-align:right;"> |
|||
<span t-esc="fetch.get('total_debit')" |
|||
t-options="{'widget': 'monetary', |
|||
'display_currency': res_company.currency_id}"/> |
|||
</td> |
|||
<td style="text-align:right;"> |
|||
<span t-esc="fetch.get('total_credit')" |
|||
t-options="{'widget': 'monetary', |
|||
'display_currency': res_company.currency_id}"/> |
|||
</td> |
|||
<td style="text-align:right;"> |
|||
<span t-esc="fetch.get('total_balance')" |
|||
t-options="{'widget': 'monetary', |
|||
'display_currency': res_company.currency_id}"/> |
|||
</td> |
|||
</tr> |
|||
</tbody> |
|||
<tbody style="font-size:12px" |
|||
t-if="levels == 'detailed'" |
|||
t-foreach="journal_res" t-as="res"> |
|||
<tr t-if="fet.get('name') == res.get('account')" |
|||
t-foreach="fetched_data" t-as="fet"> |
|||
<td> |
|||
<strong> |
|||
<span t-esc="fetch.get('code')"/> |
|||
<span t-esc="fetch.get('name')"/> |
|||
</strong> |
|||
</td> |
|||
<td style="text-align:right;"> |
|||
<strong> |
|||
<span t-esc="fetch.get('total_debit')" |
|||
t-options="{'widget': 'monetary', |
|||
'display_currency': res_company.currency_id}"/> |
|||
</strong> |
|||
</td> |
|||
<td style="text-align:right;"> |
|||
<strong> |
|||
<span t-esc="fetch.get('total_credit')" |
|||
t-options="{'widget': 'monetary', |
|||
'display_currency': res_company.currency_id}"/> |
|||
</strong> |
|||
</td> |
|||
<td style="text-align:right;"> |
|||
<strong> |
|||
<span t-esc="fetch.get('total_debit') - fet.get('total_credit')" |
|||
t-options="{'widget': 'monetary', |
|||
'display_currency': res_company.currency_id}"/> |
|||
</strong> |
|||
</td> |
|||
<tr t-foreach="res.get('journal_lines')" |
|||
t-as="mov"> |
|||
<td style="text-align:right;padding-left:50px !important" |
|||
class="text-left"> |
|||
<span t-esc="mov['name']"/> |
|||
</td> |
|||
<td style="text-align:right;"> |
|||
<span t-esc="mov['total_debit']" |
|||
t-options="{'widget': 'monetary', |
|||
'display_currency': res_company.currency_id}"/> |
|||
</td> |
|||
<td style="text-align:right;"> |
|||
<span t-esc="mov['total_credit']" |
|||
t-options="{'widget': 'monetary', |
|||
'display_currency': res_company.currency_id}"/> |
|||
</td> |
|||
<td style="text-align:right;"> |
|||
<span t-esc="mov['total_debit'] - mov['total_credit']" |
|||
t-options="{'widget': 'monetary', |
|||
'display_currency': res_company.currency_id}"/> |
|||
</td> |
|||
</tr> |
|||
</tr> |
|||
</tbody> |
|||
<tbody style="font-size:12px" t-if="levels == 'very'" |
|||
t-foreach="account_res" t-as="res"> |
|||
<tr t-if="fet.get('name') == res.get('account')" |
|||
t-foreach="fetched" t-as="fet"> |
|||
<td> |
|||
<strong> |
|||
<span t-esc="fet.get('code')"/> |
|||
<span t-esc="fet.get('name')"/> |
|||
</strong> |
|||
</td> |
|||
<td style="text-align:right;"> |
|||
<strong> |
|||
<span t-esc="fet.get('total_debit')" |
|||
t-options="{'widget': 'monetary', |
|||
'display_currency': res_company.currency_id}"/> |
|||
</strong> |
|||
</td> |
|||
<td style="text-align:right;"> |
|||
<strong> |
|||
<span t-esc="fet.get('total_credit')" |
|||
t-options="{'widget': 'monetary', |
|||
'display_currency': res_company.currency_id}"/> |
|||
</strong> |
|||
</td> |
|||
<td style="text-align:right;"> |
|||
<strong> |
|||
<span t-esc="fet.get('total_debit') - fet.get('total_credit')" |
|||
t-options="{'widget': 'monetary', |
|||
'display_currency': res_company.currency_id}"/> |
|||
</strong> |
|||
</td> |
|||
<tr t-if="line['account_name'] == res.get('account')" |
|||
t-foreach="res.get('journal_lines')" |
|||
t-as="line"> |
|||
<td style="text-align:right;padding-left:20px !important"> |
|||
<span t-esc="line['name']"/> |
|||
</td> |
|||
<td style="text-align:right;"> |
|||
<span t-esc="line['total_debit']" |
|||
t-options="{'widget': 'monetary', |
|||
'display_currency': res_company.currency_id}"/> |
|||
</td> |
|||
<td style="text-align:right;"> |
|||
<span t-esc="line['total_credit']" |
|||
t-options="{'widget': 'monetary', |
|||
'display_currency': res_company.currency_id}"/> |
|||
</td> |
|||
<td style="text-align:right;"> |
|||
<span t-esc="line['total_debit'] - line['total_credit']" |
|||
t-options="{'widget': 'monetary', |
|||
'display_currency': res_company.currency_id}"/> |
|||
</td> |
|||
<tr t-if="mov['name'] == line['name']" |
|||
t-foreach="res.get('move_lines')" |
|||
t-as="mov"> |
|||
<td style="text-align:right;padding-left:50px !important"> |
|||
<span t-esc="mov['move_name']"/> |
|||
</td> |
|||
<td style="text-align:right;"> |
|||
<span t-esc="mov['total_debit']" |
|||
t-options="{'widget': 'monetary', |
|||
'display_currency': res_company.currency_id}"/> |
|||
</td> |
|||
<td style="text-align:right;"> |
|||
<span t-esc="mov['total_credit']" |
|||
t-options="{'widget': 'monetary', |
|||
'display_currency': res_company.currency_id}"/> |
|||
</td> |
|||
<td style="text-align:right;"> |
|||
<span t-esc="mov['total_debit'] - mov['total_credit']" |
|||
t-options="{'widget': 'monetary', |
|||
'display_currency': res_company.currency_id}"/> |
|||
</td> |
|||
</tr> |
|||
</tr> |
|||
</tr> |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
</t> |
|||
</t> |
|||
</template> |
|||
</odoo> |
|
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 628 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 210 KiB |
After Width: | Height: | Size: 209 KiB |
After Width: | Height: | Size: 109 KiB |
After Width: | Height: | Size: 495 B |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 624 B |
After Width: | Height: | Size: 136 KiB |
After Width: | Height: | Size: 214 KiB |
After Width: | Height: | Size: 36 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 310 B |
After Width: | Height: | Size: 929 B |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 3.3 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 542 B |
After Width: | Height: | Size: 576 B |
After Width: | Height: | Size: 733 B |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 4.0 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 291 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 911 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 600 B |
After Width: | Height: | Size: 673 B |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 462 B |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 926 B |
After Width: | Height: | Size: 9.0 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 7.0 KiB |
After Width: | Height: | Size: 878 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 653 B |
After Width: | Height: | Size: 800 B |
After Width: | Height: | Size: 905 B |
After Width: | Height: | Size: 189 KiB |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 839 B |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 5.9 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 34 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 427 B |
After Width: | Height: | Size: 627 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 988 B |
After Width: | Height: | Size: 3.7 KiB |
After Width: | Height: | Size: 5.0 KiB |
After Width: | Height: | Size: 875 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 767 KiB |
After Width: | Height: | Size: 138 KiB |
After Width: | Height: | Size: 760 KiB |
After Width: | Height: | Size: 92 KiB |
After Width: | Height: | Size: 697 KiB |
After Width: | Height: | Size: 1.1 MiB |
After Width: | Height: | Size: 94 KiB |
After Width: | Height: | Size: 70 KiB |
After Width: | Height: | Size: 101 KiB |
After Width: | Height: | Size: 22 KiB |
After Width: | Height: | Size: 20 KiB |
After Width: | Height: | Size: 57 KiB |
After Width: | Height: | Size: 34 KiB |
After Width: | Height: | Size: 86 KiB |
After Width: | Height: | Size: 53 KiB |
After Width: | Height: | Size: 93 KiB |
After Width: | Height: | Size: 880 KiB |
After Width: | Height: | Size: 806 KiB |
After Width: | Height: | Size: 44 KiB |
@ -0,0 +1,17 @@ |
|||
/** @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: '/cash_flow_xlsx_reports', |
|||
data: action.data, |
|||
complete: () => unblockUI, |
|||
error: (error) => self.call('crash_manager', 'rpc_error', error), |
|||
}); |
|||
} |
|||
}); |