Browse Source

[ADD] Initial Commit 'advance_cash_flow_statements'

pull/145/head
Ajmal JK 6 years ago
parent
commit
16660032cc
  1. 12
      advance_cash_flow_statements/README.rst
  2. 24
      advance_cash_flow_statements/__init__.py
  3. 45
      advance_cash_flow_statements/__manifest__.py
  4. 23
      advance_cash_flow_statements/controllers/__init__.py
  5. 56
      advance_cash_flow_statements/controllers/main.py
  6. 6
      advance_cash_flow_statements/doc/RELEASE_NOTES.md
  7. 218
      advance_cash_flow_statements/report/pdf_template.xml
  8. 11
      advance_cash_flow_statements/report/print_report.xml
  9. 3
      advance_cash_flow_statements/security/ir.model.access.csv
  10. BIN
      advance_cash_flow_statements/static/description/banner.png
  11. BIN
      advance_cash_flow_statements/static/description/icon.png
  12. BIN
      advance_cash_flow_statements/static/description/images/account_reports_xlsx.png
  13. BIN
      advance_cash_flow_statements/static/description/images/accounting_dynamic_reports.png
  14. BIN
      advance_cash_flow_statements/static/description/images/advance_cash_flow_statements-1.png
  15. BIN
      advance_cash_flow_statements/static/description/images/advance_cash_flow_statements-10.png
  16. BIN
      advance_cash_flow_statements/static/description/images/advance_cash_flow_statements-2.png
  17. BIN
      advance_cash_flow_statements/static/description/images/advance_cash_flow_statements-3.png
  18. BIN
      advance_cash_flow_statements/static/description/images/advance_cash_flow_statements-4.png
  19. BIN
      advance_cash_flow_statements/static/description/images/advance_cash_flow_statements-5.png
  20. BIN
      advance_cash_flow_statements/static/description/images/advance_cash_flow_statements-6.png
  21. BIN
      advance_cash_flow_statements/static/description/images/advance_cash_flow_statements-7.png
  22. BIN
      advance_cash_flow_statements/static/description/images/advance_cash_flow_statements-8.png
  23. BIN
      advance_cash_flow_statements/static/description/images/advance_cash_flow_statements-9.png
  24. BIN
      advance_cash_flow_statements/static/description/images/advance_cash_flow_statements.png
  25. BIN
      advance_cash_flow_statements/static/description/images/bank_book_dynamic_reports.png
  26. BIN
      advance_cash_flow_statements/static/description/images/base_accounting_kit.gif
  27. BIN
      advance_cash_flow_statements/static/description/images/cash_book_dynamic_reports.jpeg
  28. BIN
      advance_cash_flow_statements/static/description/images/checked.png
  29. BIN
      advance_cash_flow_statements/static/description/images/cybrosys.png
  30. BIN
      advance_cash_flow_statements/static/description/images/day_book_dynamic_report.png
  31. 690
      advance_cash_flow_statements/static/description/index.html
  32. 49
      advance_cash_flow_statements/static/src/js/action_manager.js
  33. 9
      advance_cash_flow_statements/views/action_manager.xml
  34. 24
      advance_cash_flow_statements/wizard/__init__.py
  35. 378
      advance_cash_flow_statements/wizard/account_wizard.py
  36. 45
      advance_cash_flow_statements/wizard/account_wizard.xml
  37. 195
      advance_cash_flow_statements/wizard/report_account_wizard.py

12
advance_cash_flow_statements/README.rst

@ -0,0 +1,12 @@
ADVANCED CASH FLOW STATEMENTS
=============================
Generate 4 levels of Dynamic Cash Flow Statements Report.
Configuration
=============
No additional configurations needed
Credits
=======
Developer: Varsha Vivek K @ cybrosys, Contact: odoo@cybrosys.com

24
advance_cash_flow_statements/__init__.py

@ -0,0 +1,24 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2019-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.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 wizard

45
advance_cash_flow_statements/__manifest__.py

