Browse Source

Nov 10 [ADD] : Initial Commit 'advance_cash_flow_statements'

pull/221/merge
AjmalCybro 2 years ago
parent
commit
4a7246d7f5
  1. 15
      advance_cash_flow_statements/README.rst
  2. 24
      advance_cash_flow_statements/__init__.py
  3. 49
      advance_cash_flow_statements/__manifest__.py
  4. 23
      advance_cash_flow_statements/controllers/__init__.py
  5. 62
      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. 12
      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/assets/icons/check.png
  11. BIN
      advance_cash_flow_statements/static/description/assets/icons/chevron.png
  12. BIN
      advance_cash_flow_statements/static/description/assets/icons/cogs.png
  13. BIN
      advance_cash_flow_statements/static/description/assets/icons/consultation.png
  14. BIN
      advance_cash_flow_statements/static/description/assets/icons/ecom-black.png
  15. BIN
      advance_cash_flow_statements/static/description/assets/icons/education-black.png
  16. BIN
      advance_cash_flow_statements/static/description/assets/icons/hotel-black.png
  17. BIN
      advance_cash_flow_statements/static/description/assets/icons/license.png
  18. BIN
      advance_cash_flow_statements/static/description/assets/icons/lifebuoy.png
  19. BIN
      advance_cash_flow_statements/static/description/assets/icons/manufacturing-black.png
  20. BIN
      advance_cash_flow_statements/static/description/assets/icons/pos-black.png
  21. BIN
      advance_cash_flow_statements/static/description/assets/icons/puzzle.png
  22. BIN
      advance_cash_flow_statements/static/description/assets/icons/restaurant-black.png
  23. BIN
      advance_cash_flow_statements/static/description/assets/icons/service-black.png
  24. BIN
      advance_cash_flow_statements/static/description/assets/icons/trading-black.png
  25. BIN
      advance_cash_flow_statements/static/description/assets/icons/training.png
  26. BIN
      advance_cash_flow_statements/static/description/assets/icons/update.png
  27. BIN
      advance_cash_flow_statements/static/description/assets/icons/user.png
  28. BIN
      advance_cash_flow_statements/static/description/assets/icons/wrench.png
  29. BIN
      advance_cash_flow_statements/static/description/assets/misc/categories.png
  30. BIN
      advance_cash_flow_statements/static/description/assets/misc/check-box.png
  31. BIN
      advance_cash_flow_statements/static/description/assets/misc/compass.png
  32. BIN
      advance_cash_flow_statements/static/description/assets/misc/corporate.png
  33. BIN
      advance_cash_flow_statements/static/description/assets/misc/customer-support.png
  34. BIN
      advance_cash_flow_statements/static/description/assets/misc/cybrosys-logo.png
  35. BIN
      advance_cash_flow_statements/static/description/assets/misc/features.png
  36. BIN
      advance_cash_flow_statements/static/description/assets/misc/logo.png
  37. BIN
      advance_cash_flow_statements/static/description/assets/misc/pictures.png
  38. BIN
      advance_cash_flow_statements/static/description/assets/misc/pie-chart.png
  39. BIN
      advance_cash_flow_statements/static/description/assets/misc/right-arrow.png
  40. BIN
      advance_cash_flow_statements/static/description/assets/misc/star.png
  41. BIN
      advance_cash_flow_statements/static/description/assets/misc/support.png
  42. BIN
      advance_cash_flow_statements/static/description/assets/misc/whatsapp.png
  43. BIN
      advance_cash_flow_statements/static/description/assets/modules/1.png
  44. BIN
      advance_cash_flow_statements/static/description/assets/modules/2.png
  45. BIN
      advance_cash_flow_statements/static/description/assets/modules/3.png
  46. BIN
      advance_cash_flow_statements/static/description/assets/modules/4.png
  47. BIN
      advance_cash_flow_statements/static/description/assets/modules/5.gif
  48. BIN
      advance_cash_flow_statements/static/description/assets/modules/6.png
  49. BIN
      advance_cash_flow_statements/static/description/assets/screenshots/advance_cash_flow_statements-1.png
  50. BIN
      advance_cash_flow_statements/static/description/assets/screenshots/advance_cash_flow_statements-10.png
  51. BIN
      advance_cash_flow_statements/static/description/assets/screenshots/advance_cash_flow_statements-2.png
  52. BIN
      advance_cash_flow_statements/static/description/assets/screenshots/advance_cash_flow_statements-3.png
  53. BIN
      advance_cash_flow_statements/static/description/assets/screenshots/advance_cash_flow_statements-4.png
  54. BIN
      advance_cash_flow_statements/static/description/assets/screenshots/advance_cash_flow_statements-5.png
  55. BIN
      advance_cash_flow_statements/static/description/assets/screenshots/advance_cash_flow_statements-6.png
  56. BIN
      advance_cash_flow_statements/static/description/assets/screenshots/advance_cash_flow_statements-7.png
  57. BIN
      advance_cash_flow_statements/static/description/assets/screenshots/advance_cash_flow_statements-8.png
  58. BIN
      advance_cash_flow_statements/static/description/assets/screenshots/advance_cash_flow_statements-9.png
  59. BIN
      advance_cash_flow_statements/static/description/assets/screenshots/hero.gif
  60. BIN
      advance_cash_flow_statements/static/description/banner.png
  61. BIN
      advance_cash_flow_statements/static/description/icon.png
  62. 827
      advance_cash_flow_statements/static/description/index.html
  63. 21
      advance_cash_flow_statements/static/src/js/action_manager.js
  64. 51
      advance_cash_flow_statements/views/account_wizard.xml
  65. 25
      advance_cash_flow_statements/wizard/__init__.py
  66. 83
      advance_cash_flow_statements/wizard/account_account.py
  67. 435
      advance_cash_flow_statements/wizard/account_wizard.py
  68. 201
      advance_cash_flow_statements/wizard/report_account_wizard.py

