@ -0,0 +1,44 @@ |
|||
Dynamic Financial Reports |
|||
========================= |
|||
* Dynamic financial reports for Odoo 15 community editions |
|||
|
|||
Installation |
|||
============ |
|||
- www.odoo.com/documentation/15.0/setup/install.html |
|||
- Install our custom addon |
|||
|
|||
License |
|||
------- |
|||
General Public License, Version 3 (LGPL v3). |
|||
(https://www.odoo.com/documentation/user/13.0/legal/licenses/licenses.html) |
|||
|
|||
Company |
|||
------- |
|||
* 'Cybrosys Techno Solutions <https://cybrosys.com/>`__ |
|||
|
|||
Credits |
|||
------- |
|||
* Developer: |
|||
(v15) Jibin @ Cybrosys |
|||
(v15) Mehjabin @ Cybrosys |
|||
(v15) Mily @ Cybrosys |
|||
(v15) Aneesh @ Cybrosys |
|||
|
|||
Contacts |
|||
-------- |
|||
* Mail Contact : odoo@cybrosys.com |
|||
|
|||
Bug Tracker |
|||
----------- |
|||
Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. |
|||
|
|||
Maintainer |
|||
========== |
|||
This module is maintained by Cybrosys Technologies. |
|||
|
|||
For support and more information, please visit https://www.cybrosys.com |
|||
|
|||
Further information |
|||
=================== |
|||
HTML Description: `<static/description/index.html>`__ |
|||
|
@ -0,0 +1,26 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2021-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 |
|||
from . import report |
|||
|
@ -0,0 +1,81 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2021-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': 'Dynamic Financial Reports', |
|||
'version': '15.0.1.0.0', |
|||
'category': 'Accounting', |
|||
'live_test_url': 'https://www.youtube.com/watch?v=gVQi9q9Rs-E&t=5s', |
|||
'summary': """Dynamic Financial Reports with drill |
|||
down and filters– Community Edition""", |
|||
'description': "Dynamic Financial Reports, DynamicFinancialReports, FinancialReport, Accountingreports, odoo reports, odoo" |
|||
"This module creates dynamic Accounting General Ledger, Trial Balance, Balance Sheet " |
|||
"Proft and Loss, Cash Flow Statements, Partner Ledger," |
|||
"Partner Ageing, Day book" |
|||
"Bank book and Cash book reports in Odoo 14 community edition.", |
|||
'author': 'Cybrosys Techno Solutions', |
|||
'website': "https://www.cybrosys.com", |
|||
'company': 'Cybrosys Techno Solutions', |
|||
'maintainer': 'Cybrosys Techno Solutions', |
|||
'depends': ['base', 'base_accounting_kit'], |
|||
'data': [ |
|||
'security/ir.model.access.csv', |
|||
'views/templates.xml', |
|||
'views/views.xml', |
|||
'views/kit_menus.xml', |
|||
'report/trial_balance.xml', |
|||
'report/general_ledger.xml', |
|||
'report/cash_flow_report.xml', |
|||
'report/financial_report_template.xml', |
|||
'report/partner_ledger.xml', |
|||
'report/ageing.xml', |
|||
'report/daybook.xml', |
|||
], |
|||
|
|||
'assets': { |
|||
'web.assets_backend': [ |
|||
'dynamic_accounts_report/static/src/css/report.css', |
|||
'dynamic_accounts_report/static/src/js/action_manager.js', |
|||
'dynamic_accounts_report/static/src/js/general_ledger.js', |
|||
'dynamic_accounts_report/static/src/js/trial_balance.js', |
|||
'dynamic_accounts_report/static/src/js/cash_flow.js', |
|||
'dynamic_accounts_report/static/src/js/financial_reports.js', |
|||
'dynamic_accounts_report/static/src/js/partner_ledger.js', |
|||
'dynamic_accounts_report/static/src/js/ageing.js', |
|||
'dynamic_accounts_report/static/src/js/daybook.js', |
|||
], |
|||
'web.assets_qweb': [ |
|||
'dynamic_accounts_report/static/src/xml/general_ledger_view.xml', |
|||
'dynamic_accounts_report/static/src/xml/trial_balance_view.xml', |
|||
'dynamic_accounts_report/static/src/xml/cash_flow_view.xml', |
|||
'dynamic_accounts_report/static/src/xml/financial_reports_view.xml', |
|||
'dynamic_accounts_report/static/src/xml/partner_ledger_view.xml', |
|||
'dynamic_accounts_report/static/src/xml/ageing.xml', |
|||
'dynamic_accounts_report/static/src/xml/daybook.xml', |
|||
], |
|||
}, |
|||
'license': 'LGPL-3', |
|||
'images': ['static/description/banner.png'], |
|||
'installable': True, |
|||
'auto_install': False, |
|||
'application': False, |
|||
} |
@ -0,0 +1,3 @@ |
|||
# -*- coding: utf-8 -*- |
|||
|
|||
from . import controllers |
@ -0,0 +1,37 @@ |
|||
# -*- coding: utf-8 -*- |
|||
|
|||
import json |
|||
from odoo import http |
|||
from odoo.http import content_disposition, request |
|||
from odoo.addons.web.controllers.main import _serialize_exception |
|||
from odoo.tools import html_escape |
|||
|
|||
|
|||
class TBXLSXReportController(http.Controller): |
|||
@http.route('/dynamic_xlsx_reports', type='http', auth='user', methods=['POST'], csrf=False) |
|||
def get_report_xlsx(self, model, options, output_format, report_data, report_name, dfr_data, **kw): |
|||
uid = request.session.uid |
|||
report_obj = request.env[model].with_user(uid) |
|||
dfr_data = dfr_data |
|||
options = 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_dynamic_xlsx_report(options, response, report_data, dfr_data) |
|||
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))) |
@ -0,0 +1,9 @@ |
|||
## Module <dynamic_accounts_report> |
|||
|
|||
#### 02.09.2021 |
|||
#### Version 15.0.1.0.0 |
|||
#### ADD |
|||
- Initial commit for Odoo 15 dynamic financial reports |
|||
|
|||
|
|||
|
@ -0,0 +1,7 @@ |
|||
from . import trial_balance |
|||
from . import general_ledger |
|||
from . import cash_flow_report |
|||
from . import financial_reports |
|||
from . import partner_ledger |
|||
from . import ageing |
|||
from . import daybook |
@ -0,0 +1,19 @@ |
|||
from odoo import api, models, _ |
|||
|
|||
|
|||
class PartnerAgeing(models.AbstractModel): |
|||
_name = 'report.dynamic_accounts_report.partner_ageing' |
|||
|
|||
@api.model |
|||
def _get_report_values(self, docids, data=None): |
|||
if self.env.context.get('ageing_pdf_report'): |
|||
|
|||
if data.get('report_data'): |
|||
data.update( |
|||
{'account_data': data.get('report_data')['report_lines'][0], |
|||
'Filters': data.get('report_data')['filters'], |
|||
'company': self.env.company, |
|||
|
|||
}) |
|||
|
|||
return data |
@ -0,0 +1,168 @@ |
|||
<odoo> |
|||
<template id="dynamic_accounts_report.partner_ageing"> |
|||
<t t-call="web.html_container"> |
|||
<t t-set="data_report_margin_top" t-value="12"/> |
|||
<t t-set="data_report_header_spacing" t-value="9"/> |
|||
<t t-set="data_report_dpi" t-value="110"/> |
|||
<t t-call="web.internal_layout"> |
|||
<div class="page"> |
|||
<div class="oe_structure"/> |
|||
<h3 style="text-align:centre;left:50%;"><span t-esc="Filters.get('company_name')"/>: Partner Ageing |
|||
</h3> |
|||
<strong> As On Date:</strong> |
|||
<t t-esc="Filters['date_from']"/> |
|||
<div> |
|||
<div style="text-align:centre;left:50%;" class="row"> |
|||
<div class="col-3"> |
|||
<strong>Target move:</strong> |
|||
<li> |
|||
<t t-esc="Filters['target_move']"/> |
|||
</li> |
|||
</div> |
|||
<div class="col-3"> |
|||
<strong>Account Type:</strong> |
|||
<li> |
|||
<t t-esc="Filters['result_selection']"/> |
|||
</li> |
|||
</div> |
|||
<div class="col-3" style=""> |
|||
<strong>Partners :</strong> |
|||
<t t-foreach="Filters['partners']" t-as="pa"> |
|||
<li> |
|||
<t t-esc="pa"/> |
|||
</li> |
|||
</t> |
|||
</div> |
|||
<div class="col-3" style=""> |
|||
<strong>Partner Tag :</strong> |
|||
<t t-foreach="Filters['partner_tags']" t-as="pt"> |
|||
<li> |
|||
<t t-esc="pt"/> |
|||
</li> |
|||
</t> |
|||
</div> |
|||
</div> |
|||
|
|||
|
|||
<br></br> |
|||
<table class="table table-sm table-reports"> |
|||
<thead> |
|||
<tr class="text-center"> |
|||
<th>Entry Label</th> |
|||
<th>Due date</th> |
|||
<th>JRNL</th> |
|||
<th>Account</th> |
|||
<th>Not Due</th> |
|||
<th>0 - 30</th> |
|||
<th>30 - 60</th> |
|||
<th>60 - 90</th> |
|||
<th>90 - 120</th> |
|||
<th>120 +</th> |
|||
<th> Total</th> |
|||
<th groups="base.group_multi_currency">Currency</th> |
|||
</tr> |
|||
</thead> |
|||
<tbody> |
|||
<t t-foreach="account_data" t-as="account"> |
|||
<tr style="font-weight: bold;"> |
|||
<td colspan="4"> |
|||
<span style="color: white;" t-esc="'..'"/> |
|||
<span t-esc="account['name']"/> |
|||
</td> |
|||
<td class="text-right"> |
|||
<span t-esc="account['direction']" t-options="{'widget': 'monetary', 'display_currency': env.company.currency_id}"/> |
|||
</td> |
|||
<td class="text-right"> |
|||
<span t-esc="account['4']" t-options="{'widget': 'monetary', 'display_currency': env.company.currency_id}"/> |
|||
</td> |
|||
<td class="text-right"> |
|||
<span t-esc="account['3']" t-options="{'widget': 'monetary', 'display_currency': env.company.currency_id}"/> |
|||
</td> |
|||
<td class="text-right"> |
|||
<span t-esc="account['2']" t-options="{'widget': 'monetary', 'display_currency': env.company.currency_id}"/> |
|||
</td> |
|||
<td class="text-right"> |
|||
<span t-esc="account['1']" t-options="{'widget': 'monetary', 'display_currency': env.company.currency_id}"/> |
|||
</td> |
|||
<td class="text-right"> |
|||
<span t-esc="account['0']" t-options="{'widget': 'monetary', 'display_currency': env.company.currency_id}"/> |
|||
</td> |
|||
<td class="text-right"> |
|||
<span t-esc="account['total']" t-options="{'widget': 'monetary', 'display_currency': env.company.currency_id}"/> |
|||
</td> |
|||
|
|||
<td groups="base.group_multi_currency"/> |
|||
</tr> |
|||
<tr t-foreach="account['child_lines']" t-as="line"> |
|||
<td><span t-esc="line['move']"/></td> |
|||
<td><span t-esc="line['date']"/></td> |
|||
<td><span t-esc="line['jrnl']"/></td> |
|||
<td><span t-esc="line['acc_code']"/></td> |
|||
<td class="text-right"> |
|||
<span t-if="line.get('period6')" |
|||
t-esc="line['amount']" |
|||
t-options="{'widget': 'monetary', 'display_currency': env.company.currency_id}"/> |
|||
<span t-else=""> |
|||
<span>-</span> |
|||
</span> |
|||
</td> |
|||
<td class="text-right"> |
|||
<span t-if="line.get('period5')" |
|||
t-esc="line['amount']" |
|||
t-options="{'widget': 'monetary', 'display_currency': env.company.currency_id}"/> |
|||
<span t-else=""> |
|||
<span>-</span> |
|||
</span> |
|||
</td> |
|||
<td class="text-right"> |
|||
<span t-if="line.get('period4')" |
|||
t-esc="line['amount']" |
|||
t-options="{'widget': 'monetary', 'display_currency': env.company.currency_id}"/> |
|||
<span t-else=""> |
|||
<span>-</span> |
|||
</span> |
|||
</td> |
|||
<td class="text-right"> |
|||
<span t-if="line.get('period3')" |
|||
t-esc="line['amount']" |
|||
t-options="{'widget': 'monetary', 'display_currency': env.company.currency_id}"/> |
|||
<span t-else=""> |
|||
<span>-</span> |
|||
</span> |
|||
</td> |
|||
<td class="text-right"> |
|||
<span t-if="line.get('period2')" |
|||
t-esc="line['amount']" |
|||
t-options="{'widget': 'monetary', 'display_currency': env.company.currency_id}"/> |
|||
<span t-else=""> |
|||
<span>-</span> |
|||
</span> |
|||
</td> |
|||
<td class="text-right"> |
|||
<span t-if="line.get('period1')" |
|||
t-esc="line['amount']" |
|||
t-options="{'widget': 'monetary', 'display_currency': env.company.currency_id}"/> |
|||
<span t-else=""> |
|||
<span>-</span> |
|||
</span> |
|||
</td> |
|||
</tr> |
|||
</t> |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
<br></br> |
|||
</div> |
|||
</t> |
|||
</t> |
|||
</template> |
|||
|
|||
<record id="action_print_ageing_partner" model="ir.actions.report"> |
|||
<field name="name">Partner Ageing</field> |
|||
<field name="model">account.partner.ageing</field> |
|||
<field name="report_type">qweb-pdf</field> |
|||
<field name="report_name">dynamic_accounts_report.partner_ageing</field> |
|||
<field name="report_file">dynamic_accounts_report.partner_ageing</field> |
|||
</record> |
|||
|
|||
</odoo> |
@ -0,0 +1,16 @@ |
|||
from odoo import api, models, _ |
|||
|
|||
|
|||
class GeneralLedger(models.AbstractModel): |
|||
_name = 'report.dynamic_accounts_report.cash_flow' |
|||
|
|||
@api.model |
|||
def _get_report_values(self, docids, data=None): |
|||
|
|||
if self.env.context.get('trial_pdf_report'): |
|||
if data.get('report_data'): |
|||
data.update({'account_data': data.get('report_data')['report_lines'], |
|||
'Filters': data.get('report_data')['filters'], |
|||
'company': self.env.company, |
|||
}) |
|||
return data |
@ -0,0 +1,263 @@ |
|||
<odoo> |
|||
|
|||
|
|||
|
|||
<template id="dynamic_accounts_report.cash_flow"> |
|||
<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="context_timestamp(datetime.datetime.now()).strftime('%Y-%m-%d %H:%M')"/> |
|||
<span t-esc='today'/> |
|||
<br/> |
|||
<span t-esc='logged_users'/> |
|||
</div> |
|||
|
|||
<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-3"> |
|||
<strong>Target move:</strong> |
|||
<li> |
|||
<t t-esc="Filters['target_move']"/> |
|||
</li> |
|||
</div> |
|||
|
|||
<div class="col-3"> |
|||
<t t-if="Filters.get('levels')"> |
|||
<strong>Level :</strong> |
|||
<li> |
|||
<t t-esc="Filters['levels']"/> |
|||
</li> |
|||
</t> |
|||
|
|||
</div> |
|||
|
|||
<div class="col-4"> |
|||
|
|||
<p> |
|||
<t t-if="Filters.get('date_from')"> |
|||
<strong>Date from :</strong> |
|||
<span t-esc="Filters.get('date_from')"/> |
|||
</t> |
|||
<br/> |
|||
<t t-if="Filters.get('date_to')"> |
|||
<strong>Date to :</strong> |
|||
<span t-esc="Filters.get('date_to')"/> |
|||
</t> |
|||
</p> |
|||
|
|||
</div> |
|||
|
|||
</div> |
|||
<div> |
|||
|
|||
<br></br> |
|||
<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="account_data['fetched_data']" t-as="fetch"> |
|||
<tr t-if="Filters['levels' ] == 'summary'"> |
|||
<td> |
|||
<span t-esc="fetch['month_part']"/> |
|||
|
|||
</td> |
|||
<td class="text-right"> |
|||
<span t-esc="fetch['total_debit']" |
|||
t-options="{'widget': 'monetary', |
|||
'display_currency': res_company.currency_id}"/> |
|||
</td> |
|||
<td class="text-right"> |
|||
<span t-esc="fetch['total_credit']" |
|||
t-options="{'widget': 'monetary', |
|||
'display_currency': res_company.currency_id}"/> |
|||
</td> |
|||
<td class="text-right"> |
|||
<span t-esc="fetch['total_balance']" |
|||
t-options="{'widget': 'monetary', |
|||
'display_currency': res_company.currency_id}"/> |
|||
</td> |
|||
</tr> |
|||
|
|||
<tr style="font-size:13px" t-if="Filters['levels' ] == 'consolidated'"> |
|||
<td> |
|||
<span t-esc="fetch['name']"/> |
|||
</td> |
|||
<td class="text-right"> |
|||
<span t-esc="fetch['total_debit']" |
|||
t-options="{'widget': 'monetary', |
|||
'display_currency': res_company.currency_id}"/> |
|||
</td> |
|||
<td class="text-right"> |
|||
<span t-esc="fetch['total_credit']" |
|||
t-options="{'widget': 'monetary', |
|||
'display_currency': res_company.currency_id}"/> |
|||
</td> |
|||
<td class="text-right"> |
|||
<span t-esc="fetch['total_balance']" |
|||
t-options="{'widget': 'monetary', |
|||
'display_currency': res_company.currency_id}"/> |
|||
</td> |
|||
</tr> |
|||
</tbody> |
|||
|
|||
<tbody style="font-size:12px" t-if="Filters['levels' ] == 'detailed' " t-foreach="account_data['journal_res']" t-as="res"> |
|||
<tr t-if="fet['name'] == res['account']" t-foreach="account_data['fetched_data']" t-as="fet"> |
|||
<td> |
|||
<strong> |
|||
<span t-esc="fet['code']"/> |
|||
<span t-esc="fet['name']"/> |
|||
</strong> |
|||
</td> |
|||
<td class="text-right"> |
|||
<strong> |
|||
<span t-esc="fet['total_debit']" |
|||
t-options="{'widget': 'monetary', |
|||
'display_currency': res_company.currency_id}"/> |
|||
</strong> |
|||
</td> |
|||
<td class="text-right"> |
|||
<strong> |
|||
<span t-esc="fet['total_credit']" |
|||
t-options="{'widget': 'monetary', |
|||
'display_currency': res_company.currency_id}"/> |
|||
</strong> |
|||
</td> |
|||
<td class="text-right"> |
|||
<strong> |
|||
<span t-esc="fet['total_debit'] - fet['total_credit']" |
|||
t-options="{'widget': 'monetary', |
|||
'display_currency': res_company.currency_id}"/> |
|||
</strong> |
|||
</td> |
|||
<tr t-foreach="res['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="Filters['levels' ] == 'very' or Filters['levels' ] ==false " t-foreach="account_data['account_res']" t-as="res"> |
|||
<tr t-if="fet['name'] == res['account']" t-foreach="account_data['fetched_data']" t-as="fet"> |
|||
<td> |
|||
<strong> |
|||
<span t-esc="fet['code']"/> |
|||
<span t-esc="fet['name']"/> |
|||
</strong> |
|||
</td> |
|||
<td class="text-right"> |
|||
<strong> |
|||
<span t-esc="fet['total_debit']" |
|||
t-options="{'widget': 'monetary', |
|||
'display_currency': res_company.currency_id}"/> |
|||
</strong> |
|||
</td> |
|||
<td class="text-right"> |
|||
<strong> |
|||
<span t-esc="fet['total_credit']" |
|||
t-options="{'widget': 'monetary', |
|||
'display_currency': res_company.currency_id}"/> |
|||
</strong> |
|||
</td> |
|||
<td class="text-right"> |
|||
<strong> |
|||
<span t-esc="fet['total_debit'] - fet['total_credit']" |
|||
t-options="{'widget': 'monetary', |
|||
'display_currency': res_company.currency_id}"/> |
|||
</strong> |
|||
</td> |
|||
|
|||
|
|||
<tr t-if="line['account_name'] == res['account']" |
|||
t-foreach="res['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['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> |
|||
<br></br> |
|||
</div> |
|||
</t> |
|||
</t> |
|||
</template> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<record id="action_print_cash_flow" model="ir.actions.report"> |
|||
<field name="name">cash_flow</field> |
|||
<field name="model">account.cash.flow</field> |
|||
<field name="report_type">qweb-pdf</field> |
|||
<field name="report_name">dynamic_accounts_report.cash_flow</field> |
|||
<field name="report_file">dynamic_accounts_report.cash_flow</field> |
|||
</record> |
|||
</odoo> |
@ -0,0 +1,17 @@ |
|||
from odoo import api, models, _ |
|||
|
|||
|
|||
class DayBook(models.AbstractModel): |
|||
_name = 'report.dynamic_accounts_report.day_book' |
|||
|
|||
@api.model |
|||
def _get_report_values(self, docids, data=None): |
|||
|
|||
if self.env.context.get('daybook_pdf_report'): |
|||
|
|||
if data.get('report_data'): |
|||
data.update({'account_data': data.get('report_data')['report_lines'], |
|||
'Filters': data.get('report_data')['filters'], |
|||
'company': self.env.company, |
|||
}) |
|||
return data |
@ -0,0 +1,121 @@ |
|||
<odoo> |
|||
<template id="dynamic_accounts_report.day_book"> |
|||
<t t-call="web.html_container"> |
|||
<t t-set="data_report_margin_top" t-value="12"/> |
|||
<t t-set="data_report_header_spacing" t-value="9"/> |
|||
<t t-set="data_report_dpi" t-value="110"/> |
|||
<t t-call="web.internal_layout"> |
|||
<div class="page"> |
|||
<div class="oe_structure"/> |
|||
<h3 style="text-align:centre;left:50%;"><span t-esc="Filters.get('company_name')"/>: Day Book |
|||
</h3> |
|||
|
|||
<span t-if="Filters.get('date_from')"> |
|||
<strong> From:</strong> |
|||
<t t-esc="Filters['date_from']"/> |
|||
</span> |
|||
<br></br> |
|||
<span t-if="Filters.get('date_to')"> |
|||
<strong> To:</strong> |
|||
<t t-esc="Filters['date_to']"/> |
|||
</span> |
|||
<div> |
|||
<div style="text-align:centre;left:50%;" class="row"> |
|||
<div class="col-3"> |
|||
<strong>Target move:</strong> |
|||
<li> |
|||
<t t-esc="Filters['target_move']"/> |
|||
</li> |
|||
</div> |
|||
<div class="col-3" style=""> |
|||
<strong>Journals:</strong> |
|||
<t t-foreach="Filters['journals']" t-as="ps"> |
|||
<li> |
|||
<t t-esc="ps"/> |
|||
</li> |
|||
</t> |
|||
</div> |
|||
<div class="col-3" style=""> |
|||
<strong>Accounts :</strong> |
|||
<t t-foreach="Filters['accounts']" t-as="ac"> |
|||
<li> |
|||
<t t-esc="ac"/> |
|||
</li> |
|||
</t> |
|||
|
|||
</div> |
|||
|
|||
</div> |
|||
|
|||
|
|||
<br></br> |
|||
<table class="table table-sm table-reports"> |
|||
<thead> |
|||
<tr class="text-center"> |
|||
<th>Date</th> |
|||
<th>JRNL</th> |
|||
<th>Partner</th> |
|||
<th>Move</th> |
|||
<th>Entry Label</th> |
|||
<th>Debit</th> |
|||
<th>Credit</th> |
|||
<th>Balance</th> |
|||
<th groups="base.group_multi_currency">Currency</th> |
|||
</tr> |
|||
</thead> |
|||
<tbody> |
|||
<t t-foreach="account_data" t-as="account"> |
|||
<tr style="font-weight: bold;"> |
|||
<td colspan="5"> |
|||
<span style="color: white;" t-esc="'..'"/> |
|||
<span t-esc="account['date']"/> |
|||
</td> |
|||
<td class="text-right"> |
|||
<span t-esc="account['debit']" t-options="{'widget': 'monetary', 'display_currency': env.company.currency_id}"/> |
|||
</td> |
|||
<td class="text-right"> |
|||
<span t-esc="account['credit']" t-options="{'widget': 'monetary', 'display_currency': env.company.currency_id}"/> |
|||
</td> |
|||
<td class="text-right"> |
|||
<span t-esc="account['balance']" t-options="{'widget': 'monetary', 'display_currency': env.company.currency_id}"/> |
|||
</td> |
|||
|
|||
|
|||
<td groups="base.group_multi_currency"/> |
|||
</tr> |
|||
<tr t-foreach="account['child_lines']" t-as="line"> |
|||
<td><span t-esc="line['ldate']"/></td> |
|||
<td><span t-esc="line['lcode']"/></td> |
|||
<td><span t-esc="line['partner_name']"/></td> |
|||
|
|||
<td><span t-esc="line['move_name']"/></td> |
|||
<td><span t-esc="line['lname']"/></td> |
|||
<td class="text-right"> |
|||
<span t-esc="line['debit']" t-options="{'widget': 'monetary', 'display_currency': env.company.currency_id}"/> |
|||
</td> |
|||
<td class="text-right"> |
|||
<span t-esc="line['credit']" t-options="{'widget': 'monetary', 'display_currency': env.company.currency_id}"/> |
|||
</td> |
|||
<td class="text-right"> |
|||
<span t-esc="line['balance']" t-options="{'widget': 'monetary', 'display_currency': env.company.currency_id}"/> |
|||
</td> |
|||
</tr> |
|||
</t> |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
<br></br> |
|||
</div> |
|||
</t> |
|||
</t> |
|||
</template> |
|||
|
|||
<record id="action_print_day_book" model="ir.actions.report"> |
|||
<field name="name">Day Book</field> |
|||
<field name="model">account.day.book</field> |
|||
<field name="report_type">qweb-pdf</field> |
|||
<field name="report_name">dynamic_accounts_report.day_book</field> |
|||
<field name="report_file">dynamic_accounts_report.day_book</field> |
|||
</record> |
|||
|
|||
</odoo> |
@ -0,0 +1,165 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<odoo> |
|||
<template id="dynamic_accounts_report.balance_sheet"> |
|||
<t t-call="web.html_container"> |
|||
<t t-call="web.internal_layout"> |
|||
<t t-set="data_report_margin_top" t-value="12"/> |
|||
<t t-set="data_report_header_spacing" t-value="9"/> |
|||
<t t-set="data_report_dpi" t-value="110"/> |
|||
<div class="page"> |
|||
<h3><span t-esc="Filters.get('company_name')"/>: <span t-esc="report_name"/> |
|||
</h3> |
|||
|
|||
<div> |
|||
<span t-if="Filters.get('date_from')"> |
|||
<strong> From:</strong> |
|||
<t t-esc="Filters['date_from']"/> |
|||
</span> |
|||
|
|||
<span t-if="Filters.get('date_to')"> |
|||
<strong>To:</strong> |
|||
<t t-esc="Filters['date_to']"/> |
|||
</span> |
|||
|
|||
<div style="width:100%;"> |
|||
<div style="text-align:centre;" class="row"> |
|||
|
|||
<div class="col-2"> |
|||
<strong>Journals:</strong> |
|||
<t t-foreach="Filters['journals']" t-as="ps"> |
|||
<li> |
|||
<t t-esc="ps"/> |
|||
</li> |
|||
</t> |
|||
</div> |
|||
|
|||
<div class="col-2"> |
|||
<strong>Accounts:</strong> |
|||
<t t-foreach="Filters['accounts']" t-as="ps"> |
|||
<li> |
|||
<t t-esc="ps"/> |
|||
</li> |
|||
</t> |
|||
</div> |
|||
|
|||
<div class="col-2"> |
|||
<strong>Account Tags:</strong> |
|||
<t t-foreach="Filters['account_tags']" t-as="ps"> |
|||
<li> |
|||
<t t-esc="ps"/> |
|||
</li> |
|||
</t> |
|||
</div> |
|||
<div class="col-2"> |
|||
<strong>Analytic:</strong> |
|||
<t t-foreach="Filters['analytics']" t-as="ps"> |
|||
<li> |
|||
<t t-esc="ps"/> |
|||
</li> |
|||
</t> |
|||
</div> |
|||
|
|||
<div class="col-2"> |
|||
<strong>Analytic Tag:</strong> |
|||
<t t-foreach="Filters['analytic_tags']" t-as="ps"> |
|||
<li> |
|||
<t t-esc="ps"/> |
|||
</li> |
|||
</t> |
|||
</div> |
|||
|
|||
<div class="col-3"> |
|||
<strong>Target move:</strong> |
|||
<li> |
|||
<t t-esc="Filters['target_move']"/> |
|||
</li> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<br></br> |
|||
|
|||
<table class="table table-sm table-reports"> |
|||
<thead> |
|||
<tr> |
|||
<th></th> |
|||
<th class="text-right">Debit</th> |
|||
<th class="text-right">Credit</th> |
|||
<th class="text-right">Balance</th> |
|||
</tr> |
|||
</thead> |
|||
<tbody> |
|||
<tr t-foreach="report_lines" t-as="a"> |
|||
|
|||
<t t-if="a['level'] != 0"> |
|||
<t t-if="a.get('level') > 2"> |
|||
<t t-set="style" t-value="'font-weight: normal;'"/> |
|||
</t> |
|||
<t t-if="not a.get('level') > 2"> |
|||
<t t-set="style" t-value="'font-weight: bold;'"/> |
|||
</t> |
|||
<t t-if="a.get('code')"> |
|||
<t t-foreach="account_data" t-as="line"> |
|||
<t t-if="line['code'] == a.get('code')"> |
|||
<tr> |
|||
<td> |
|||
<span style="color: white;" t-esc="'..' * a.get('level', 0) * 3"/> |
|||
<span t-att-style="style" t-esc="line['name']"/> |
|||
</td> |
|||
<td class="text-right"> |
|||
<span t-esc="line['debit']" |
|||
t-options="{'widget': 'monetary', 'display_currency': env.company.currency_id}"/> |
|||
</td> |
|||
<td class="text-right"> |
|||
<span t-esc="line['credit']" |
|||
t-options="{'widget': 'monetary', 'display_currency': env.company.currency_id}"/> |
|||
</td> |
|||
<td class="text-right"> |
|||
<span t-esc="line['balance']" |
|||
t-options="{'widget': 'monetary', 'display_currency': env.company.currency_id}"/> |
|||
</td> |
|||
</tr> |
|||
</t> |
|||
</t> |
|||
</t> |
|||
|
|||
<t t-else=""> |
|||
|
|||
<td> |
|||
<span style="color: white;" t-esc="'..' * a.get('level', 0) * 3"/> |
|||
<span t-att-style="style" t-esc="a.get('name')"/> |
|||
</td> |
|||
<td class="text-right" style="white-space: text-nowrap;"> |
|||
<span t-att-style="style" t-esc="a.get('debit')" |
|||
t-options="{'widget': 'monetary', 'display_currency': env.company.currency_id}"/> |
|||
</td> |
|||
<td class="text-right" style="white-space: text-nowrap;"> |
|||
<span t-att-style="style" t-esc="a.get('credit')" |
|||
t-options="{'widget': 'monetary', 'display_currency': env.company.currency_id}"/> |
|||
</td> |
|||
<td class="text-right" style="white-space: text-nowrap;"> |
|||
<span t-att-style="style" t-esc="a.get('balance')" |
|||
t-options="{'widget': 'monetary', 'display_currency': env.company.currency_id}"/> |
|||
</td> |
|||
</t> |
|||
|
|||
</t> |
|||
</tr> |
|||
</tbody> |
|||
</table> |
|||
|
|||
|
|||
</div> |
|||
</t> |
|||
</t> |
|||
</template> |
|||
|
|||
<record id="action_print_balance_sheet" model="ir.actions.report"> |
|||
<field name="name">Financial Report</field> |
|||
<field name="model">dynamic.balance.sheet.report</field> |
|||
<field name="report_type">qweb-pdf</field> |
|||
<field name="report_name">dynamic_accounts_report.balance_sheet</field> |
|||
<field name="report_file">dynamic_accounts_report.balance_sheet</field> |
|||
</record> |
|||
|
|||
</odoo> |
@ -0,0 +1,20 @@ |
|||
# -*- coding: utf-8 -*- |
|||
from odoo import api, models, _ |
|||
|
|||
|
|||
class InsReportBalanceSheet(models.AbstractModel): |
|||
_name = 'report.dynamic_accounts_report.balance_sheet' |
|||
|
|||
@api.model |
|||
def _get_report_values(self, docids, data=None): |
|||
if self.env.context.get('bs_report'): |
|||
if data.get('report_data'): |
|||
data.update({ |
|||
'Filters': data.get('report_data')['filters'], |
|||
'account_data': data.get('report_data')['report_lines'], |
|||
'report_lines': data.get('report_data')['bs_lines'], |
|||
'report_name': data.get('report_name'), |
|||
'title': data.get('report_data')['name'], |
|||
'company': self.env.company, |
|||
}) |
|||
return data |
@ -0,0 +1,20 @@ |
|||
from odoo import api, models, _ |
|||
|
|||
|
|||
class GeneralLedger(models.AbstractModel): |
|||
_name = 'report.dynamic_accounts_report.general_ledger' |
|||
|
|||
@api.model |
|||
def _get_report_values(self, docids, data=None): |
|||
|
|||
if self.env.context.get('trial_pdf_report'): |
|||
|
|||
if data.get('report_data'): |
|||
data.update({'account_data': data.get('report_data')['report_lines'], |
|||
'Filters': data.get('report_data')['filters'], |
|||
'debit_total': data.get('report_data')['debit_total'], |
|||
'credit_total': data.get('report_data')['credit_total'], |
|||
'title': data.get('report_data')['name'], |
|||
'company': self.env.company, |
|||
}) |
|||
return data |
@ -0,0 +1,153 @@ |
|||
<odoo> |
|||
|
|||
<template id="dynamic_accounts_report.general_ledger"> |
|||
<t t-call="web.html_container"> |
|||
<t t-set="data_report_margin_top" t-value="12"/> |
|||
<t t-set="data_report_header_spacing" t-value="9"/> |
|||
<t t-set="data_report_dpi" t-value="110"/> |
|||
<t t-call="web.internal_layout"> |
|||
<div class="page"> |
|||
<div class="oe_structure"/> |
|||
<h3 style="text-align:centre;left:50%;"><span t-esc="Filters.get('company_name')"/>: <t t-esc="title"/> |
|||
</h3> |
|||
|
|||
<span t-if="Filters.get('date_from')"> |
|||
<strong> From:</strong> |
|||
<t t-esc="Filters['date_from']"/> |
|||
</span> |
|||
|
|||
|
|||
|
|||
<span t-if="Filters.get('date_to')"> |
|||
<strong>To:</strong> |
|||
<t t-esc="Filters['date_to']"/> |
|||
</span> |
|||
|
|||
|
|||
<div> |
|||
<div style="width:100%;"> |
|||
<div style="text-align:centre;" class="row"> |
|||
|
|||
<div class="col-2"> |
|||
<strong>Journals:</strong> |
|||
<t t-foreach="Filters['journals']" t-as="ps"> |
|||
<li> |
|||
<t t-esc="ps"/> |
|||
</li> |
|||
</t> |
|||
</div> |
|||
|
|||
<div class="col-2"> |
|||
<strong>Accounts:</strong> |
|||
<t t-foreach="Filters['accounts']" t-as="ps"> |
|||
<li> |
|||
<t t-esc="ps"/> |
|||
</li> |
|||
</t> |
|||
</div> |
|||
|
|||
<div class="col-2"> |
|||
<strong>Analytic:</strong> |
|||
<t t-foreach="Filters['analytics']" t-as="ps"> |
|||
<li> |
|||
<t t-esc="ps"/> |
|||
</li> |
|||
</t> |
|||
</div> |
|||
|
|||
<div class="col-2"> |
|||
<strong>Analytic Tag:</strong> |
|||
<t t-foreach="Filters['analytic_tags']" t-as="ps"> |
|||
<li> |
|||
<t t-esc="ps"/> |
|||
</li> |
|||
</t> |
|||
</div> |
|||
|
|||
<div class="col-3"> |
|||
<strong>Target move:</strong> |
|||
<li> |
|||
<t t-esc="Filters['target_move']"/> |
|||
</li> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
|
|||
<br></br> |
|||
<table class="table table-sm table-reports"> |
|||
<thead> |
|||
<tr class="text-right"> |
|||
<th>Date</th> |
|||
<th>JRNL</th> |
|||
<th>Partner</th> |
|||
<th>Ref</th> |
|||
<th>Move</th> |
|||
<th>Entry Label</th> |
|||
<th>Debit</th> |
|||
<th>Credit</th> |
|||
<th>Balance</th> |
|||
<th groups="base.group_multi_currency">Currency</th> |
|||
</tr> |
|||
</thead> |
|||
<tbody> |
|||
<t t-foreach="account_data" t-as="account"> |
|||
<tr style="font-weight: bold;"> |
|||
<td colspan="6"> |
|||
<span style="color: white;" t-esc="'..'"/> |
|||
<span t-esc="account['code']"/> |
|||
<span t-esc="account['name']"/> |
|||
</td> |
|||
<td class="text-right"> |
|||
<span t-esc="account['debit']" t-options="{'widget': 'monetary', 'display_currency': env.company.currency_id}"/> |
|||
</td> |
|||
<td class="text-right"> |
|||
<span t-esc="account['credit']" t-options="{'widget': 'monetary', 'display_currency': env.company.currency_id}"/> |
|||
</td> |
|||
<td class="text-right"> |
|||
<span t-esc="account['balance']" t-options="{'widget': 'monetary', 'display_currency': env.company.currency_id}"/> |
|||
</td> |
|||
<td groups="base.group_multi_currency"/> |
|||
</tr> |
|||
<tr t-foreach="account['move_lines']" t-as="line"> |
|||
<td><span t-esc="line['ldate']"/></td> |
|||
<td><span t-esc="line['lcode']"/></td> |
|||
<td><span t-esc="line['partner_name']"/></td> |
|||
<td><span t-if="line['lref']" t-esc="line['lref']"/></td> |
|||
<td><span t-esc="line['move_name']"/></td> |
|||
<td><span t-esc="line['lname']"/></td> |
|||
<td class="text-right"> |
|||
<span t-esc="line['debit']" t-options="{'widget': 'monetary', 'display_currency': env.company.currency_id}"/> |
|||
</td> |
|||
<td class="text-right"> |
|||
<span t-esc="line['credit']" t-options="{'widget': 'monetary', 'display_currency': env.company.currency_id}"/> |
|||
</td> |
|||
<td class="text-right"> |
|||
<span t-esc="line['balance']" t-options="{'widget': 'monetary', 'display_currency': env.company.currency_id}"/> |
|||
</td> |
|||
<t t-if="line['amount_currency']"> |
|||
<td class="text-right" groups="base.group_multi_currency"> |
|||
<span t-esc="line['amount_currency'] if line['amount_currency'] > 0.00 else ''"/> |
|||
<span t-esc="line['currency_code'] if line['amount_currency'] > 0.00 else ''"/> |
|||
</td> |
|||
</t> |
|||
</tr> |
|||
</t> |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
<br></br> |
|||
</div> |
|||
</t> |
|||
</t> |
|||
</template> |
|||
|
|||
<record id="action_print_General_ledger" model="ir.actions.report"> |
|||
<field name="name">Report</field> |
|||
<field name="model">account.general.ledger</field> |
|||
<field name="report_type">qweb-pdf</field> |
|||
<field name="report_name">dynamic_accounts_report.general_ledger</field> |
|||
<field name="report_file">dynamic_accounts_report.general_ledger</field> |
|||
</record> |
|||
|
|||
</odoo> |
@ -0,0 +1,16 @@ |
|||
from odoo import api, models, _ |
|||
|
|||
|
|||
class PartnerLedgerReport(models.AbstractModel): |
|||
_name = 'report.dynamic_accounts_report.partner_ledger' |
|||
|
|||
@api.model |
|||
def _get_report_values(self, docids, data=None): |
|||
if self.env.context.get('partner_ledger_pdf_report'): |
|||
|
|||
if data.get('report_data'): |
|||
data.update({'account_data': data.get('report_data')['report_lines'], |
|||
'Filters': data.get('report_data')['filters'], |
|||
'company': self.env.company, |
|||
}) |
|||
return data |
@ -0,0 +1,155 @@ |
|||
<odoo> |
|||
|
|||
<template id="dynamic_accounts_report.partner_ledger"> |
|||
<t t-call="web.html_container"> |
|||
<t t-set="data_report_margin_top" t-value="12"/> |
|||
<t t-set="data_report_header_spacing" t-value="9"/> |
|||
<t t-set="data_report_dpi" t-value="110"/> |
|||
<t t-call="web.internal_layout"> |
|||
<div class="page"> |
|||
<div class="oe_structure"/> |
|||
<h3 style="text-align:centre;left:50%;"><span t-esc="Filters.get('company_name')"/>: Partner Ledger |
|||
</h3> |
|||
|
|||
<span t-if="Filters.get('date_from')"> |
|||
<strong> From:</strong> |
|||
<t t-esc="Filters['date_from']"/> |
|||
</span> |
|||
|
|||
<span t-if="Filters.get('date_to')"> |
|||
<strong>To:</strong> |
|||
<t t-esc="Filters['date_to']"/> |
|||
</span> |
|||
|
|||
|
|||
<div> |
|||
<div style="text-align:centre;left:50%;" class="row"> |
|||
|
|||
<div class="col-2" style=""> |
|||
<strong>Journals:</strong> |
|||
<t t-foreach="Filters['journals']" t-as="ps"> |
|||
<li> |
|||
<t t-esc="ps"/> |
|||
</li> |
|||
</t> |
|||
</div> |
|||
<div class="col-2"> |
|||
<strong>Accounts:</strong> |
|||
<t t-foreach="Filters['accounts']" t-as="ps"> |
|||
<li> |
|||
<t t-esc="ps"/> |
|||
</li> |
|||
</t> |
|||
</div> |
|||
<div class="col-2"> |
|||
<strong>Partners:</strong> |
|||
<t t-foreach="Filters['partners']" t-as="ps"> |
|||
<li> |
|||
<t t-esc="ps"/> |
|||
</li> |
|||
</t> |
|||
</div> |
|||
<div class="col-2"> |
|||
<strong>Partner Tags:</strong> |
|||
<t t-foreach="Filters['partner_tags']" t-as="ps"> |
|||
<li> |
|||
<t t-esc="ps"/> |
|||
</li> |
|||
</t> |
|||
</div> |
|||
<div class="col-2"> |
|||
<strong>Account Type:</strong> |
|||
<t t-foreach="Filters['account_type']" t-as="ps"> |
|||
<li> |
|||
<t t-esc="ps"/> |
|||
</li> |
|||
</t> |
|||
</div> |
|||
<div class="col-2"> |
|||
<strong>Target move:</strong> |
|||
<li> |
|||
<t t-esc="Filters['target_move']"/> |
|||
</li> |
|||
</div> |
|||
|
|||
</div> |
|||
<div style="text-align:centre;left:50%;" class="row"> |
|||
|
|||
</div> |
|||
|
|||
|
|||
<br></br> |
|||
<table class="table table-sm table-reports" style="padding:5px;"> |
|||
<thead> |
|||
<tr class="text-center"> |
|||
<th style="text-align:left;">Date</th> |
|||
<th style="text-align:left;">Journal</th> |
|||
<th style="text-align:left;">Account</th> |
|||
<th style="text-align:left;">Move</th> |
|||
<th style="text-align:left;">Entry Label</th> |
|||
<th style="text-align:right;">Debit</th> |
|||
<th style="text-align:right;">Credit</th> |
|||
<th style="text-align:right;">Balance</th> |
|||
</tr> |
|||
</thead> |
|||
<tbody> |
|||
<t t-foreach="account_data" t-as="account"> |
|||
<tr style="font-weight: bold;"> |
|||
<td colspan="5"> |
|||
<span style="color: white;" t-esc="'..'"/> |
|||
<!-- <span t-esc="account['code']"/>--> |
|||
<span t-esc="account['name']"/> |
|||
</td> |
|||
<td class="text-right"> |
|||
<span t-esc="account['debit']" t-options="{'widget': 'monetary', 'display_currency': env.company.currency_id}"/> |
|||
</td> |
|||
<td class="text-right"> |
|||
<span t-esc="account['credit']" t-options="{'widget': 'monetary', 'display_currency': env.company.currency_id}"/> |
|||
</td> |
|||
<td class="text-right"> |
|||
<span t-esc="account['balance']" t-options="{'widget': 'monetary', 'display_currency': env.company.currency_id}"/> |
|||
</td> |
|||
<td groups="base.group_multi_currency"/> |
|||
</tr> |
|||
<tr t-foreach="account['move_lines']" t-as="line"> |
|||
<td><span t-esc="line['ldate']"/></td> |
|||
<td><span t-esc="line['lcode']"/></td> |
|||
<td><span t-esc="line['account_name']"/></td> |
|||
<!-- <td><span t-if="line['lref']" t-esc="line['lref']"/></td>--> |
|||
<td><span t-esc="line['move_name']"/></td> |
|||
<td><span t-esc="line['lname']"/></td> |
|||
<td class="text-right"> |
|||
<span t-esc="line['debit']" t-options="{'widget': 'monetary', 'display_currency': env.company.currency_id}"/> |
|||
</td> |
|||
<td class="text-right"> |
|||
<span t-esc="line['credit']" t-options="{'widget': 'monetary', 'display_currency': env.company.currency_id}"/> |
|||
</td> |
|||
<td class="text-right"> |
|||
<span t-esc="line['balance']" t-options="{'widget': 'monetary', 'display_currency': env.company.currency_id}"/> |
|||
</td> |
|||
<t t-if="line['amount_currency']"> |
|||
<td class="text-right" groups="base.group_multi_currency"> |
|||
<span t-esc="line['amount_currency'] if line['amount_currency'] > 0.00 else ''"/> |
|||
<span t-esc="line['currency_code'] if line['amount_currency'] > 0.00 else ''"/> |
|||
</td> |
|||
</t> |
|||
</tr> |
|||
</t> |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
<br></br> |
|||
</div> |
|||
</t> |
|||
</t> |
|||
</template> |
|||
|
|||
<record id="action_print_partner_ledger" model="ir.actions.report"> |
|||
<field name="name">Partner ledger</field> |
|||
<field name="model">account.partner.ledger</field> |
|||
<field name="report_type">qweb-pdf</field> |
|||
<field name="report_name">dynamic_accounts_report.partner_ledger</field> |
|||
<field name="report_file">dynamic_accounts_report.partner_ledger</field> |
|||
</record> |
|||
|
|||
</odoo> |
@ -0,0 +1,18 @@ |
|||
from odoo import api, models, _ |
|||
|
|||
|
|||
class TrialBalance(models.AbstractModel): |
|||
_name = 'report.dynamic_accounts_report.trial_balance' |
|||
|
|||
@api.model |
|||
def _get_report_values(self, docids, data=None): |
|||
if self.env.context.get('trial_pdf_report'): |
|||
|
|||
if data.get('report_data'): |
|||
data.update({'account_data': data.get('report_data')['report_lines'], |
|||
'Filters': data.get('report_data')['filters'], |
|||
'debit_total': data.get('report_data')['debit_total'], |
|||
'credit_total': data.get('report_data')['credit_total'], |
|||
'company': self.env.company, |
|||
}) |
|||
return data |
@ -0,0 +1,129 @@ |
|||
<odoo> |
|||
|
|||
|
|||
|
|||
<template id="dynamic_accounts_report.trial_balance"> |
|||
<t t-call="web.html_container"> |
|||
<t t-call="web.internal_layout"> |
|||
<div class="page"> |
|||
<div class="oe_structure"/> |
|||
<h3 style="text-align:centre;left:50%;"><span t-esc="Filters.get('company_name')"/>: Trial Balance |
|||
</h3> |
|||
|
|||
<span t-if="Filters.get('date_from')"> |
|||
<strong> From:</strong> |
|||
<t t-esc="Filters['date_from']"/> |
|||
</span> |
|||
|
|||
|
|||
|
|||
<span t-if="Filters.get('date_to')"> |
|||
<strong>To:</strong> |
|||
<t t-esc="Filters['date_to']"/> |
|||
</span> |
|||
|
|||
|
|||
<div> |
|||
<div style="text-align:centre;left:50%;" class="row"> |
|||
|
|||
<div class="col-3" style=""> |
|||
<strong>Journals:</strong> |
|||
<t t-foreach="Filters['journals']" t-as="ps"> |
|||
<li> |
|||
<t t-esc="ps"/> |
|||
</li> |
|||
</t> |
|||
</div> |
|||
|
|||
<div class="col-3"> |
|||
<strong>Target move:</strong> |
|||
<li> |
|||
<t t-esc="Filters['target_move']"/> |
|||
</li> |
|||
</div> |
|||
</div> |
|||
|
|||
|
|||
<br></br> |
|||
<table class="table table-sm table-reports"> |
|||
<thead> |
|||
<tr> |
|||
<th style="text-align:left;">Code</th> |
|||
<th colspan="5">Account</th> |
|||
<t t-if="Filters.get('date_from')"> |
|||
<th class="mon_fld">Initial Debit</th> |
|||
<th class="mon_fld">Initial Credit</th> |
|||
|
|||
</t> |
|||
<th class="text-right">Debit</th> |
|||
<th class="text-right">Credit</th> |
|||
</tr> |
|||
</thead> |
|||
<t t-foreach="account_data" t-as="line"> |
|||
|
|||
<tr> |
|||
|
|||
<td style="text-align:left;"> |
|||
<span style="color: white;" t-esc="'..'"/> |
|||
<span t-esc="line['code']"/> |
|||
</td> |
|||
<td colspan="5"> |
|||
<span style="color: white;" t-esc="'..'"/> |
|||
<span t-esc="line['name']"/> |
|||
</td> |
|||
<t t-if="Filters.get('date_from')"> |
|||
<t t-if="line['Init_balance']"> |
|||
|
|||
<td class="mon_fld"> |
|||
<t t-out="line['Init_balance']['debit']" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/> |
|||
</td> |
|||
<td class="mon_fld"> |
|||
<t t-out="line['Init_balance']['credit']" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/> |
|||
</td> |
|||
</t> |
|||
<t t-else=""> |
|||
|
|||
<td class="mon_fld"> |
|||
</td> |
|||
<td class="mon_fld"> |
|||
</td> |
|||
</t> |
|||
|
|||
</t> |
|||
|
|||
<td class="text-right"> |
|||
<span t-esc="line['debit']" |
|||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/> |
|||
</td> |
|||
<td class="text-right"> |
|||
<span t-esc="line['credit']" |
|||
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/> |
|||
</td> |
|||
</tr> |
|||
</t> |
|||
<td colspan="6" style="border-bottom: 1px solid ;" class="mon_fld"><strong>Total</strong></td> |
|||
<t t-if="Filters.get('date_from')"> |
|||
<td class="mon_fld" style="border-bottom: 1px solid ;"><strong></strong></td> |
|||
<td class="mon_fld" style="border-bottom: 1px solid ;"><strong></strong></td> |
|||
</t> |
|||
|
|||
<td class="text-right" style="border-bottom: 1px solid ;"><strong><t t-esc="debit_total" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></strong></td> |
|||
<td class="text-right" style="border-bottom: 1px solid;"><strong><t t-esc="debit_total" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></strong></td> |
|||
|
|||
</table> |
|||
</div> |
|||
<br></br> |
|||
</div> |
|||
</t> |
|||
</t> |
|||
</template> |
|||
|
|||
<record id="action_print_trial_balance" model="ir.actions.report"> |
|||
<field name="name">Trial Balance</field> |
|||
<field name="model">account.trial.balance</field> |
|||
<field name="report_type">qweb-pdf</field> |
|||
<field name="report_name">dynamic_accounts_report.trial_balance</field> |
|||
<field name="report_file">dynamic_accounts_report.trial_balance</field> |
|||
</record> |
|||
|
|||
</odoo> |
|
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 310 B |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 576 B |
After Width: | Height: | Size: 733 B |
After Width: | Height: | Size: 911 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 673 B |
After Width: | Height: | Size: 878 B |
After Width: | Height: | Size: 653 B |
After Width: | Height: | Size: 905 B |
After Width: | Height: | Size: 839 B |
After Width: | Height: | Size: 427 B |
After Width: | Height: | Size: 627 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 988 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 51 KiB |
After Width: | Height: | Size: 61 KiB |
After Width: | Height: | Size: 60 KiB |
After Width: | Height: | Size: 59 KiB |
After Width: | Height: | Size: 52 KiB |
After Width: | Height: | Size: 54 KiB |
After Width: | Height: | Size: 116 KiB |
After Width: | Height: | Size: 59 KiB |
After Width: | Height: | Size: 59 KiB |
After Width: | Height: | Size: 119 KiB |
After Width: | Height: | Size: 163 KiB |
After Width: | Height: | Size: 122 KiB |
After Width: | Height: | Size: 97 KiB |
After Width: | Height: | Size: 63 KiB |
After Width: | Height: | Size: 112 KiB |
After Width: | Height: | Size: 149 KiB |
After Width: | Height: | Size: 79 KiB |
After Width: | Height: | Size: 88 KiB |
After Width: | Height: | Size: 36 KiB |
After Width: | Height: | Size: 52 KiB |
After Width: | Height: | Size: 72 KiB |
After Width: | Height: | Size: 113 KiB |
After Width: | Height: | Size: 110 KiB |
After Width: | Height: | Size: 142 KiB |
After Width: | Height: | Size: 129 KiB |
After Width: | Height: | Size: 114 KiB |
After Width: | Height: | Size: 74 KiB |
After Width: | Height: | Size: 120 KiB |
After Width: | Height: | Size: 77 KiB |
After Width: | Height: | Size: 97 KiB |
After Width: | Height: | Size: 96 KiB |
After Width: | Height: | Size: 101 KiB |
After Width: | Height: | Size: 166 KiB |
After Width: | Height: | Size: 115 KiB |
After Width: | Height: | Size: 170 KiB |
After Width: | Height: | Size: 154 KiB |
After Width: | Height: | Size: 98 KiB |
After Width: | Height: | Size: 43 KiB |
After Width: | Height: | Size: 67 KiB |
After Width: | Height: | Size: 212 KiB |
After Width: | Height: | Size: 123 KiB |
After Width: | Height: | Size: 70 KiB |
After Width: | Height: | Size: 152 KiB |
After Width: | Height: | Size: 116 KiB |
After Width: | Height: | Size: 289 KiB |
After Width: | Height: | Size: 75 KiB |
After Width: | Height: | Size: 299 KiB |
After Width: | Height: | Size: 62 KiB |
After Width: | Height: | Size: 63 KiB |
After Width: | Height: | Size: 122 KiB |
After Width: | Height: | Size: 149 KiB |
After Width: | Height: | Size: 105 KiB |
After Width: | Height: | Size: 114 KiB |
After Width: | Height: | Size: 88 KiB |
After Width: | Height: | Size: 43 KiB |
After Width: | Height: | Size: 69 KiB |
After Width: | Height: | Size: 263 KiB |
After Width: | Height: | Size: 60 KiB |