@ -0,0 +1,45 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2019-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.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': '13.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, odoo13""",
'author': "Cybrosys Technologies",
'company': 'Cybrosys Techno Solutions',
'maintainer': 'Cybrosys Techno Solutions',
'website': "https://www.cybrosys.com",
'category': 'Accounting',
'depends': ['base', 'account'],
'data': ['security/ir.model.access.csv',
'wizard/account_wizard.xml',
'views/action_manager.xml',
'report/print_report.xml',
'report/pdf_template.xml',
],
'images': ['static/description/banner.png'],
'license': 'LGPL-3',
'installable': True,
'application': False,
'auto_install': False,
}

23
advance_cash_flow_statements/controllers/__init__.py

@ -0,0 +1,23 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2019-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.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 main

56
advance_cash_flow_statements/controllers/main.py

@ -0,0 +1,56 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2019-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.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.http import serialize_exception as _serialize_exception
from odoo.tools import html_escape
class XLSXReportController(http.Controller):
@http.route('/xlsx_reports', type='http', auth='user', methods=['POST'], csrf=False)
def get_report_xlsx(self, model, options, output_format, token, report_name, **kw):
uid = request.session.uid
report_obj = request.env[model].sudo(uid)
options = json.loads(options)
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 = _serialize_exception(e)
error = {
'code': 200,
'message': 'Odoo Server Error',
'data': se
}
return request.make_response(html_escape(json.dumps(error)))

6
advance_cash_flow_statements/doc/RELEASE_NOTES.md

@ -0,0 +1,6 @@
## Module <advance_cash_flow_statements>
#### 13.02.2020
#### Version 13.0.1.0.0
##### ADD
- Initial commit for Cash Flow Statement Report

218
advance_cash_flow_statements/report/pdf_template.xml

@ -0,0 +1,218 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<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>Name</th>
<th class="text-right">Cash In</th>
<th class="text-right">Cash Out</th>
<th class="text-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 class="text-right">
<span t-esc="fetch.get('total_debit')"
t-options="{'widget': 'monetary',
'display_currency': res_company.currency_id}"/>
</td>
<td class="text-right">
<span t-esc="fetch.get('total_credit')"
t-options="{'widget': 'monetary',
'display_currency': res_company.currency_id}"/>
</td>
<td class="text-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 class="text-right">
<span t-esc="fetch.get('total_debit')"
t-options="{'widget': 'monetary',
'display_currency': res_company.currency_id}"/>
</td>
<td class="text-right">
<span t-esc="fetch.get('total_credit')"
t-options="{'widget': 'monetary',
'display_currency': res_company.currency_id}"/>
</td>
<td class="text-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="fet.get('code')"/>
<span t-esc="fet.get('name')"/>
</strong>
</td>
<td class="text-right">
<strong>
<span t-esc="fet.get('total_debit')"
t-options="{'widget': 'monetary',
'display_currency': res_company.currency_id}"/>
</strong>
</td>
<td class="text-right">
<strong>
<span t-esc="fet.get('total_credit')"
t-options="{'widget': 'monetary',
'display_currency': res_company.currency_id}"/>
</strong>
</td>
<td class="text-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-foreach="res.get('journal_lines')" t-as="mov">
<td style="padding-left:50px !important" class="text-left">
<span t-esc="mov['name']"/>
</td>
<td class="text-right">
<span t-esc="mov['total_debit']"
t-options="{'widget': 'monetary',
'display_currency': res_company.currency_id}"/>
</td>
<td class="text-right">
<span t-esc="mov['total_credit']"
t-options="{'widget': 'monetary',
'display_currency': res_company.currency_id}"/>
</td>
<td class="text-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 class="text-right">
<strong>
<span t-esc="fet.get('total_debit')"
t-options="{'widget': 'monetary',
'display_currency': res_company.currency_id}"/>
</strong>
</td>
<td class="text-right">
<strong>
<span t-esc="fet.get('total_credit')"
t-options="{'widget': 'monetary',
'display_currency': res_company.currency_id}"/>
</strong>
</td>
<td class="text-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="padding-left:20px !important" class="text-left">
<span t-esc="line['name']"/>
</td>
<td class="text-right">
<span t-esc="line['total_debit']"
t-options="{'widget': 'monetary',
'display_currency': res_company.currency_id}"/>
</td>
<td class="text-right">
<span t-esc="line['total_credit']"
t-options="{'widget': 'monetary',
'display_currency': res_company.currency_id}"/>
</td>
<td class="text-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="padding-left:50px !important" class="text-left">
<span t-esc="mov['move_name']"/>
</td>
<td class="text-right">
<span t-esc="mov['total_debit']"
t-options="{'widget': 'monetary',
'display_currency': res_company.currency_id}"/>
</td>
<td class="text-right">
<span t-esc="mov['total_credit']"
t-options="{'widget': 'monetary',
'display_currency': res_company.currency_id}"/>
</td>
<td class="text-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>

11
advance_cash_flow_statements/report/print_report.xml

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<report
id="pdf_report"
model="account.wizard"
string="Cash flow statement Pdf Report"
report_type="qweb-pdf"
name="advance_cash_flow_statements.cash_flow_pdf_report"
file="advance_cash_flow_statements.cash_flow_pdf_report"
/>
</odoo>

3
advance_cash_flow_statements/security/ir.model.access.csv

@ -0,0 +1,3 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_account_wizard,account.wizard,model_account_wizard,,1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_account_wizard account.wizard model_account_wizard 1 1 1 1

BIN
advance_cash_flow_statements/static/description/banner.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 KiB

BIN
advance_cash_flow_statements/static/description/icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

BIN
advance_cash_flow_statements/static/description/images/account_reports_xlsx.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB

BIN
advance_cash_flow_statements/static/description/images/accounting_dynamic_reports.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 KiB

BIN
advance_cash_flow_statements/static/description/images/advance_cash_flow_statements-1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 190 KiB

BIN
advance_cash_flow_statements/static/description/images/advance_cash_flow_statements-10.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

BIN
advance_cash_flow_statements/static/description/images/advance_cash_flow_statements-2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

BIN
advance_cash_flow_statements/static/description/images/advance_cash_flow_statements-3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

BIN
advance_cash_flow_statements/static/description/images/advance_cash_flow_statements-4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

BIN
advance_cash_flow_statements/static/description/images/advance_cash_flow_statements-5.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

BIN
advance_cash_flow_statements/static/description/images/advance_cash_flow_statements-6.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

BIN
advance_cash_flow_statements/static/description/images/advance_cash_flow_statements-7.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

BIN
advance_cash_flow_statements/static/description/images/advance_cash_flow_statements-8.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

BIN
advance_cash_flow_statements/static/description/images/advance_cash_flow_statements-9.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

BIN
advance_cash_flow_statements/static/description/images/advance_cash_flow_statements.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

BIN
advance_cash_flow_statements/static/description/images/bank_book_dynamic_reports.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 KiB

BIN
advance_cash_flow_statements/static/description/images/base_accounting_kit.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

BIN
advance_cash_flow_statements/static/description/images/cash_book_dynamic_reports.jpeg

Binary file not shown.

After

Width:  |  Height:  |  Size: 145 KiB

BIN
advance_cash_flow_statements/static/description/images/checked.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

BIN
advance_cash_flow_statements/static/description/images/cybrosys.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

BIN
advance_cash_flow_statements/static/description/images/day_book_dynamic_report.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 133 KiB

690
advance_cash_flow_statements/static/description/index.html

@ -0,0 +1,690 @@
<div class="row"
style="margin: 0;position: relative;color: #000;background-position: center;background: #ffffff;border-bottom: 1px solid #e4e4e4;text-align: center; margin: auto; display: flex;justify-content: center;">
<a href="https://www.cybrosys.com/" target="_blank"><img src="images/cybrosys.png"
style=" width: 293px; padding: 1rem 0rem; margin: auto"
alt="cybrosys-logo"></a></div>
<div class="row"
style="margin:75px 0;position: relative;color: #000;background-position: center;background: #ffffff;border-bottom: 1px solid #e4e4e4; padding-bottom: 30px;">
<div class="col-md-7 col-sm-12 col-xs-12" style="padding: 0px">
<div style=" margin: 0 0 0px;padding: 20px 0 10;font-size: 23px;line-height: 35px;font-weight: 400;color: #000;border-top: 1px solid rgba(255,255,255,0.1);border-bottom: 1px solid rgba(255,255,255,0.11);text-align: left;">
<h1 style="font-size: 39px;font-weight: 600;margin: 0px !important;">Advanced Cash Flow Statements</h1>
<h3 style="font-size: 21px;margin-top: 8px;position: relative;">Generate four levels of cash flow statements.Print reports in both PDF and XLSX formats.
</h3>
</div>
<h2 style="font-weight: 600;font-size: 1.8rem;margin-top: 15px;">Key Highlights</h2>
<ul style=" padding: 0 1px; list-style: none; ">
<li style="display: flex;align-items: center;padding: 8px 0;font-size: 18px;"><img src="images/checked.png"
style=" width: 22px; margin-right: 6px; "
alt="check"> Available in
Odoo13 community edition.
</li>
<li style="display: flex;align-items: center;padding: 8px 0;font-size: 18px;"><img src="images/checked.png"
style=" width: 22px; margin-right: 6px; "
alt="check"> Generate
four levels of cash flow statements and print reports in both PDF and XLSX format.
</li>
<li style="display: flex;align-items: center;padding: 8px 0;font-size: 18px;"><img src="images/checked.png"
style=" width: 22px; margin-right: 6px; "
alt="check"> 1)Summary -
Month wise cash flow report.
</li>
<li style="display: flex;align-items: center;padding: 8px 0;font-size: 18px;"><img src="images/checked.png"
style=" width: 22px; margin-right: 6px; "
alt="check">
2)Consolidated - Report based on the cash flow affected account's type.
</li>
<li style="display: flex;align-items: center;padding: 8px 0;font-size: 18px;"><img src="images/checked.png"
style=" width: 22px; margin-right: 6px; "
alt="check"> 3)Detailed -
Report based on the cash flow affected accounts.
</li>
<li style="display: flex;align-items: center;padding: 8px 0;font-size: 18px;"><img src="images/checked.png"
style=" width: 22px; margin-right: 6px; "
alt="check"> 4)Very
Detailed - Report shows the cash flow affected account,corresponding journal entries and its move lines.
</li>
</ul>
</div>
<div class="col-md-5 col-sm-12 col-xs-12"><img src="images/advance_cash_flow_statements.png" class="img-responsive"
alt=""></div>
</div>
<div>
<section class="oe_container" style="padding: 1rem 0rem 1rem; background-color: #ffffff !important;">
<div class="row py-4 px-3">
<div class="w-100" style="padding-top:30px;padding-bottom:45px;border-radius: 10px;">
<ul role="tablist" class="nav nav-pills justify-content-center" data-tabs="tabs" id="pills-tab"
style="border: none;background: unset;">
<li class="nav-item mr-1 mb-3"
style="font-size: 1.05rem;font-weight: 400;transition: all .15s ease;color: #d31c22;background-color: #d31c22;box-shadow: 0 4px 6px rgba(50,50,93,.11), 0 1px 3px rgba(0,0,0,.08);border: 0;font-family: 'Open Sans',sans-serif;width: 140px;border-radius: 0.30rem;">
<a id="pills-home-tab" data-toggle="pill" href="#pills-home" role="tab"
aria-controls="pills-home" aria-selected="true" class="nav-link active show"
style="color: #000000;line-height: 33px;border: 0;border-radius: .25rem;font-weight: 400;">Overview </a>
</li>
<li class="nav-item mr-1 mb-3"
style="font-size: 1.05rem;font-weight: 400;transition: all .15s ease;color: #d31c22;background-color: #d31c22;box-shadow: 0 4px 6px rgba(50,50,93,.11), 0 1px 3px rgba(0,0,0,.08);border: 0;font-family: 'Open Sans',sans-serif;width: 140px;border-radius: 0.30rem;">
<a id="pills-home-tab" data-toggle="pill" href="#pills-home1" role="tab"
aria-controls="pills-home" aria-selected="true" class="nav-link "
style="color: #000000;line-height: 33px;border: 0;border-radius: .25rem;font-weight: 400;">Features </a>
</li>
<li class="nav-item mr-1 mb-3"
style="font-size: 1.05rem;font-weight: 400;transition: all .15s ease;color: #ffffff;background-color: #d31c22;box-shadow: 0 4px 6px rgba(50,50,93,.11), 0 1px 3px rgba(0,0,0,.08);border: 0;font-family: 'Open Sans',sans-serif;width: 140px;border-radius: 0.30rem;">
<a class="nav-link" id="pills-profile-tab" data-toggle="pill" href="#pills-profile" role="tab"
aria-controls="pills-profile" aria-selected="false"
style="color: #000000;line-height: 33px;border: 0;border-radius: .25rem;font-weight: 400;">Screenshots </a>
</li>
</ul>
<div class="tab-content" id="pills-tabContent"
style="padding-top: 30px; padding-bottom: 30px; padding: 30px;">
<div class="px-3 pt-1 tab-pane fade active show" id="pills-home" role="tabpanel" aria-labelledby="
pills-home-tab">
<!-- Overview-->
<h2 style="font-weight: 600;text-align: center;width: 100%;">Overview</h2>
<hr style="margin-top: 0px;margin-bottom: 2%;border: 0;text-align: center;border-top: 3px solid #d21c22;width: 5%;">
<h3 class="oe_slogan"
style="text-align: center;font-size: 19px;width: 100%;margin: 0;margin-top: 14px;color: #000 !important;opacity: 1 !important;line-height: 31px;font-weight: 400;letter-spacing: .5px;margin-bottom: 21px;">
Currently, in Odoo community edition there are no Cash Flow Statements. A cash flow statement is a financial statement that provides aggregate data regarding all cash inflows a company receives from its ongoing operations and external investment sources, also includes all cash outflows that pay for business activities and investments during a given period. This module generates four-level cash flow statements and prints its report in both PDF and XLSX format.
</div>
<div class="px-3 pt-1 tab-pane fade " id="pills-home1" role="tabpanel" aria-labelledby="
pills-home-tab">
<!-- feature tab-->
<h2 style="font-weight: 600;text-align: center;width: 100%;">Advanced Cash Flow Statements</h2>
<hr style="margin-top: 0px;margin-bottom: 2%;border: 0;text-align: center;border-top: 3px solid #d21c22;width: 5%;">
<ul>
<li class="mb8"
style="font-family: Roboto;color: #000;list-style-type: square;font-size: 19px;line-height: 50px; background-color: #3a34380d;padding-left: 20px;border-radius: 7px;list-style: none;">
<img src="images/checked.png" style=" width: 22px; margin-right: 6px; " alt="check">Available
in Odoo13 community edition.
</li>
<li class="mb8"
style="font-family: Roboto;color: #000;list-style-type: square;font-size: 19px;line-height: 50px; background-color: #3a34380d;padding-left: 20px;border-radius: 7px;list-style: none;">
<img src="images/checked.png" style=" width: 22px; margin-right: 6px; " alt="check">Generates
four levels of Cash flow statements report in both PDF and XLSX formats.
</li>
<li class="mb8"
style="font-family: Roboto;color: #000;list-style-type: square;font-size: 19px;line-height: 50px; background-color: #3a34380d;padding-left: 20px;border-radius: 7px;list-style: none;">
<img src="images/checked.png" style=" width: 22px; margin-right: 6px; " alt="check">1)Summary
- Month wise cash flow report.
</li>
<li class="mb8"
style="font-family: Roboto;color: #000;list-style-type: square;font-size: 19px;line-height: 50px; background-color: #3a34380d;padding-left: 20px;border-radius: 7px;list-style: none;">
<img src="images/checked.png" style=" width: 22px; margin-right: 6px; " alt="check">2)Consolidated
- Report based on the cash flow affected account's type.
</li>
<li class="mb8"
style="font-family: Roboto;color: #000;list-style-type: square;font-size: 19px;line-height: 50px; background-color: #3a34380d;padding-left: 20px;border-radius: 7px;list-style: none;">
<img src="images/checked.png" style=" width: 22px; margin-right: 6px; " alt="check">3)Detailed
- Report based on the cash flow affected accounts.
</li>
<li class="mb8"
style="font-family: Roboto;color: #000;list-style-type: square;font-size: 19px;line-height: 50px; background-color: #3a34380d;padding-left: 20px;border-radius: 7px;list-style: none;">
<img src="images/checked.png" style=" width: 22px; margin-right: 6px; " alt="check">4)Very
Detailed - Report shows the cash flow affected account,corresponding journal entries and
its move lines.
</li>
</ul>
</div>
<!-- Screenshot tab-->
<div class="px-3 tab-pane fade" id="pills-profile" role="tabpanel"
aria-labelledby="pills-profile-tab">
<div class="tab-pane">
<h2 style="font-weight: 600;text-align: center;width: 100%;">Screenshots</h2>
<hr style="margin-top: 0px;margin-bottom: 2%;border: 0;text-align: center;border-top: 3px solid #d21c22;width: 5%;">
<div>
<section class="oe_container">
<div id="demo" class="row carousel slide mb32" data-ride="carousel">
<div class="carousel-inner">
<div class="carousel-item active" style="min-height: 0px;">
<div class="col-xs-12 col-sm-12 col-md-12 mb16 mt16"
style="float: left;">
<h3 class="alert"
style="font-weight:400;color: #091E42;background: #fff;text-align: left;border-radius: 0; font-size: 18px;">
<img src="images/checked.png"
style=" width: 22px; margin-right: 6px; " alt="check">Go to
Invoicing --> Reporting --> Financial Reports --> Adv Cash Flow
Statement.</h3>
<div style=""><img class="img img-responsive center-block"
style="border-top-left-radius: 10px;border-top-right-radius: 10px;"
src="images/advance_cash_flow_statements-1.png">
</div>
</div>
</div>
<div class="carousel-item" style="min-height: 0px;">
<div class="col-xs-12 col-sm-12 col-md-12 mb16 mt16"
style="float: left;">
<h3 class="alert"
style="font-weight:400;color: #091E42;background: #fff;text-align: left;border-radius: 0; font-size: 18px;">
<img src="images/checked.png"
style=" width: 22px; margin-right: 6px; " alt="check"> A wizard will be opened once the user clicks on it. Choose start, end dates and target moves. Choose one level that you want to generate a report. Click the button PDF to get the cash flow report in PDF format. Click the button Excel to get the cash flow report in excel format.</h3>
<div style=""><img class="img img-responsive center-block"
style="border-top-left-radius: 10px;border-top-right-radius: 10px;"
src="images/advance_cash_flow_statements-2.png">
</div>
</div>
</div>
<div class="carousel-item" style="min-height: 0px;">
<div class="col-xs-12 col-sm-12 col-md-12 mb16 mt16"
style="float: left;">
<h3 class="mb32 alert"
style="font-weight:400;color: #091E42;background: #fff;text-align: left;border-radius: 0; font-size: 18px; ">
<img src="images/checked.png"
style=" width: 22px; margin-right: 6px; " alt="check">Cash
flow statement summary pdf report.</h3>
<div style=""><img class="img img-responsive center-block"
style="border-top-left-radius: 10px;border-top-right-radius: 10px;"
src="images/advance_cash_flow_statements-3.png">
</div>
</div>
</div>
<div class="carousel-item" style="min-height: 0px;">
<div class="col-xs-12 col-sm-12 col-md-12 mb16 mt16"
style="float: left;">
<h3 class="alert"
style="font-weight:400;color: #091E42;background: #fff;text-align: left;border-radius: 0; font-size: 18px; ">
<img src="images/checked.png"
style=" width: 22px; margin-right: 6px; " alt="check">Cash
flow Statement Summary excel Report.</h3>
<div style=""><img class="img img-responsive center-block"
style="border-top-left-radius: 10px;border-top-right-radius: 10px;"
src="images/advance_cash_flow_statements-4.png">
</div>
</div>
</div>
<div class="carousel-item" style="min-height: 0px;">
<div class="col-xs-12 col-sm-12 col-md-12 mb16 mt16"
style="float: left;">
<h3 class="alert"
style="font-weight:400;color: #091E42;background: #fff;text-align: left;border-radius: 0; font-size: 18px; ">
<img src="images/checked.png"
style=" width: 22px; margin-right: 6px; " alt="check">Cash
flow Statement consolidated pdf Report.</h3>
<div style=""><img class="img img-responsive center-block"
style="border-top-left-radius: 10px;border-top-right-radius: 10px;"
src="images/advance_cash_flow_statements-5.png">
</div>
</div>
</div>
<div class="carousel-item" style="min-height: 0px;">
<div class="col-xs-12 col-sm-12 col-md-12 mb16 mt16"
style="float: left;">
<h3 class="alert"
style="font-weight:400;color: #091E42;background: #fff;text-align: left;border-radius: 0; font-size: 18px; ">
<img src="images/checked.png"
style=" width: 22px; margin-right: 6px; " alt="check">Cash
flow Statement consolidated excel Report.</h3>
<div style=""><img class="img img-responsive center-block"
style="border-top-left-radius: 10px;border-top-right-radius: 10px;"
src="images/advance_cash_flow_statements-6.png">
</div>
</div>
</div>
<div class="carousel-item" style="min-height: 0px;">
<div class="col-xs-12 col-sm-12 col-md-12 mb16 mt16"
style="float: left;">
<h3 class="alert"
style="font-weight:400;color: #091E42;background: #fff;text-align: left;border-radius: 0; font-size: 18px; ">
<img src="images/checked.png"
style=" width: 22px; margin-right: 6px; " alt="check">Cash
flow Statement Detailed pdf Report</h3>
<div style=""><img class="img img-responsive center-block"
style="border-top-left-radius: 10px;border-top-right-radius: 10px;"
src="images/advance_cash_flow_statements-7.png">
</div>
</div>
</div>
<div class="carousel-item" style="min-height: 0px;">
<div class="col-xs-12 col-sm-12 col-md-12 mb16 mt16"
style="float: left;">
<h3 class="alert"
style="font-weight:400;color: #091E42;background: #fff;text-align: left;border-radius: 0; font-size: 18px; ">
<img src="images/checked.png"
style=" width: 22px; margin-right: 6px; " alt="check">Cash
flow Statement Detailed excel Report</h3>
<div style=""><img class="img img-responsive center-block"
style="border-top-left-radius: 10px;border-top-right-radius: 10px;"
src="images/advance_cash_flow_statements-8.png">
</div>
</div>
</div>
<div class="carousel-item" style="min-height: 0px;">
<div class="col-xs-12 col-sm-12 col-md-12 mb16 mt16"
style="float: left;">
<h3 class="alert"
style="font-weight:400;color: #091E42;background: #fff;text-align: left;border-radius: 0; font-size: 18px; ">
<img src="images/checked.png"
style=" width: 22px; margin-right: 6px; " alt="check">Cash
flow Statement Very Detailed pdf Report</h3>
<div style=""><img class="img img-responsive center-block"
style="border-top-left-radius: 10px;border-top-right-radius: 10px;"
src="images/advance_cash_flow_statements-9.png">
</div>
</div>
</div>
<div class="carousel-item" style="min-height: 0px;">
<div class="col-xs-12 col-sm-12 col-md-12 mb16 mt16"
style="float: left;">
<h3 class="alert"
style="font-weight:400;color: #091E42;background: #fff;text-align: left;border-radius: 0;font-size: 18px;">
<img src="images/checked.png"
style=" width: 22px; margin-right: 6px; " alt="check">Cash
flow Statement Very Detailed excel Report</h3>
<div style="">
<img class="img img-responsive center-block"
style="border-top-left-radius: 10px;border-top-right-radius: 10px;"
src="images/advance_cash_flow_statements-10.png"></div>
</div>
</div>
</div>
<a class="carousel-control-prev" href="#demo" data-slide="prev"
style="left:-25px;width: 35px;color: #000;"> <span
class="carousel-control-prev-icon"><i class="fa fa-chevron-left"
style="font-size:24px"></i></span>
</a> <a class="carousel-control-next" href="#demo" data-slide="next"
style="right:-25px;width: 35px;color: #000;"> <span
class="carousel-control-next-icon"><i class="fa fa-chevron-right"
style="font-size:24px"></i></span>
</a></div>
</section>
</div>
</div>
</div>
<!-- faq tab-->
<div class="px-2 px-lg-4 pt-3 tab-pane fade" id="pills-contact" role="tabpanel"
aria-labelledby="pills-contact-tab">
<ul class="list-unstyled">
</ul>
</div>
</div>
</div>
</div>
</section>
<section class="oe_container" style="padding: 2rem 3rem 1rem;">
<h2 style="font-weight: 600;text-align: center;margin-bottom: 25px;width: 100%;">Suggested Products</h2>
<hr style="margin-top: 0px;margin-bottom: 2%;border: 0;text-align: center;border-top: 3px solid #d21c22;width: 5%;">
<div id="demo1" class="row carousel slide" data-ride="carousel">
<!-- The slideshow -->
<div class="carousel-inner">
<div class="carousel-item active" style="min-height: 0px;">
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float: left;"> <a href="https://apps.odoo.com/apps/modules/13.0/account_reports_xlsx/" target="_blank">
<div style="box-shadow: 0 15px 35px rgba(50, 50, 93, 0.1), 0 5px 15px rgba(0, 0, 0, 0.07);border-radius: 10px;"> <img class="img img-responsive center-block" style="border-top-left-radius: 10px;border-top-right-radius: 10px;" src="images/account_reports_xlsx.png"> </div>
</a> </div>
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float: left;"><a
href="https://apps.odoo.com/apps/modules/13.0/accounting_dynamic_reports/" target="_blank">
<div style="box-shadow: 0 15px 35px rgba(50, 50, 93, 0.1), 0 5px 15px rgba(0, 0, 0, 0.07);border-radius: 10px;">
<img class="img img-responsive center-block"
style="border-top-left-radius: 10px;border-top-right-radius: 10px;"
src="images/accounting_dynamic_reports.png"></div>
</a></div>
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float: left;"><a
href="https://www.odoo.com/apps/modules/13.0/account_day_book/" target="_blank">
<div style="box-shadow: 0 15px 35px rgba(50, 50, 93, 0.1), 0 5px 15px rgba(0, 0, 0, 0.07);border-radius: 10px;">
<img class="img img-responsive center-block"
style="border-top-left-radius: 10px;border-top-right-radius: 10px;"
src="images/day_book_dynamic_report.png"></div>
</a></div>
</div>
<div class="carousel-item" style="min-height: 0px;">
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float: left;"><a
href="https://www.odoo.com/apps/modules/13.0/account_bank_book/" target="_blank">
<div style="box-shadow: 0 15px 35px rgba(50, 50, 93, 0.1), 0 5px 15px rgba(0, 0, 0, 0.07);border-radius: 10px;">
<img class="img img-responsive center-block"
style="border-top-left-radius: 10px;border-top-right-radius: 10px;"
src="images/bank_book_dynamic_reports.png"></div>
</a></div>
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float: left;"><a
href="https://www.odoo.com/apps/modules/13.0/account_cash_book/" target="_blank">
<div style="box-shadow: 0 15px 35px rgba(50, 50, 93, 0.1), 0 5px 15px rgba(0, 0, 0, 0.07);border-radius: 10px;">
<img class="img img-responsive center-block"
style="border-top-left-radius: 10px;border-top-right-radius: 10px;"
src="images/cash_book_dynamic_reports.jpeg"></div>
</a></div>
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float: left;"><a
href="https://apps.odoo.com/apps/modules/13.0/base_accounting_kit/" target="_blank">
<div style="box-shadow: 0 15px 35px rgba(50, 50, 93, 0.1), 0 5px 15px rgba(0, 0, 0, 0.07);border-radius: 10px;">
<img class="img img-responsive center-block"
style="border-top-left-radius: 10px;border-top-right-radius: 10px;"
src="images/base_accounting_kit.gif"></div>
</a></div>
</div>
</div>
<!-- Left and right controls -->
<a class="carousel-control-prev" href="#demo1" data-slide="prev"
style="left:-25px;width: 35px;color: #000;"> <span class="carousel-control-prev-icon"><i
class="fa fa-chevron-left" style="font-size:24px"></i></span> </a> <a class="carousel-control-next"
href="#demo1"
data-slide="next"
style="right:-25px;width: 35px;color: #000;">
<span class="carousel-control-next-icon"><i class="fa fa-chevron-right" style="font-size:24px"></i></span>
</a></div>
</section>
<section class="row" style="padding: 2rem 3rem 1rem;margin:0px">
<h2 style="font-weight: 600;margin-bottom: 20px;text-align: center;width: 100%;">Our Service</h2>
<hr style="margin-top: 0px;margin-bottom: 2%;border: 0;text-align: center;border-top: 3px solid #d21c22;width: 5%;">
<div class="row" style=" display: flex; justify-content: center; flex-wrap: wrap;width: 100%; ">
<!-- <div style="display:flex;padding-top: 20px;justify-content: space-between;"> -->
<div class="col-md-2 col-sm-6 col-xs-12">
<div style="width:75px;height:75px;background:#fff; border-radius:100%;margin: auto;"><a
href="https://www.cybrosys.com/odoo-customization-and-installation/" target="_blank"> <img
src="https://www.cybrosys.com/images/odoo-customization.png"
style="width: 100%;border-radius: 100%;"/> </a></div>
<h3 class="oe_slogan"
style="font-weight: 800;text-align: center;font-size: 14px;width: 100%;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;">
<a href="https://www.cybrosys.com/odoo-customization-and-installation/" target="_blank"
style="list-style: none; color:#000; text-decoration: none; font-family: 'Montserrat',sans-serif;">
Odoo Customization </a></h3>
</div>
<div class="col-md-2 col-sm-6 col-xs-12">
<div style="width:75px;height:75px;background:#fff; border-radius:100%;margin: auto;"><a
href="https://www.cybrosys.com/odoo-erp-implementation/" target="_blank"> <img
src="https://www.cybrosys.com/images/odoo-erp-implementation.png"
style="width: 100%;border-radius: 100%;"/> </a></div>
<h3 class="oe_slogan"
style="font-weight: 800;text-align: center;font-size: 14px;width: 100%;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;">
<a href="https://www.cybrosys.com/odoo-erp-implementation/" target="_blank"
style="list-style: none; color:#000; text-decoration: none; font-family: 'Montserrat',sans-serif;">
Odoo Implementation </a></h3>
</div>
<div class="col-md-2 col-sm-6 col-xs-12">
<div style="width:75px;height:75px;background:#fff; border-radius:100%;margin: auto;"><a
href="https://www.cybrosys.com/odoo-erp-integration/" target="_blank"> <img
src="https://www.cybrosys.com/images/odoo-erp-integration.png"
style="width: 100%;border-radius: 100%;"/> </a></div>
<h3 class="oe_slogan"
style="font-weight: 800;text-align: center;font-size: 14px;width: 100%;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;">
<a href="https://www.cybrosys.com/odoo-erp-integration/" target="_blank"
style="list-style: none; color:#000; text-decoration: none; font-family: 'Montserrat',sans-serif;">
Odoo Integration </a></h3>
</div>
<div class="col-md-2 col-sm-6 col-xs-12">
<div style="width:75px;height:75px;background:#fff; border-radius:100%;margin: auto;"><a
href="https://www.cybrosys.com/odoo-erp-support/" target="_blank"> <img
src="https://www.cybrosys.com/images/odoo-erp-support.png"
style="width: 100%;border-radius: 100%;"/> </a></div>
<h3 class="oe_slogan"
style="font-weight: 800;text-align: center;font-size: 14px;width: 100%;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;">
<a href="https://www.cybrosys.com/odoo-erp-support/" target="_blank"
style="list-style: none; color:#000; text-decoration: none; font-family: 'Montserrat',sans-serif;">
Odoo Support</a></h3>
</div>
<div class="col-md-2 col-sm-6 col-xs-12">
<div style="width:75px;height:75px;background:#fff; border-radius:100%;margin: auto;"><a
href="https://www.cybrosys.com/hire-odoo-developer/" target="_blank"> <img
src="https://www.cybrosys.com/images/hire-odoo-developer.png"
style="width: 100%;border-radius: 100%;"/> </a></div>
<h3 class="oe_slogan"
style="font-weight: 800;text-align: center;font-size: 14px;width: 100%;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;">
<a href="https://www.cybrosys.com/hire-odoo-developer/" target="_blank"
style="list-style: none; color:#000; text-decoration: none; font-family: 'Montserrat',sans-serif;">
Hire Odoo Developers</a></h3>
</a> </div>
<!-- </div> -->
</div>
</section>
<section class="row" style="padding: 2rem 3rem 1rem;margin:0px">
<div class="row" style="margin: 0">
<h2 style="font-weight: 600;margin-bottom: 20px;text-align: center;width: 100%;">Our Industries</h2>
<hr style="margin-top: 0px;margin-bottom: 2%;border: 0;text-align: center;border-top: 3px solid #d21c22;width: 5%;">
<!-- <div style="display:flex;justify-content: space-between;flex-wrap:wrap;"> -->
<div class="row" style="width: 100%">
<div class="col-md-4 col-sm-6 col-xs-12" style=" margin-bottom: 10px; ">
<div>
<div style="width:75px;height:75px;background:#CE2D48; border-radius:100%;float: left;text-align: left;">
<a href="https://www.cybrosys.com/odoo/industries/best-trading-erp/" target="_blank"> <img
src="https://www.cybrosys.com/images/odoo-index-industry-1.png" alt="Odoo Industry"
style=" border-radius: 100%;width:100%;"/> </a></div>
</div>
<div style="width:70%;float:left;">
<h3 class="oe_slogan"
style=" text-align: left;font-size: 14px;font-weight:800;width: auto;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 4px;margin-left: 16px;">
<a href="https://www.cybrosys.com/odoo/industries/best-trading-erp/" target="_blank"
style="list-style: none; color:#000; text-decoration: none;font-family: 'Montserrat',sans-serif;">
Trading </a></h3>
<h3 class="oe_slogan"
style=" text-align: left;font-size: 12px;width: auto;margin: 0;margin-top:5px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 5px;margin-left: 16px; font-family: 'Montserrat',sans-serif;">
Easily procure and sell your products. </h3>
</div>
</div>
<div class="col-md-4 col-sm-6 col-xs-12" style=" margin-bottom: 10px; ">
<div>
<div style="width:75px;height:75px;background:#CE2D48; border-radius:100%;float: left;text-align: left;">
<a href="https://www.cybrosys.com/odoo/industries/manufacturing-erp-software/"
target="_blank"> <img src="https://www.cybrosys.com/images/odoo-index-industry-2.png"
alt="Odoo Industry" style=" border-radius: 100%;width:100%;"/>
</a></div>
</div>
<div style="width:70%;float:left;" style=" margin-bottom: 10px; ">
<h3 class="oe_slogan"
style=" text-align: left;font-size: 14px;font-weight:800;width: auto;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 4px;margin-left: 16px;">
<a href="https://www.cybrosys.com/odoo/industries/manufacturing-erp-software/"
target="_blank"
style="list-style: none; color:#000; text-decoration: none;font-family: 'Montserrat',sans-serif;">
Manufacturing</a></h3>
<h3 class="oe_slogan"
style=" text-align: left;font-size: 12px;width: auto;margin: 0;margin-top:5px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 5px;margin-left: 16px;font-family: 'Montserrat',sans-serif;">
Plan, track and schedule your operations. </h3>
</div>
</div>
<div class="col-md-4 col-sm-6 col-xs-12" style=" margin-bottom: 10px; ">
<div>
<div style="width:75px;height:75px;background:#CE2D48; border-radius:100%;float: left;text-align: left;">
<a href="https://www.cybrosys.com/odoo/industries/restaurant-management/" target="_blank">
<img src="https://www.cybrosys.com/images/odoo-index-industry-3.png" alt="Odoo Industry"
style=" border-radius: 100%;width:100%;"/> </a></div>
</div>
<div style="width:70%;float:left;">
<h3 class="oe_slogan"
style=" text-align: left;font-size: 14px;font-weight:800;width: auto;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 4px;margin-left: 16px;">
<a href="https://www.cybrosys.com/odoo/industries/restaurant-management/" target="_blank"
style="list-style: none; color:#000; text-decoration: none;font-family: 'Montserrat',sans-serif;">
Restaurant</a></h3>
<h3 class="oe_slogan"
style=" text-align: left;font-size: 12px;width: auto;margin: 0;margin-top:5px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 5px;margin-left: 16px;font-family: 'Montserrat',sans-serif;">
Run your bar or restaurant methodical. </h3>
</div>
</div>
<div class="col-md-4 col-sm-6 col-xs-12" style=" margin-bottom: 10px; ">
<div>
<div style="width:75px;height:75px;background:#CE2D48; border-radius:100%;float: left;text-align: left;">
<a href="https://www.cybrosys.com/odoo/industries/pos/" target="_blank"> <img
src="https://www.cybrosys.com/images/odoo-index-industry-4.png" alt="Odoo Industry"
style=" border-radius: 100%;width:100%;"/> </a></div>
</div>
<div style="width:70%;float:left;">
<h3 class="oe_slogan"
style=" text-align: left;font-size: 14px;font-weight:800;width: auto;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 4px;margin-left: 16px;">
<a href="https://www.cybrosys.com/odoo/industries/pos/" target="_blank"
style="list-style: none; color:#000; text-decoration: none;font-family: 'Montserrat',sans-serif;">
POS</a></h3>
<h3 class="oe_slogan"
style=" text-align: left;font-size: 12px;width: auto;margin: 0;margin-top:5px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 5px;margin-left: 16px;font-family: 'Montserrat',sans-serif;">
Easy configuring and convivial selling. </h3>
</div>
</div>
<div class="col-md-4 col-sm-6 col-xs-12" style=" margin-bottom: 10px; ">
<div>
<div style="width:75px;height:75px;background:#CE2D48; border-radius:100%;float: left;text-align: left;">
<a href="https://www.cybrosys.com/odoo/industries/ecommerce-website/" target="_blank"> <img
src="https://www.cybrosys.com/images/odoo-index-industry-5.png" alt="Odoo Industry"
style=" border-radius: 100%;width:100%;"/> </a></div>
</div>
<div style="width:70%;float:left;">
<h3 class="oe_slogan"
style=" text-align: left;font-size: 14px;font-weight:800;width: auto;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 0px;margin-left: 16px;">
<a href="https://www.cybrosys.com/odoo/industries/ecommerce-website/" target="_blank"
style="list-style: none; color:#000; text-decoration: none; font-family: 'Montserrat',sans-serif;">
E-commerce & Website</a></h3>
<h3 class="oe_slogan"
style=" text-align: left;font-size: 12px;width: auto;margin: 0;margin-top:5px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 5px;margin-left: 16px; font-family: 'Montserrat',sans-serif;">
Mobile friendly, awe-inspiring product pages. </h3>
</div>
</div>
<div class="col-md-4 col-sm-6 col-xs-12" style=" margin-bottom: 10px; ">
<div>
<div style="width:75px;height:75px;background:#CE2D48; border-radius:100%;float: left;text-align: left;">
<a href="https://www.cybrosys.com/odoo/industries/hotel-management-erp/" target="_blank">
<img src="https://www.cybrosys.com/images/odoo-index-industry-6.png" alt="Odoo Industry"
style=" border-radius: 100%;width:100%;"/> </a></div>
</div>
<div style="width:70%;float:left;">
<h3 class="oe_slogan"
style=" text-align: left;font-size: 14px;font-weight:800;width: auto;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 4px;margin-left: 16px;">
<a href="https://www.cybrosys.com/odoo/industries/hotel-management-erp/" target="_blank"
style="list-style: none; color:#000; text-decoration: none; font-family: 'Montserrat',sans-serif;">
Hotel Management</a></h3>
<h3 class="oe_slogan"
style=" text-align: left;font-size: 12px;width: auto;margin: 0;margin-top:5px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 5px;margin-left: 16px; font-family: 'Montserrat',sans-serif;">
An all-inclusive hotel management application. </h3>
</div>
</div>
<div class="col-md-4 col-sm-6 col-xs-12" style=" margin-bottom: 10px; ">
<div>
<div style="width:75px;height:75px;background:#CE2D48; border-radius:100%;float: left;text-align: left;">
<a href="https://www.cybrosys.com/odoo/industries/education-erp-software/" target="_blank">
<img src="https://www.cybrosys.com/images/odoo-index-industry-7.png" alt="Odoo Industry"
style=" border-radius: 100%;width:100%;"/> </a></div>
</div>
<div style="width:70%;float:left;">
<h3 class="oe_slogan"
style=" text-align: left;font-size: 14px;font-weight:800;width: auto;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 4px;margin-left: 16px;">
<a href="https://www.cybrosys.com/odoo/industries/education-erp-software/" target="_blank"
style="list-style: none; color:#000; text-decoration: none; font-family: 'Montserrat',sans-serif;">
Education</a></h3>
<h3 class="oe_slogan"
style=" text-align: left;font-size: 12px;width: auto;margin: 0;margin-top:5px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 5px;margin-left: 16px; font-family: 'Montserrat',sans-serif;">
A Collaborative platform for educational management. </h3>
</div>
</div>
<div class="col-md-4 col-sm-6 col-xs-12" style=" margin-bottom: 10px; ">
<div>
<div style="width:75px;height:75px;background:#CE2D48; border-radius:100%;float: left;text-align: left;">
<a href="https://www.cybrosys.com/odoo/industries/service-management/" target="_blank"> <img
src="https://www.cybrosys.com/images/odoo-index-industry-8.png" alt="Odoo Industry"
style=" border-radius: 100%;width:100%;"/> </a></div>
</div>
<div style="width:70%;float:left;">
<h3 class="oe_slogan"
style=" text-align: left;font-size: 14px;font-weight:800;width: auto;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 4px;margin-left: 16px;">
<a href="https://www.cybrosys.com/odoo/industries/service-management/" target="_blank"
style="list-style: none; color:#000; text-decoration: none; font-family: 'Montserrat',sans-serif;">
Service Management</a></h3>
<h3 class="oe_slogan"
style=" text-align: left;font-size: 12px;width: auto;margin: 0;margin-top:5px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 5px;margin-left: 16px; font-family: 'Montserrat',sans-serif;">
Keep track of services and invoice accordingly. </h3>
</div>
</div>
</div>
</div>
</div>
</section>
<section class="oe_container" style="padding: 0% 0% 6% 0%;">
<center>
<div class="col-md-12" style="margin: auto !important;
width: 70%;
padding: 30px;">
<h2 style="font-weight: 600;text-align: center;width: 100%;">Need Any Help?</h2>
<hr style="margin-top: 0px;margin-bottom: 2%;border: 0;text-align: center;border-top: 3px solid #d21c22;width: 5%;">
<h4 style="font-size:16px;"> If you have anything to share with us based on your use of this module, please
let us know. We are ready to offer our support. </h4>
<div class="col-md-6" style="float:left; padding:20px;">
<h4><i class="fa fa-envelope"></i>Email us </h4>
<p>odoo@cybrosys.com / info@cybrosys.com</p>
</div>
<div class="col-md-6" style="float:left; padding:20px;">
<h4><i class="fa fa-phone"></i> Contact Us </h4>
<a href="https://www.cybrosys.com/contact/" target="_blank"> www.cybrosys.com</a>
</div>
</div>
</center>
</section>
<section class="oe_container" style="padding: 0% 0% 6% 0%;">
<div class="oe_slogan" style="margin-bottom: 0px;">
<div style=" display: flex; justify-content: center; flex-wrap: wrap; ">
</div>
<br>
<img src="https://www.cybrosys.com/images/logo.png" style="width: 190px; margin-bottom: 25px;margin-top: 30px;"
class="center-block">
<div style=" display: flex; justify-content: center; flex-wrap: wrap; "><a href="https://twitter.com/cybrosys"
target="_blank"><i
class="fa fa-2x fa-twitter"
style="color:white;background: #00a0d1;width:35px;height: 35px;padding-top: 7px;font-size: 21px;margin-right: 6px;border-radius: 100%;"></i></a>
</td>
<a href="https://www.linkedin.com/company/cybrosys-technologies-pvt-ltd" target="_blank"><i
class="fa fa-2x fa-linkedin"
style="color:white;background: #31a3d6;width:35px;height: 35px;padding-top: 7px;font-size: 21px;margin-right: 6px;border-radius: 100%;"></i></a>
</td>
<a href="https://www.facebook.com/cybrosystechnologies" target="_blank"><i class="fa fa-2x fa-facebook"
style="color:white;background: #3b5998;width:35px; height: 35px;padding-top: 7px;font-size: 21px;margin-right: 6px;border-radius: 100%;"></i></a>
</td>
<a href="https://in.pinterest.com/cybrosys" target="_blank"><i class="fa fa-2x fa-pinterest"
style="color:white;background: #ac0f18;width:35px;height: 35px;padding-top: 7px;font-size: 21px;margin-right: 6px;border-radius: 100%;"></i></a>
</td>
</div>
</div>
</section>
</div>

49
advance_cash_flow_statements/static/src/js/action_manager.js

@ -0,0 +1,49 @@
odoo.define('advance_cash_flow_statements.ActionManager', function (require) {
"use strict";
/**
* The purpose of this file is to add the actions of type
* 'ir_actions_xlsx_download' to the ActionManager.
*/
var ActionManager = require('web.ActionManager');
var framework = require('web.framework');
var session = require('web.session');
ActionManager.include({
/**
* Executes actions of type 'ir_actions_xlsx_download'.
*
* @private
* @param {Object} action the description of the action to execute
* @returns {Deferred} resolved when the report has been downloaded ;
* rejected if an error occurred during the report generation
*/
_executexlsxReportDownloadAction: function (action) {
framework.blockUI();
var def = $.Deferred();
session.get_file({
url: '/xlsx_reports',
data: action.data,
success: def.resolve.bind(def),
error: (error) => this.call('crash_manager', 'rpc_error', error),
complete: framework.unblockUI,
});
return def;
},
/**
* Overrides to handle the 'ir_actions_xlsx_download' actions.
*
* @override
* @private
*/
_handleAction: function (action, options) {
if (action.type === 'ir_actions_xlsx_download') {
return this._executexlsxReportDownloadAction(action, options);
}
return this._super.apply(this, arguments);
},
});
});

9
advance_cash_flow_statements/views/action_manager.xml

@ -0,0 +1,9 @@
<odoo>
<data>
<template id="assets_backend" name="xls_assets" inherit_id="web.assets_backend">
<xpath expr="." position="inside">
<script type="text/javascript" src="/advance_cash_flow_statements/static/src/js/action_manager.js"/>
</xpath>
</template>
</data>
</odoo>

24
advance_cash_flow_statements/wizard/__init__.py

@ -0,0 +1,24 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2019-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.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_wizard
from . import report_account_wizard

378
advance_cash_flow_statements/wizard/account_wizard.py

@ -0,0 +1,378 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2019-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.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 datetime import datetime
from odoo import models, fields, api
from odoo.exceptions import UserError
from odoo.tools import date_utils, io, xlsxwriter
class AccountWizard(models.TransientModel):
_name = "account.wizard"
_inherit = "account.common.report"
date_from = fields.Date(string="Start Date", required=True)
date_to = fields.Date(string="End Date", default=fields.Date.today, required=True)
today = fields.Date("Report Date", default=fields.Date.today)
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')
def generate_pdf_report(self):
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').report_action(self, data=data)
def generate_xlsx_report(self):
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_xlsx_download',
'data': {'model': 'account.wizard',
'options': json.dumps(data, default=date_utils.json_default),
'output_format': 'xlsx',
'report_name': 'Adv Cash Flow Statement',
}
}
def get_xlsx_report(self, data, response):
output = io.BytesIO()
workbook = xlsxwriter.Workbook(output, {'in_memory': True})
fetched_data = []
account_res = []
journal_res = []
fetched = []
account_type_id = self.env.ref('account.data_account_type_liquidity').id
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
LEFT JOIN account_account_type aat ON aat.id = aa.user_type_id
WHERE am.date BETWEEN '""" + str(data['date_from']) + """' and '""" + str(
data['date_to']) + """' AND aat.id='""" + str(account_type_id) + """' ) 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_account_type aat ON aat.id = aa.user_type_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 aat.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
LEFT JOIN account_account_type aat ON aat.id = aa.user_type_id
WHERE am.date BETWEEN '""" + str(data['date_from']) + """' and '""" + str(
data['date_to']) + """' AND aat.id='""" + str(account_type_id) + """' ) 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_account_type aat ON aat.id = aa.user_type_id
""" + state + """GROUP BY aat.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.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
LEFT JOIN account_account_type aat ON aat.id = aa.user_type_id
WHERE am.date BETWEEN '""" + str(data['date_from']) + """' and '""" + str(
data['date_to']) + """' AND aat.id='""" + str(account_type_id) + """' ) 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_account_type aat ON aat.id = aa.user_type_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:
account_type_id = self.env.ref('account.data_account_type_liquidity').id
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
LEFT JOIN account_account_type aat ON aat.id = aa.user_type_id
WHERE am.date BETWEEN '""" + str(data['date_from']) + """' and '""" + str(
data['date_to']) + """' AND aat.id='""" + str(account_type_id) + """' """ + 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_account_type aat ON aat.id = aa.user_type_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:F5', '')
sheet.merge_range('C3:F4', 'CASH FLOW STATEMENTS', head)
sheet.merge_range('C4:F4', '')
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()
for i in 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, str(i['total_debit']) + str(currency_symbol), amount)
sheet.write(row_num + 1, col_num + 2, str(i['total_credit']) + str(currency_symbol), amount)
sheet.write(row_num + 1, col_num + 3, str(i['total_debit'] - i['total_credit']) + str(currency_symbol),
amount)
row_num = row_num + 1
elif data['levels'] == 'consolidated':
sheet.write(row_num + 1, col_num, i['name'], txt_left)
sheet.write(row_num + 1, col_num + 1, str(i['total_debit']) + str(currency_symbol), amount)
sheet.write(row_num + 1, col_num + 2, str(i['total_credit']) + str(currency_symbol), amount)
sheet.write(row_num + 1, col_num + 3, str(i['total_debit'] - i['total_credit']) + str(currency_symbol),
amount)
row_num = row_num + 1
for j in journal_res_list:
for k in fetched_data_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, str(k['total_debit']) + str(currency_symbol), amount_bold)
sheet.write(row_num + 1, col_num + 2, str(k['total_credit']) + str(currency_symbol), amount_bold)
sheet.write(row_num + 1, col_num + 3,
str(k['total_debit'] - k['total_credit']) + str(currency_symbol), amount_bold)
row_num = row_num + 1
for l in j['journal_lines']:
sheet.write(row_num + 1, col_num, l['name'], txt_left)
sheet.write(row_num + 1, col_num + 1, str(l['total_debit']) + str(currency_symbol), amount)
sheet.write(row_num + 1, col_num + 2, str(l['total_credit']) + str(currency_symbol), amount)
sheet.write(row_num + 1, col_num + 3, str(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, str(k['total_debit']) + str(currency_symbol), amount_bold)
sheet.write(row_num + 1, col_num + 2, str(k['total_credit']) + str(currency_symbol), amount_bold)
sheet.write(row_num + 1, col_num + 3,
str(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, str(l['total_debit']) + str(currency_symbol), amount)
sheet.write(row_num + 1, col_num + 2, str(l['total_credit']) + str(currency_symbol), amount)
sheet.write(row_num + 1, col_num + 3,
str(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, str(m['total_debit']) + str(currency_symbol), amount)
sheet.write(row_num + 1, col_num + 2, str(m['total_credit']) + str(currency_symbol), amount)
sheet.write(row_num + 1, col_num + 3,
str(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):
account_type_id = self.env.ref('account.data_account_type_liquidity').id
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
LEFT JOIN account_account_type aat ON aat.id = aa.user_type_id
WHERE am.date BETWEEN '""" + str(data['date_from']) + """' and '""" + str(
data['date_to']) + """' AND aat.id='""" + str(account_type_id) + """' """ + 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
LEFT JOIN account_account_type aat ON aat.id = aa.user_type_id
WHERE am.date BETWEEN '""" + str(data['date_from']) + """' and '""" + str(
data['date_to']) + """' AND aat.id='""" + str(account_type_id) + """' """ + 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):
account_type_id = self.env.ref('account.data_account_type_liquidity').id
state = """AND am.state = 'posted' """ if data['target_move'] == 'posted' else ''
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
LEFT JOIN account_account_type aat ON aat.id = aa.user_type_id
WHERE am.date BETWEEN '""" + str(data['date_from']) + """' and '""" + str(
data['date_to']) + """' AND aat.id='""" + str(account_type_id) + """' """ + 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,
}