15
advance_cash_flow_statements/README.rst

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

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

49
advance_cash_flow_statements/__manifest__.py

@ -0,0 +1,49 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2022-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': '16.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, odoo16""",
'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/print_report.xml',
'report/pdf_template.xml',
'views/account_wizard.xml',
],
'assets': {
'web.assets_backend': [
'advance_cash_flow_statements/static/src/js/action_manager.js'
],
},
'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

62
advance_cash_flow_statements/controllers/main.py

@ -0,0 +1,62 @@
# -*- 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, report_name, **kw):
print('get_xls report')
uid = request.session.uid
report_obj = request.env[model].with_user(uid)
print(report_obj)
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)
# print(response,"set")
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>
#### 10.11.2022
#### Version 16.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>

12
advance_cash_flow_statements/report/print_report.xml

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<data>
<record id="pdf_report" 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>
</data>
</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/assets/icons/check.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

BIN
advance_cash_flow_statements/static/description/assets/icons/chevron.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 310 B

BIN
advance_cash_flow_statements/static/description/assets/icons/cogs.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
advance_cash_flow_statements/static/description/assets/icons/consultation.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
advance_cash_flow_statements/static/description/assets/icons/ecom-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 576 B

BIN
advance_cash_flow_statements/static/description/assets/icons/education-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 733 B

BIN
advance_cash_flow_statements/static/description/assets/icons/hotel-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 911 B

BIN
advance_cash_flow_statements/static/description/assets/icons/license.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
advance_cash_flow_statements/static/description/assets/icons/lifebuoy.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
advance_cash_flow_statements/static/description/assets/icons/manufacturing-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 673 B

BIN
advance_cash_flow_statements/static/description/assets/icons/pos-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 878 B

BIN
advance_cash_flow_statements/static/description/assets/icons/puzzle.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 653 B

BIN
advance_cash_flow_statements/static/description/assets/icons/restaurant-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 905 B

BIN
advance_cash_flow_statements/static/description/assets/icons/service-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 839 B

BIN
advance_cash_flow_statements/static/description/assets/icons/trading-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 427 B

BIN
advance_cash_flow_statements/static/description/assets/icons/training.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 627 B

BIN
advance_cash_flow_statements/static/description/assets/icons/update.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
advance_cash_flow_statements/static/description/assets/icons/user.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 988 B

BIN
advance_cash_flow_statements/static/description/assets/icons/wrench.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
advance_cash_flow_statements/static/description/assets/misc/categories.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
advance_cash_flow_statements/static/description/assets/misc/check-box.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
advance_cash_flow_statements/static/description/assets/misc/compass.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
advance_cash_flow_statements/static/description/assets/misc/corporate.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
advance_cash_flow_statements/static/description/assets/misc/customer-support.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
advance_cash_flow_statements/static/description/assets/misc/cybrosys-logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

BIN
advance_cash_flow_statements/static/description/assets/misc/features.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 589 B

BIN
advance_cash_flow_statements/static/description/assets/misc/logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

BIN
advance_cash_flow_statements/static/description/assets/misc/pictures.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
advance_cash_flow_statements/static/description/assets/misc/pie-chart.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
advance_cash_flow_statements/static/description/assets/misc/right-arrow.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 967 B

BIN
advance_cash_flow_statements/static/description/assets/misc/star.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
advance_cash_flow_statements/static/description/assets/misc/support.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

BIN
advance_cash_flow_statements/static/description/assets/misc/whatsapp.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

BIN
advance_cash_flow_statements/static/description/assets/modules/1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

BIN
advance_cash_flow_statements/static/description/assets/modules/2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

BIN
advance_cash_flow_statements/static/description/assets/modules/3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

BIN
advance_cash_flow_statements/static/description/assets/modules/4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

BIN
advance_cash_flow_statements/static/description/assets/modules/5.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 MiB

BIN
advance_cash_flow_statements/static/description/assets/modules/6.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

BIN
advance_cash_flow_statements/static/description/assets/screenshots/advance_cash_flow_statements-1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 490 KiB

BIN
advance_cash_flow_statements/static/description/assets/screenshots/advance_cash_flow_statements-10.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 KiB

BIN
advance_cash_flow_statements/static/description/assets/screenshots/advance_cash_flow_statements-2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 290 KiB

BIN
advance_cash_flow_statements/static/description/assets/screenshots/advance_cash_flow_statements-3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 131 KiB

BIN
advance_cash_flow_statements/static/description/assets/screenshots/advance_cash_flow_statements-4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

BIN
advance_cash_flow_statements/static/description/assets/screenshots/advance_cash_flow_statements-5.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 KiB

BIN
advance_cash_flow_statements/static/description/assets/screenshots/advance_cash_flow_statements-6.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

BIN
advance_cash_flow_statements/static/description/assets/screenshots/advance_cash_flow_statements-7.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

BIN
advance_cash_flow_statements/static/description/assets/screenshots/advance_cash_flow_statements-8.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

BIN
advance_cash_flow_statements/static/description/assets/screenshots/advance_cash_flow_statements-9.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

BIN
advance_cash_flow_statements/static/description/assets/screenshots/hero.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 151 KiB

BIN
advance_cash_flow_statements/static/description/banner.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

BIN
advance_cash_flow_statements/static/description/icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

827
advance_cash_flow_statements/static/description/index.html

@ -0,0 +1,827 @@
<div style="background-color: #714B67; min-height: 600px; width: 100%; padding: 15px; position: relative;">
<!-- TITLE BAR -->
<div
style="border-bottom: 1px solid #875A7B; padding: 15px; display: flex; justify-content: space-between; align-items: center;">
<img src="./assets/misc/cybrosys-logo.png" width="42" height="42"
style="width: 42px; height: 42px;"/>
<div>
<div style="color: #7C7BAD; font-size: 14px; font-family: 'Montserrat', sans-serif; font-weight: bold; background-color: white; display: inline-block; padding: 3px 10px; border-radius: 50px;"
class="mr-2">
<i class="fa fa-check mr-1"></i>Community
</div>
<div style="color: #875A7B; font-size: 14px; font-family: 'Montserrat', sans-serif; font-weight: bold; background-color: white; display: inline-block; padding: 3px 10px; border-radius: 50px;"
class="mr-2">
<i class="fa fa-check mr-1"></i>Enterprise
</div>
<div style="color: #017E84; font-size: 14px; font-family: 'Montserrat', sans-serif; font-weight: bold; background-color: white; display: inline-block; padding: 3px 10px; border-radius: 50px;"
class="mr-2">
<i class="fa fa-check mr-1"></i>Odoo.sh
</div>
</div>
</div>
<!-- END OF TITLE BAR -->
<!-- APP HERO -->
<h1 style="color: #FFFFFF; font-weight: bolder; font-size: 50px; text-align: center; margin-top: 50px;">
Advanced Cash Flow Statements
</h1>
<p style="color:#FFFFFF; padding: 8px 15px; text-align: center; font-size: 24px;">
Generate four levels of cash flow statements.<br/>Print reports in both
PDF and XLSX formats.
</p>
<!-- END OF APP HERO -->
<img src="assets/screenshots/hero.gif"
style="width: 75%; height: auto; position: absolute; margin-left: auto; margin-right: auto; top: 45%; left: 12%; right: auto;"/>
</div>
<!-- NAVIGATION SECTION -->
<div class="d-flex align-items-center"
style="border-bottom: 2px solid #714B67; padding: 15px 0px; margin-top: 300px;">
<div class="d-flex justify-content-center align-items-center mr-2"
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;">
<img src="./assets/misc/compass.png"/>
</div>
<h2 class="mt-2"
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">
Explore This
Module
</h2>
</div>
<div class="row my-4" style="font-family: 'Montserrat', sans-serif;">
<div class="col-sm-12 col-md-6 my-3">
<a href="#overview">
<div class="d-flex justify-content-between align-items-center"
style="background-color: #f5f5f5; padding: 30px; width: 100%;">
<div>
<span style="color: #714B67; font-size: 24px; font-weight: 500; display: block;">
Overview
</span>
<span
style="color: #714B67; font-size: 16px; font-weight: 400; color:#282F33; display: block;">
Learn
more about this
module
</span>
</div>
<img src="./assets/misc/right-arrow.png" width="36" height="36"/>
</div>
</a>
</div>
<div class="col-sm-12 col-md-6 my-3">
<a href="#features">
<div class="d-flex justify-content-between align-items-center"
style="background-color: #f5f5f5; padding: 30px; width: 100%;">
<div>
<span style="color: #714B67; font-size: 24px; font-weight: 500; display: block;">
Features
</span>
<span
style="color: #714B67; font-size: 16px; font-weight: 400; color:#282F33; display: block;">
View
features of this
module
</span>
</div>
<img src="./assets/misc/right-arrow.png" width="36" height="36"/>
</div>
</a>
</div>
<div class="col-sm-12 col-md-6 my-3">
<a href="#screenshots">
<div class="d-flex justify-content-between align-items-center"
style="background-color: #f5f5f5; padding: 30px; width: 100%;">
<div>
<span style="color: #714B67; font-size: 24px; font-weight: 500; display: block;">
Screenshots
</span>
<span
style="color: #714B67; font-size: 16px; font-weight: 400; color:#282F33; display: block;">
View
screenshots for this
module
</span>
</div>
<img src="./assets/misc/right-arrow.png" width="36" height="36"/>
</div>
</a>
</div>
</div>
<!-- END OF NAVIGATION SECTION -->
<!-- OVERVIEW SECTION -->
<div class="d-flex align-items-center"
style="border-bottom: 2px solid #714B67; padding: 15px 0px;" id="overview">
<div class="d-flex justify-content-center align-items-center mr-2"
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;">
<img src="./assets/misc/pie-chart.png"/>
</div>
<h2 class="mt-2"
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">
Overview
</h2>
</div>
<div class="row"
style="font-family: 'Montserrat', sans-serif; font-weight: 400; font-size: 14px; line-height: 200%;">
<div class="col-sm-12 py-4">
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>
<!-- END OF OVERVIEW SECTION -->
<!-- FEATURES SECTION -->
<div class="d-flex align-items-center"
style="border-bottom: 2px solid #714B67; padding: 15px 0px;" id="features">
<div class="d-flex justify-content-center align-items-center mr-2"
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;">
<img src="./assets/misc/features.png"/>
</div>
<h2 class="mt-2"
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">
Features
</h2>
</div>
<div class="row"
style="font-family: 'Montserrat', sans-serif; font-weight: 400; font-size: 14px; line-height: 200%;">
<div class="col-sm-12 col-md-6">
<div class="d-flex align-items-start"
style="margin-top: 40px; margin-bottom: 40px">
<img src="./assets/misc/check-box.png" class="mr-2"/>
<div>
<span style="display: block; font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">
Available in Odoo 16 community edition.
</span>
</div>
</div>
<div class="d-flex align-items-start"
style="margin-top: 40px; margin-bottom: 40px">
<img src="./assets/misc/check-box.png" class="mr-2"/>
<div>
<span style="display: block; font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">
Generate four levels of cash flow statements and
print reports
in both PDF and XLSX format
</span>
</div>
</div>
<div class="d-flex align-items-start"
style="margin-top: 40px; margin-bottom: 40px">
<img src="./assets/misc/check-box.png" class="mr-2"/>
<div>
<span style="display: block; font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">
Summary
</span>
<span style="display: block; font-family: 'Montserrat', sans-serif; font-size: 12px;">
Month wise cash flow report.
</span>
</div>
</div>
<div class="d-flex align-items-start"
style="margin-top: 40px; margin-bottom: 40px">
<img src="./assets/misc/check-box.png" class="mr-2"/>
<div>
<span style="display: block; font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">
Consolidated
</span>
<span style="display: block; font-family: 'Montserrat', sans-serif; font-size: 12px;">
Report based on the cash flow
affected accounts.
</span>
</div>
</div>
<div class="d-flex align-items-start"
style="margin-top: 40px; margin-bottom: 40px">
<img src="./assets/misc/check-box.png" class="mr-2"/>
<div>
<span style="display: block; font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">
Detailed
</span>
<span style="display: block; font-family: 'Montserrat', sans-serif; font-size: 12px;">
Report based on the cash flow
affected accounts.
</span>
</div>
</div>
<div class="d-flex align-items-start"
style="margin-top: 40px; margin-bottom: 40px">
<img src="./assets/misc/check-box.png" class="mr-2"/>
<div>
<span style="display: block; font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">
Very Detailed
</span>
<span style="display: block; font-family: 'Montserrat', sans-serif; font-size: 12px;">
Report shows the cash flow
affected account,corresponding journal entries
and its move
lines
</span>
</div>
</div>
</div>
</div>
<!-- END OF FEATURES SECTION -->
<!-- SCREENSHOTS SECTION -->
<div class="d-flex align-items-center"
style="border-bottom: 2px solid #714B67; padding: 15px 0px;"
id="screenshots">
<div class="d-flex justify-content-center align-items-center mr-2"
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;">
<img src="./assets/misc/pictures.png"/>
</div>
<h2 class="mt-2"
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">
Screenshots
</h2>
</div>
<div class="row">
<div class="col-sm-12">
<div style="display: block; margin: 30px auto;">
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">
Access Advanced Cash Flow from the Menu
</h3>
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;">
Go to Invoicing --> Reporting --> Financial Reports
--> Adv Cash
Flow Statement.
</p>
<img src="./assets/screenshots/advance_cash_flow_statements-1.png"
class="img-thumbnail">
</div>
<div style="display: block; margin: 30px auto;">
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">
Cash Flow Report in PDF and Excel
</h3>
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;">
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.
</p>
<img src="./assets/screenshots/advance_cash_flow_statements-2.png"
class="img-thumbnail">
</div>
<div style="display: block; margin: 30px auto;">
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">
Cash Flow Statement Summary PDF
</h3>
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;">
Cash flow statement summary PDF report example.
</p>
<img src="./assets/screenshots/advance_cash_flow_statements-3.png"
class="img-thumbnail">
</div>
<div style="display: block; margin: 30px auto;">
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">
Cash Flow Statement Summary Excel
</h3>
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;">
Cash flow statement summary Excel report example.
</p>
<img src="./assets/screenshots/advance_cash_flow_statements-4.png"
class="img-thumbnail">
</div>
<div style="display: block; margin: 30px auto;">
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">
Cash flow Statement Consolidated PDF Report.
</h3>
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;">
Cash flow Statement consolidated PDF report example
</p>
<img src="./assets/screenshots/advance_cash_flow_statements-5.png"
class="img-thumbnail">
</div>
<div style="display: block; margin: 30px auto;">
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">
Cash Flow Statement Consolidated Excel
</h3>
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;">
Cash flow Statement consolidated Excel report
example.
</p>
<img src="./assets/screenshots/advance_cash_flow_statements-6.png"
class="img-thumbnail">
</div>
<div style="display: block; margin: 30px auto;">
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">
Cash flow Statement Detailed PDF Report
</h3>
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;">
Cash flow statement detailed PDF report example.
</p>
<img src="./assets/screenshots/advance_cash_flow_statements-7.png"
class="img-thumbnail">
</div>
<div style="display: block; margin: 30px auto;">
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">
Cash Flow Statement Detailed Excel Report
</h3>
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;">
Cash flow statement detailed Excel report example.
</p>
<img src="./assets/screenshots/advance_cash_flow_statements-8.png"
class="img-thumbnail">
</div>
<div style="display: block; margin: 30px auto;">
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">
Cash flow Statement Very Detailed PDF Report
</h3>
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;">
Cash flow Statement very detailed PDF report
example.
</p>
<img src="./assets/screenshots/advance_cash_flow_statements-9.png"
class="img-thumbnail">
</div>
<div style="display: block; margin: 30px auto;">
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">
Cash flow Statement Very Detailed Excel Report
</h3>
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;">
Cash flow statement very detailed Excel report
example.
</p>
<img src="./assets/screenshots/advance_cash_flow_statements-10.png"
class="img-thumbnail">
</div>
</div>
</div>
<!-- END OF SCREENSHOTS SECTION -->
<!-- RELATED PRODUCTS -->
<div class="d-flex align-items-center"
style="border-bottom: 2px solid #714B67; padding: 15px 0px;">
<div class="d-flex justify-content-center align-items-center mr-2"
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;">
<img src="./assets/misc/categories.png"/>
</div>
<h2 class="mt-2"
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">
Related
Products
</h2>
</div>
<div class="row">
<div class="col-sm-12">
<div id="demo1" class="row carousel slide" data-ride="carousel">
<!-- The slideshow -->
<div class="carousel-inner" style="padding: 30px;">
<div class="carousel-item" style="min-height: 198.656px;">
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16"
style="float:left">
<a href="https://apps.odoo.com/apps/modules/15.0/dynamic_accounts_report/"
target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-radius: 0px;"
src="./assets/modules/1.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/15.0/custom_gantt_view/"
target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-radius: 0px;"
src="./assets/modules/2.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/15.0/project_custom_gantt/"
target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-radius: 0px;"
src="./assets/modules/3.png">
</div>
</a>
</div>
</div>
<div class="carousel-item active"
style="min-height: 198.656px;">
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16"
style="float:left">
<a href="https://apps.odoo.com/apps/modules/15.0/account_reports_xlsx/"
target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-radius: 0px;"
src="./assets/modules/4.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/15.0/base_accounting_kit/"
target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-radius: 0px;"
src="./assets/modules/5.gif">
</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/15.0/hr_payroll_community/"
target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-radius: 0px;"
src="./assets/modules/6.png">
</div>
</a>
</div>
</div>
</div>
<!-- Left and right controls -->
<a class="carousel-control-prev" href="#demo1" data-slide="prev"
style="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="width:35px; color:#000">
<span class="carousel-control-next-icon">
<i
class="fa fa-chevron-right"
style="font-size:24px"></i>
</span>
</a>
</div>
</div>
</div>
<!-- END OF RELATED PRODUCTS -->
<!-- OUR SERVICES -->
<div class="d-flex align-items-center"
style="border-bottom: 2px solid #714B67; padding: 15px 0px;">
<div class="d-flex justify-content-center align-items-center mr-2"
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;">
<img src="./assets/misc/star.png"/>
</div>
<h2 class="mt-2"
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">
Our Services
</h2>
</div>
<div class="container my-5">
<div class="row">
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #1dd1a1 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/cogs.png" class="img-responsive"
height="48px" width="48px">
</div>
<h6 class="text-center"
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Customization
</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #ff6b6b !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/wrench.png" class="img-responsive"
height="48px" width="48px">
</div>
<h6 class="text-center"
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Implementation
</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #6462CD !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/lifebuoy.png" class="img-responsive"
height="48px" width="48px">
</div>
<h6 class="text-center"
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Support
</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #ffa801 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/user.png" class="img-responsive"
height="48px" width="48px">
</div>
<h6 class="text-center"
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Hire
Odoo
Developer
</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #54a0ff !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/puzzle.png" class="img-responsive"
height="48px" width="48px">
</div>
<h6 class="text-center"
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Integration
</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #6d7680 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/update.png" class="img-responsive"
height="48px" width="48px">
</div>
<h6 class="text-center"
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Migration
</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #786fa6 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/consultation.png" class="img-responsive"
height="48px" width="48px">
</div>
<h6 class="text-center"
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Consultancy
</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #f8a5c2 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/training.png" class="img-responsive"
height="48px" width="48px">
</div>
<h6 class="text-center"
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Implementation
</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #e6be26 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/license.png" class="img-responsive"
height="48px" width="48px">
</div>
<h6 class="text-center"
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Licensing Consultancy
</h6>
</div>
</div>
</div>
<!-- END OF END OF OUR SERVICES -->
<!-- OUR INDUSTRIES -->
<div class="d-flex align-items-center"
style="border-bottom: 2px solid #714B67; padding: 15px 0px;">
<div class="d-flex justify-content-center align-items-center mr-2"
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;">
<img src="./assets/misc/corporate.png"/>
</div>
<h2 class="mt-2"
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">
Our
Industries
</h2>
</div>
<div class="container my-5">
<div class="row">
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;">
<img src="./assets/icons/trading-black.png"
class="img-responsive mb-3" height="48px" width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Trading
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Easily procure
and
sell your products
</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;">
<img src="./assets/icons/pos-black.png"
class="img-responsive mb-3" height="48px" width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
POS
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Easy
configuration
and convivial experience
</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;">
<img src="./assets/icons/education-black.png"
class="img-responsive mb-3" height="48px" width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Education
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
A platform for
educational management
</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;">
<img src="./assets/icons/manufacturing-black.png"
class="img-responsive mb-3" height="48px"
width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Manufacturing
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Plan, track and
schedule your operations
</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;">
<img src="./assets/icons/ecom-black.png"
class="img-responsive mb-3" height="48px" width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
E-commerce &amp; Website
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Mobile
friendly,
awe-inspiring product pages
</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;">
<img src="./assets/icons/service-black.png"
class="img-responsive mb-3" height="48px" width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Service Management
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Keep track of
services and invoice
</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;">
<img src="./assets/icons/restaurant-black.png"
class="img-responsive mb-3" height="48px" width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Restaurant
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Run your bar or
restaurant methodically
</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;">
<img src="./assets/icons/hotel-black.png"
class="img-responsive mb-3" height="48px" width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Hotel Management
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
An
all-inclusive
hotel management application
</p>
</div>
</div>
</div>
</div>
<!-- END OF END OF OUR INDUSTRIES -->
<!-- SUPPORT -->
<div class="d-flex align-items-center"
style="border-bottom: 2px solid #714B67; padding: 15px 0px;">
<div class="d-flex justify-content-center align-items-center mr-2"
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;">
<img src="./assets/misc/customer-support.png"/>
</div>
<h2 class="mt-2"
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">
Support
</h2>
</div>
<div class="container mt-5">
<div class="row">
<div class="col-sm-12 col-md-6">
<div style="background-color: #F6F8F9; padding: 30px; display: flex; align-items: center;">
<div class="mr-4"
style="background-color: #714B67; display: inline-block; height: 70px; width: 70px; display: flex; align-items: center; justify-content: center;">
<img src="./assets/misc/support.png" height="48" width="48"
style="width: 42px; height: 42px;"/>
</div>
<div>
<h4>Need Help?</h4>
<p style="line-height: 100%;">Got questions or need help?
Get in touch.
</p>
<a href="mailto:odoo@cybrosys.com">
<p style="font-weight: 400; font-size: 28px; line-height: 80%; color: #714B67;">
odoo@cybrosys.com
</p>
</a>
</div>
</div>
</div>
<div class="col-sm-12 col-md-6">
<div style="background-color: #F6F8F9; padding: 30px; display: flex; align-items: center;">
<div class="mr-4"
style="background-color: #2AC44D; display: inline-block; height: 70px; width: 70px; display: flex; align-items: center; justify-content: center;">
<img src="./assets/misc/whatsapp.png" height="52" width="52"
style="width: 52px; height: 52px;"/>
</div>
<div>
<h4>WhatsApp</h4>
<p style="line-height: 100%;">Say hi to us on WhatsApp!</p>
<a href="https://api.whatsapp.com/send?phone=918606827707">
<p style="font-weight: 400; font-size: 28px; line-height: 80%; color: #714B67;">
+91 86068
27707
</p>
</a>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-12 my-5 d-flex justify-content-center align-items-center">
<img src="./assets/misc/logo.png" width="144" height="31"
style="width:144px; height: 31px; margin-top: 40px;"/>
</div>
</div>
</div>
<!-- END OF SUPPORT -->

21
advance_cash_flow_statements/static/src/js/action_manager.js

@ -0,0 +1,21 @@
/** @odoo-module **/
import {registry} from "@web/core/registry";
import { download } from "@web/core/network/download";
import framework from 'web.framework';
import session from 'web.session';
registry.category("ir.actions.report handlers").add("advance_cash_xlsx", async (action) => {
if (action.report_type === 'xlsx') {
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;
}
});

51
advance_cash_flow_statements/views/account_wizard.xml

@ -0,0 +1,51 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<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>
<group>
<field name="date_from"/>
<field name="target_move" widget="radio"/>
</group>
<group>
<field name="date_to"/>
<field name="levels"/>
</group>
</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="type">ir.actions.act_window</field>
<field name="res_model">account.wizard</field>
<field name="view_id"
ref="advance_cash_flow_statements.account_wizard_view"/>
<field name="view_mode">form</field>
<field name="target">new</field>
</record>
<menuitem id="menu_financial_reports" sequence="5"
name="Financial reports"
parent="account.menu_finance_reports"
groups="account.group_account_manager"/>
<menuitem id="account_bank_book_menu" name="Adv Cash Flow Statement"
sequence="3"
action="advance_cash_flow_statements.action_account_wizard"
parent="advance_cash_flow_statements.menu_financial_reports"
groups="account.group_account_manager"/>
</data>
</odoo>

25
advance_cash_flow_statements/wizard/__init__.py

@ -0,0 +1,25 @@
# -*- 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_account
from . import account_wizard
from . import report_account_wizard

83
advance_cash_flow_statements/wizard/account_account.py

@ -0,0 +1,83 @@
# -*- 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 api, models, fields
from odoo.tools.misc import get_lang
class AccountCommonReport(models.Model):
_inherit = "account.report"
_description = "Account Common Report"
company_id = fields.Many2one('res.company', string='Company', required=True,
readonly=True,
default=lambda self: self.env.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)]",
)
date_from = fields.Date(string='Start Date')
date_to = fields.Date(string='End Date')
target_move = fields.Selection([('posted', 'All Posted Entries'),
('all', 'All Entries'),
], string='Target Moves', required=True,
default='posted')
@api.onchange('company_id')
def _onchange_company_id(self):
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):
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):
raise NotImplementedError()
def check_report(self):
print('Account.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)

435
advance_cash_flow_statements/wizard/account_wizard.py

@ -0,0 +1,435 @@
# -*- 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
from odoo.exceptions import UserError
from odoo.tools import date_utils, io, xlsxwriter
class AccountWizard(models.TransientModel):
_name = "account.wizard"
_inherit = "account.report"
name = fields.Char(default="Invoice")
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.report',
'report_type': 'xlsx',
'data': {'model': 'account.wizard',
'output_format': 'xlsx',
'options': json.dumps(data,
default=date_utils.json_default),
'report_name': 'Adv Cash Flow Statement',
},
}
def get_xlsx_report(self, data, response):
output = io.BytesIO()
workbook = xlsxwriter.Workbook(output, {'in_memory': True})
fetched_data = []
account_res = []
journal_res = []
fetched = []
currency_symbol = self.env.user.company_id.currency_id.symbol
if data['levels'] == 'summary':
state = """ WHERE am.state = 'posted' """ if data[
'target_move'] == 'posted' else ''
query3 = """SELECT to_char(am.date, 'Month') as month_part, extract(
YEAR from am.date) as year_part, sum(aml.debit) AS total_debit, sum(
aml.credit) AS total_credit, sum(aml.balance) AS total_balance FROM(
SELECT am.date, am.id, am.state FROM account_move as am
LEFT JOIN account_move_line aml ON aml.move_id = am.id
LEFT JOIN account_account aa ON aa.id = aml.account_id
WHERE am.date BETWEEN '""" + str(
data['date_from']) + """' and '""" + str(
data['date_to']) + """' ) am
LEFT JOIN account_move_line aml ON aml.move_id = am.id
LEFT JOIN account_account aa ON aa.id = aml.account_id
""" + state + """GROUP BY month_part,year_part"""
cr = self._cr
cr.execute(query3)
fetched_data = cr.dictfetchall()
elif data['levels'] == 'consolidated':
state = """ WHERE am.state = 'posted' """ if data[
'target_move'] == 'posted' else ''
query2 = """SELECT aa.name, sum(aml.debit) AS total_debit, sum(
aml.credit) AS total_credit,sum(aml.balance) AS total_balance FROM (
SELECT am.id, am.state FROM account_move as am
LEFT JOIN account_move_line aml ON aml.move_id = am.id
LEFT JOIN account_account aa ON aa.id = aml.account_id
WHERE am.date BETWEEN '""" + str(
data['date_from']) + """' and '""" + str(
data['date_to']) + """' ) am
LEFT JOIN account_move_line aml ON aml.move_id = am.id
LEFT JOIN account_account aa ON aa.id = aml.account_id
""" + state + """GROUP BY aa.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
WHERE am.date BETWEEN '""" + str(
data['date_from']) + """' and '""" + str(
data['date_to']) + """' ) am
LEFT JOIN account_move_line aml ON aml.move_id = am.id
LEFT JOIN account_account aa ON aa.id = aml.account_id
""" + state + """GROUP BY aa.name, aa.code"""
cr = self._cr
cr.execute(query1)
fetched_data = cr.dictfetchall()
for account in self.env['account.account'].search([]):
child_lines = self._get_journal_lines(account, data)
if child_lines:
journal_res.append(child_lines)
else:
state = """AND am.state = 'posted' """ if data[
'target_move'] == 'posted' else ''
sql = """SELECT DISTINCT aa.name,aa.code, sum(
aml.debit) AS total_debit,
sum(aml.credit) AS total_credit FROM (
SELECT am.* FROM account_move as am
LEFT JOIN account_move_line aml ON aml.move_id = am.id
LEFT JOIN account_account aa ON aa.id = aml.account_id
WHERE am.date BETWEEN '""" + str(
data['date_from']) + """' and '""" + str(
data['date_to']) + """' """ + state + """) am
LEFT JOIN account_move_line aml ON aml.move_id = am.id
LEFT JOIN account_account aa ON aa.id = aml.account_id
GROUP BY aa.name, aa.code"""
cr = self._cr
cr.execute(sql)
fetched = cr.dictfetchall()
for account in self.env['account.account'].search([]):
child_lines = self._get_lines(account, data)
if child_lines:
account_res.append(child_lines)
logged_users = self.env['res.company']._company_default_get(
'account.account')
sheet = workbook.add_worksheet()
bold = workbook.add_format({'align': 'center',
'bold': True,
'font_size': '10px',
'border': 1})
date = workbook.add_format({'font_size': '10px'})
cell_format = workbook.add_format({'bold': True,
'font_size': '10px'})
head = workbook.add_format({'align': 'center',
'bold': True,
'bg_color': '#D3D3D3',
'font_size': '15px'})
txt = workbook.add_format({'align': 'left',
'font_size': '10px'})
txt_left = workbook.add_format({'align': 'left',
'font_size': '10px',
'border': 1})
txt_center = workbook.add_format({'align': 'center',
'font_size': '10px',
'border': 1})
amount = workbook.add_format({'align': 'right',
'font_size': '10px',
'border': 1})
amount_bold = workbook.add_format({'align': 'right',
'bold': True,
'font_size': '10px',
'border': 1})
txt_bold = workbook.add_format({'align': 'left',
'bold': True,
'font_size': '10px',
'border': 1})
sheet.set_column('C:C', 30, cell_format)
sheet.set_column('D:E', 20, cell_format)
sheet.set_column('F:F', 20, cell_format)
sheet.write('C2', "Report Date", txt)
sheet.write('D2', str(data['today']), txt)
sheet.write('F2', logged_users.name, txt)
sheet.merge_range('C3: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):
state = """AND am.state = 'posted' """ if data[
'target_move'] == 'posted' else ''
query = """SELECT aml.account_id,aj.name, am.name as move_name, sum(
aml.debit) AS total_debit,
sum(aml.credit) AS total_credit FROM (
SELECT am.* FROM account_move as am
LEFT JOIN account_move_line aml ON aml.move_id = am.id
LEFT JOIN account_account aa ON aa.id = aml.account_id
WHERE am.date BETWEEN '""" + str(
data['date_from']) + """' and '""" + str(
data['date_to']) + """' """ + state + """) am
LEFT JOIN account_move_line aml ON aml.move_id = am.id
LEFT JOIN account_account aa ON aa.id = aml.account_id
LEFT JOIN account_journal aj ON aj.id = am.journal_id
WHERE aa.id = """ + str(account.id) + """
GROUP BY am.name, aml.account_id, aj.name"""
cr = self._cr
cr.execute(query)
fetched_data = cr.dictfetchall()
sql2 = """SELECT aa.name as account_name, aj.id, aj.name, sum(
aml.debit) AS total_debit,
sum(aml.credit) AS total_credit FROM (
SELECT am.* FROM account_move as am
LEFT JOIN account_move_line aml ON aml.move_id = am.id
LEFT JOIN account_account aa ON aa.id = aml.account_id
WHERE am.date BETWEEN '""" + str(
data['date_from']) + """' and '""" + str(
data['date_to']) + """' """ + state + """) am
LEFT JOIN account_move_line aml ON aml.move_id = am.id
LEFT JOIN account_account aa ON aa.id = aml.account_id
LEFT JOIN account_journal aj ON aj.id = am.journal_id
WHERE aa.id = """ + str(account.id) + """
GROUP BY aa.name, aj.name, aj.id"""
cr = self._cr
cr.execute(sql2)
fetch_data = cr.dictfetchall()
if fetched_data:
return {
'account': account.name,
'code': account.code,
'move_lines': fetched_data,
'journal_lines': fetch_data,
}
def _get_journal_lines(self, account, data):
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
WHERE am.date BETWEEN '""" + str(
data['date_from']) + """' and '""" + str(
data['date_to']) + """' """ + state + """) am
LEFT JOIN account_move_line aml ON aml.move_id = am.id
LEFT JOIN account_account aa ON aa.id = aml.account_id
LEFT JOIN account_journal aj ON aj.id = am.journal_id
WHERE aa.id = """ + str(account.id) + """
GROUP BY aa.name, aj.name, aj.id"""
cr = self._cr
cr.execute(sql2)
fetched_data = cr.dictfetchall()
if fetched_data:
return {
'account': account.name,
'journal_lines': fetched_data,
}