45
advance_cash_flow_statements/wizard/account_wizard.xml

@ -0,0 +1,45 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="account_wizard_view" model="ir.ui.view">
<field name="name">Wizard</field>
<field name="model">account.wizard</field>
<field name="arch" type="xml">
<form string="Report Options">
<group col="4">
<field name="date_from"/>
<field name="target_move" widget="radio"/>
<field name="date_to"/>
<field name="levels"/>
</group>
<footer>
<button name="generate_pdf_report" string="PDF" type="object" default_focus="1" class="oe_highlight"/>
<button name="generate_xlsx_report" string="Excel" type="object" default_focus="1" class="oe_highlight"/>
<button string="Cancel" class="btn btn-secondary" special="cancel"/>
</footer>
</form>
</field>
</record>
<record id="action_account_wizard" model="ir.actions.act_window">
<field name="name">Cash Flow Statements</field>
<field name="res_model">account.wizard</field>
<field name="type">ir.actions.act_window</field>
<field name="view_mode">form</field>
<field name="view_id" ref="account_wizard_view"/>
<field name="target">new</field>
</record>
<menuitem id="menu_financial_reports"
name="Financial reports"
sequence="1"
parent="account.menu_finance_reports"
groups="account.group_account_user"/>
<menuitem id="menu_account_wizard"
name="Adv Cash Flow Statement"
sequence="5"
action="action_account_wizard"
parent="menu_financial_reports"
groups="account.group_account_user"/>
</odoo>