201
advance_cash_flow_statements/wizard/report_account_wizard.py

@ -0,0 +1,201 @@
# -*- 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 = []
active_model = self.env.context.get('active_model')
docs = self.env[self.env.context.get('active_model')].browse(
self.env.context.get('active_id'))
if data['levels'] == 'summary':
state = """ WHERE am.state = 'posted' """ if data[
'target_move'] == 'posted' else ''
query3 = """SELECT to_char(am.date, 'Month') as month_part, extract(
YEAR from am.date) as year_part,sum(aml.debit) AS total_debit, sum(
aml.credit) AS total_credit,sum(aml.balance) AS total_balance FROM(
SELECT am.date, am.id, am.state FROM account_move as am
LEFT JOIN account_move_line aml ON aml.move_id = am.id
LEFT JOIN account_account aa ON aa.id = aml.account_id
WHERE am.date BETWEEN '""" + str(
data['date_from']) + """' and '""" + str(
data['date_to']) + """' ) am
LEFT JOIN account_move_line aml ON aml.move_id = am.id
LEFT JOIN account_account aa ON aa.id = aml.account_id
""" + state + """GROUP BY month_part,year_part"""
cr = self._cr
cr.execute(query3)
fetched_data = cr.dictfetchall()
elif data['levels'] == 'consolidated':
state = """ WHERE am.state = 'posted' """ if data[
'target_move'] == 'posted' else ''
query2 = """SELECT aa.name, sum(aml.debit) AS total_debit, sum(
aml.credit) AS total_credit,sum(aml.balance) AS total_balance FROM(
SELECT am.id, am.state FROM account_move as am
LEFT JOIN account_move_line aml ON aml.move_id = am.id
LEFT JOIN account_account aa ON aa.id = aml.account_id
WHERE am.date BETWEEN '""" + str(
data['date_from']) + """' and '""" + str(
data['date_to']) + """' ) am
LEFT JOIN account_move_line aml ON aml.move_id = am.id
LEFT JOIN account_account aa ON aa.id = aml.account_id
""" + state + """GROUP BY aa.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
WHERE am.date BETWEEN '""" + str(
data['date_from']) + """' and '""" + str(
data['date_to']) + """' ) am
LEFT JOIN account_move_line aml ON aml.move_id = am.id
LEFT JOIN account_account aa ON aa.id = aml.account_id
""" + state + """GROUP BY aa.name, aa.code"""
cr = self._cr
cr.execute(query1)
fetched_data = cr.dictfetchall()
for account in self.env['account.account'].search([]):
child_lines = self._get_journal_lines(account, data)
if child_lines:
journal_res.append(child_lines)
else:
state = """AND am.state = 'posted' """ if data[
'target_move'] == 'posted' else ''
sql = """SELECT DISTINCT aa.name,aa.code, sum(
aml.debit) AS total_debit,
sum(aml.credit) AS total_credit FROM (
SELECT am.* FROM account_move as am
LEFT JOIN account_move_line aml ON aml.move_id = am.id
LEFT JOIN account_account aa ON aa.id = aml.account_id
WHERE am.date BETWEEN '""" + str(
data['date_from']) + """' and '""" + str(
data['date_to']) + """' """ + state + """) am
LEFT JOIN account_move_line aml ON aml.move_id = am.id
LEFT JOIN account_account aa ON aa.id = aml.account_id
GROUP BY aa.name, aa.code"""
cr = self._cr
cr.execute(sql)
fetched = cr.dictfetchall()
for account in self.env['account.account'].search([]):
child_lines = self._get_lines(account, data)
if child_lines:
account_res.append(child_lines)
return {
'date_from': data['date_from'],
'date_to': data['date_to'],
'levels': data['levels'],
'doc_ids': self.ids,
'doc_model': active_model,
'docs': docs,
'fetched_data': fetched_data,
'account_res': account_res,
'journal_res': journal_res,
'fetched': fetched,
}
def _get_lines(self, account, data):
state = """AND am.state = 'posted' """ if data[
'target_move'] == 'posted' else ''
query = """SELECT aml.account_id,aj.name, am.name as move_name, sum(
aml.debit) AS total_debit,
sum(aml.credit) AS total_credit FROM (
SELECT am.* FROM account_move as am
LEFT JOIN account_move_line aml ON aml.move_id = am.id
LEFT JOIN account_account aa ON aa.id = aml.account_id
WHERE am.date BETWEEN '""" + str(
data['date_from']) + """' and '""" + str(
data['date_to']) + """' """ + state + """) am
LEFT JOIN account_move_line aml ON aml.move_id = am.id
LEFT JOIN account_account aa ON aa.id = aml.account_id
LEFT JOIN account_journal aj ON aj.id = am.journal_id
WHERE aa.id = """ + str(account.id) + """
GROUP BY am.name, aml.account_id, aj.name"""
cr = self._cr
cr.execute(query)
fetched_data = cr.dictfetchall()
sql2 = """SELECT aa.name as account_name, aj.id, aj.name, sum(
aml.debit) AS total_debit,
sum(aml.credit) AS total_credit FROM (
SELECT am.* FROM account_move as am
LEFT JOIN account_move_line aml ON aml.move_id = am.id
LEFT JOIN account_account aa ON aa.id = aml.account_id
WHERE am.date BETWEEN '""" + str(
data['date_from']) + """' and '""" + str(
data['date_to']) + """' """ + state + """) am
LEFT JOIN account_move_line aml ON aml.move_id = am.id
LEFT JOIN account_account aa ON aa.id = aml.account_id
LEFT JOIN account_journal aj ON aj.id = am.journal_id
WHERE aa.id = """ + str(account.id) + """
GROUP BY aa.name, aj.name, aj.id"""
cr = self._cr
cr.execute(sql2)
fetch_data = cr.dictfetchall()
if fetched_data:
return {
'account': account.name,
'code': account.code,
'move_lines': fetched_data,
'journal_lines': fetch_data,
}
def _get_journal_lines(self, account, data):
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
WHERE am.date BETWEEN '""" + str(
data['date_from']) + """' and '""" + str(
data['date_to']) + """' """ + state + """) am
LEFT JOIN account_move_line aml ON aml.move_id = am.id
LEFT JOIN account_account aa ON aa.id = aml.account_id
LEFT JOIN account_journal aj ON aj.id = am.journal_id
WHERE aa.id = """ + str(account.id) + """
GROUP BY aa.name, aj.name, aj.id"""
cr = self._cr
cr.execute(sql2)
fetched_data = cr.dictfetchall()
if fetched_data:
return {
'account': account.name,
'journal_lines': fetched_data,
}
Loading…
Cancel
Save