195
advance_cash_flow_statements/wizard/report_account_wizard.py

@ -0,0 +1,195 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2019-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.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 models, api
class ReportAccountWizard(models.AbstractModel):
_name = "report.advance_cash_flow_statements.cash_flow_pdf_report"
@api.model
def _get_report_values(self, docids, data=None):
fetched_data = []
account_res = []
journal_res = []
fetched = []
account_type_id = self.env.ref('account.data_account_type_liquidity').id
self.model = self.env.context.get('active_model')
docs = self.env[self.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
LEFT JOIN account_account_type aat ON aat.id = aa.user_type_id
WHERE am.date BETWEEN '""" + str(data['date_from']) + """' and '""" + str(
data['date_to']) + """' AND aat.id='""" + str(account_type_id) + """' ) 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_account_type aat ON aat.id = aa.user_type_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 aat.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
LEFT JOIN account_account_type aat ON aat.id = aa.user_type_id
WHERE am.date BETWEEN '""" + str(data['date_from']) + """' and '""" + str(
data['date_to']) + """' AND aat.id='""" + str(account_type_id) + """' ) 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_account_type aat ON aat.id = aa.user_type_id
""" + state + """GROUP BY aat.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.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
LEFT JOIN account_account_type aat ON aat.id = aa.user_type_id
WHERE am.date BETWEEN '""" + str(data['date_from']) + """' and '""" + str(
data['date_to']) + """' AND aat.id='""" + str(account_type_id) + """' ) 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_account_type aat ON aat.id = aa.user_type_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:
account_type_id = self.env.ref('account.data_account_type_liquidity').id
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
LEFT JOIN account_account_type aat ON aat.id = aa.user_type_id
WHERE am.date BETWEEN '""" + str(data['date_from']) + """' and '""" + str(
data['date_to']) + """' AND aat.id='""" + str(account_type_id) + """' """ + 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_account_type aat ON aat.id = aa.user_type_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)
return {
'date_from': data['date_from'],
'date_to': data['date_to'],
'levels': data['levels'],
'doc_ids': self.ids,
'doc_model': self.model,
'docs': docs,
'fetched_data': fetched_data,
'account_res': account_res,
'journal_res': journal_res,
'fetched': fetched,
}
def _get_lines(self, account, data):
account_type_id = self.env.ref('account.data_account_type_liquidity').id
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
LEFT JOIN account_account_type aat ON aat.id = aa.user_type_id
WHERE am.date BETWEEN '""" + str(data['date_from']) + """' and '""" + str(
data['date_to']) + """' AND aat.id='""" + str(account_type_id) + """' """ + 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
LEFT JOIN account_account_type aat ON aat.id = aa.user_type_id
WHERE am.date BETWEEN '""" + str(data['date_from']) + """' and '""" + str(
data['date_to']) + """' AND aat.id='""" + str(account_type_id) + """' """ + 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):
account_type_id = self.env.ref('account.data_account_type_liquidity').id
state = """AND am.state = 'posted' """ if data['target_move'] == 'posted' else ''
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
LEFT JOIN account_account_type aat ON aat.id = aa.user_type_id
WHERE am.date BETWEEN '""" + str(data['date_from']) + """' and '""" + str(
data['date_to']) + """' AND aat.id='""" + str(account_type_id) + """' """ + 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,
}
Loading…
Cancel
Save