diff --git a/dynamic_accounts_report/README.rst b/dynamic_accounts_report/README.rst new file mode 100644 index 000000000..f590c382a --- /dev/null +++ b/dynamic_accounts_report/README.rst @@ -0,0 +1,44 @@ +Dynamic Financial Reports +========================= +* Dynamic financial reports for Odoo 13 community editions + +Installation +============ + - www.odoo.com/documentation/13.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 `__ + +Credits +------- +* Developer: +(v13) Jibin @ Cybrosys +(v13) Mehjabin @ Cybrosys +(v13) Mily @ Cybrosys +(v13) 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: ``__ + diff --git a/dynamic_accounts_report/__init__.py b/dynamic_accounts_report/__init__.py new file mode 100644 index 000000000..4145c724a --- /dev/null +++ b/dynamic_accounts_report/__init__.py @@ -0,0 +1,5 @@ +# -*- coding: utf-8 -*- + +from . import controllers +from . import wizard +from . import report diff --git a/dynamic_accounts_report/__manifest__.py b/dynamic_accounts_report/__manifest__.py new file mode 100644 index 000000000..b763a26ac --- /dev/null +++ b/dynamic_accounts_report/__manifest__.py @@ -0,0 +1,65 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2020-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# 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 . +# +############################################################################# + +{ + 'name': 'Dynamic Financial Reports', + 'version': '13.0.1.0.0', + 'category': 'Accounting', + 'summary': """Dynamic Financial Reports with drill + down and filters– Community Edition""", + 'description': "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', + ], + 'qweb': [ + 'static/src/xml/general_ledger_view.xml', + 'static/src/xml/trial_balance_view.xml', + 'static/src/xml/cash_flow_view.xml', + 'static/src/xml/financial_reports_view.xml', + 'static/src/xml/partner_ledger_view.xml', + 'static/src/xml/ageing.xml', + 'static/src/xml/daybook.xml', + ], + 'license': 'LGPL-3', + 'images': ['static/description/banner.jpg'], + 'installable': True, + 'auto_install': False, + 'application': True, +} diff --git a/dynamic_accounts_report/controllers/__init__.py b/dynamic_accounts_report/controllers/__init__.py new file mode 100644 index 000000000..457bae27e --- /dev/null +++ b/dynamic_accounts_report/controllers/__init__.py @@ -0,0 +1,3 @@ +# -*- coding: utf-8 -*- + +from . import controllers \ No newline at end of file diff --git a/dynamic_accounts_report/controllers/controllers.py b/dynamic_accounts_report/controllers/controllers.py new file mode 100644 index 000000000..d1d39a77a --- /dev/null +++ b/dynamic_accounts_report/controllers/controllers.py @@ -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, token, 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 + 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))) diff --git a/dynamic_accounts_report/doc/RELEASE_NOTES.md b/dynamic_accounts_report/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..4615baf55 --- /dev/null +++ b/dynamic_accounts_report/doc/RELEASE_NOTES.md @@ -0,0 +1,11 @@ +## Module + +#### 03.05.2021 +#### Version 13.0.1.0.0 +#### ADD +- Initial commit for Odoo 13 dynamic financial reports + + + + + diff --git a/dynamic_accounts_report/report/__init__.py b/dynamic_accounts_report/report/__init__.py new file mode 100644 index 000000000..5838e7a2f --- /dev/null +++ b/dynamic_accounts_report/report/__init__.py @@ -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 diff --git a/dynamic_accounts_report/report/ageing.py b/dynamic_accounts_report/report/ageing.py new file mode 100644 index 000000000..ca64433fb --- /dev/null +++ b/dynamic_accounts_report/report/ageing.py @@ -0,0 +1,18 @@ +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'], + + }) + + return data diff --git a/dynamic_accounts_report/report/ageing.xml b/dynamic_accounts_report/report/ageing.xml new file mode 100644 index 000000000..8949af8b2 --- /dev/null +++ b/dynamic_accounts_report/report/ageing.xml @@ -0,0 +1,168 @@ + + + + + Partner Ageing + account.partner.ageing + qweb-pdf + dynamic_accounts_report.partner_ageing + dynamic_accounts_report.partner_ageing + + + \ No newline at end of file diff --git a/dynamic_accounts_report/report/cash_flow_report.py b/dynamic_accounts_report/report/cash_flow_report.py new file mode 100644 index 000000000..5add945d0 --- /dev/null +++ b/dynamic_accounts_report/report/cash_flow_report.py @@ -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'], + }) + return data diff --git a/dynamic_accounts_report/report/cash_flow_report.xml b/dynamic_accounts_report/report/cash_flow_report.xml new file mode 100644 index 000000000..f1c7099e4 --- /dev/null +++ b/dynamic_accounts_report/report/cash_flow_report.xml @@ -0,0 +1,261 @@ + + + + + + + + + + + + + + cash_flow + account.cash.flow + qweb-pdf + dynamic_accounts_report.cash_flow + dynamic_accounts_report.cash_flow + + \ No newline at end of file diff --git a/dynamic_accounts_report/report/daybook.py b/dynamic_accounts_report/report/daybook.py new file mode 100644 index 000000000..f832a51b7 --- /dev/null +++ b/dynamic_accounts_report/report/daybook.py @@ -0,0 +1,16 @@ +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'], + }) + return data \ No newline at end of file diff --git a/dynamic_accounts_report/report/daybook.xml b/dynamic_accounts_report/report/daybook.xml new file mode 100644 index 000000000..979fd622f --- /dev/null +++ b/dynamic_accounts_report/report/daybook.xml @@ -0,0 +1,121 @@ + + + + + Day Book + account.day.book + qweb-pdf + dynamic_accounts_report.day_book + dynamic_accounts_report.day_book + + + \ No newline at end of file diff --git a/dynamic_accounts_report/report/financial_report_template.xml b/dynamic_accounts_report/report/financial_report_template.xml new file mode 100644 index 000000000..310e6ce0f --- /dev/null +++ b/dynamic_accounts_report/report/financial_report_template.xml @@ -0,0 +1,170 @@ + + + + + + Financial Report + dynamic.balance.sheet.report + qweb-pdf + dynamic_accounts_report.balance_sheet + dynamic_accounts_report.balance_sheet + + + diff --git a/dynamic_accounts_report/report/financial_reports.py b/dynamic_accounts_report/report/financial_reports.py new file mode 100644 index 000000000..5036579af --- /dev/null +++ b/dynamic_accounts_report/report/financial_reports.py @@ -0,0 +1,19 @@ +# -*- 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'], + }) + return data diff --git a/dynamic_accounts_report/report/general_ledger.py b/dynamic_accounts_report/report/general_ledger.py new file mode 100644 index 000000000..1b6098128 --- /dev/null +++ b/dynamic_accounts_report/report/general_ledger.py @@ -0,0 +1,19 @@ +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'], + }) + return data diff --git a/dynamic_accounts_report/report/general_ledger.xml b/dynamic_accounts_report/report/general_ledger.xml new file mode 100644 index 000000000..aab40a115 --- /dev/null +++ b/dynamic_accounts_report/report/general_ledger.xml @@ -0,0 +1,126 @@ + + + + + + + + Report + account.general.ledger + qweb-pdf + dynamic_accounts_report.general_ledger + dynamic_accounts_report.general_ledger + + + \ No newline at end of file diff --git a/dynamic_accounts_report/report/partner_ledger.py b/dynamic_accounts_report/report/partner_ledger.py new file mode 100644 index 000000000..de0ad62b6 --- /dev/null +++ b/dynamic_accounts_report/report/partner_ledger.py @@ -0,0 +1,15 @@ +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'], + }) + return data diff --git a/dynamic_accounts_report/report/partner_ledger.xml b/dynamic_accounts_report/report/partner_ledger.xml new file mode 100644 index 000000000..a81fd3adb --- /dev/null +++ b/dynamic_accounts_report/report/partner_ledger.xml @@ -0,0 +1,155 @@ + + + + + + Partner ledger + account.partner.ledger + qweb-pdf + dynamic_accounts_report.partner_ledger + dynamic_accounts_report.partner_ledger + + + \ No newline at end of file diff --git a/dynamic_accounts_report/report/trial_balance.py b/dynamic_accounts_report/report/trial_balance.py new file mode 100644 index 000000000..847b687aa --- /dev/null +++ b/dynamic_accounts_report/report/trial_balance.py @@ -0,0 +1,17 @@ +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'], + }) + return data diff --git a/dynamic_accounts_report/report/trial_balance.xml b/dynamic_accounts_report/report/trial_balance.xml new file mode 100644 index 000000000..711fdb504 --- /dev/null +++ b/dynamic_accounts_report/report/trial_balance.xml @@ -0,0 +1,129 @@ + + + + + + + + Trial Balance + account.trial.balance + qweb-pdf + dynamic_accounts_report.trial_balance + dynamic_accounts_report.trial_balance + + + \ No newline at end of file diff --git a/dynamic_accounts_report/security/ir.model.access.csv b/dynamic_accounts_report/security/ir.model.access.csv new file mode 100644 index 000000000..7bd282a4b --- /dev/null +++ b/dynamic_accounts_report/security/ir.model.access.csv @@ -0,0 +1,8 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_account_general_ledger,access.account.general.ledger,model_account_general_ledger,base.group_user,1,1,1,1 +access_account_trial_balance,access.account.trial.balance,model_account_trial_balance,base.group_user,1,1,1,1 +access_account_cash_flow,access.account.cash.flow,model_account_cash_flow,base.group_user,1,1,1,1 +access_dynamic_balance_sheet_report,access.dynamic.balance.sheet.report,model_dynamic_balance_sheet_report,base.group_user,1,1,1,1 +access_account_partner_ledger,access.account.partner.ledger,model_account_partner_ledger,base.group_user,1,1,1,1 +access_account_partner_ageing,account_partner_ageing.account_partner_ageing,model_account_partner_ageing,base.group_user,1,1,1,1 +access_account_day_book,account_day_book.account_day_book,model_account_day_book,base.group_user,1,1,1,1 diff --git a/dynamic_accounts_report/static/description/banner.jpg b/dynamic_accounts_report/static/description/banner.jpg new file mode 100644 index 000000000..75c1a61f4 Binary files /dev/null and b/dynamic_accounts_report/static/description/banner.jpg differ diff --git a/dynamic_accounts_report/static/description/cybro_logo.png b/dynamic_accounts_report/static/description/cybro_logo.png new file mode 100644 index 000000000..bb309114c Binary files /dev/null and b/dynamic_accounts_report/static/description/cybro_logo.png differ diff --git a/dynamic_accounts_report/static/description/icon.png b/dynamic_accounts_report/static/description/icon.png new file mode 100644 index 000000000..ee925d0ec Binary files /dev/null and b/dynamic_accounts_report/static/description/icon.png differ diff --git a/dynamic_accounts_report/static/description/images/Accounting kit -2.png b/dynamic_accounts_report/static/description/images/Accounting kit -2.png new file mode 100644 index 000000000..783144844 Binary files /dev/null and b/dynamic_accounts_report/static/description/images/Accounting kit -2.png differ diff --git a/dynamic_accounts_report/static/description/images/BB_m.png b/dynamic_accounts_report/static/description/images/BB_m.png new file mode 100644 index 000000000..b7492563d Binary files /dev/null and b/dynamic_accounts_report/static/description/images/BB_m.png differ diff --git a/dynamic_accounts_report/static/description/images/account_dynamic_report_banner.gif b/dynamic_accounts_report/static/description/images/account_dynamic_report_banner.gif new file mode 100644 index 000000000..d4530e466 Binary files /dev/null and b/dynamic_accounts_report/static/description/images/account_dynamic_report_banner.gif differ diff --git a/dynamic_accounts_report/static/description/images/accounting_kit_window.gif b/dynamic_accounts_report/static/description/images/accounting_kit_window.gif new file mode 100644 index 000000000..5d00f83a5 Binary files /dev/null and b/dynamic_accounts_report/static/description/images/accounting_kit_window.gif differ diff --git a/dynamic_accounts_report/static/description/images/age.png b/dynamic_accounts_report/static/description/images/age.png new file mode 100644 index 000000000..da82606ad Binary files /dev/null and b/dynamic_accounts_report/static/description/images/age.png differ diff --git a/dynamic_accounts_report/static/description/images/bb_pdf.png b/dynamic_accounts_report/static/description/images/bb_pdf.png new file mode 100644 index 000000000..45be4a97d Binary files /dev/null and b/dynamic_accounts_report/static/description/images/bb_pdf.png differ diff --git a/dynamic_accounts_report/static/description/images/bb_xls.png b/dynamic_accounts_report/static/description/images/bb_xls.png new file mode 100644 index 000000000..b908d220b Binary files /dev/null and b/dynamic_accounts_report/static/description/images/bb_xls.png differ diff --git a/dynamic_accounts_report/static/description/images/bs_m.png b/dynamic_accounts_report/static/description/images/bs_m.png new file mode 100644 index 000000000..72d224bfc Binary files /dev/null and b/dynamic_accounts_report/static/description/images/bs_m.png differ diff --git a/dynamic_accounts_report/static/description/images/bs_pdf.png b/dynamic_accounts_report/static/description/images/bs_pdf.png new file mode 100644 index 000000000..6d1f2be91 Binary files /dev/null and b/dynamic_accounts_report/static/description/images/bs_pdf.png differ diff --git a/dynamic_accounts_report/static/description/images/bs_xls.png b/dynamic_accounts_report/static/description/images/bs_xls.png new file mode 100644 index 000000000..c7d9e69b6 Binary files /dev/null and b/dynamic_accounts_report/static/description/images/bs_xls.png differ diff --git a/dynamic_accounts_report/static/description/images/cb_m.png b/dynamic_accounts_report/static/description/images/cb_m.png new file mode 100644 index 000000000..e5063efc7 Binary files /dev/null and b/dynamic_accounts_report/static/description/images/cb_m.png differ diff --git a/dynamic_accounts_report/static/description/images/cb_pdf.png b/dynamic_accounts_report/static/description/images/cb_pdf.png new file mode 100644 index 000000000..a617639f0 Binary files /dev/null and b/dynamic_accounts_report/static/description/images/cb_pdf.png differ diff --git a/dynamic_accounts_report/static/description/images/cb_xls.png b/dynamic_accounts_report/static/description/images/cb_xls.png new file mode 100644 index 000000000..c467b8fb3 Binary files /dev/null and b/dynamic_accounts_report/static/description/images/cb_xls.png differ diff --git a/dynamic_accounts_report/static/description/images/cf.png b/dynamic_accounts_report/static/description/images/cf.png new file mode 100644 index 000000000..15a801be3 Binary files /dev/null and b/dynamic_accounts_report/static/description/images/cf.png differ diff --git a/dynamic_accounts_report/static/description/images/cf_pdf.png b/dynamic_accounts_report/static/description/images/cf_pdf.png new file mode 100644 index 000000000..fcd7b0b33 Binary files /dev/null and b/dynamic_accounts_report/static/description/images/cf_pdf.png differ diff --git a/dynamic_accounts_report/static/description/images/cf_xls.png b/dynamic_accounts_report/static/description/images/cf_xls.png new file mode 100644 index 000000000..305804f20 Binary files /dev/null and b/dynamic_accounts_report/static/description/images/cf_xls.png differ diff --git a/dynamic_accounts_report/static/description/images/checked.png b/dynamic_accounts_report/static/description/images/checked.png new file mode 100644 index 000000000..578cedb80 Binary files /dev/null and b/dynamic_accounts_report/static/description/images/checked.png differ diff --git a/dynamic_accounts_report/static/description/images/crm_dashboard_banner.gif b/dynamic_accounts_report/static/description/images/crm_dashboard_banner.gif new file mode 100644 index 000000000..b80a0bfc9 Binary files /dev/null and b/dynamic_accounts_report/static/description/images/crm_dashboard_banner.gif differ diff --git a/dynamic_accounts_report/static/description/images/cybrosys.png b/dynamic_accounts_report/static/description/images/cybrosys.png new file mode 100644 index 000000000..d76b5bafb Binary files /dev/null and b/dynamic_accounts_report/static/description/images/cybrosys.png differ diff --git a/dynamic_accounts_report/static/description/images/db_m.png b/dynamic_accounts_report/static/description/images/db_m.png new file mode 100644 index 000000000..dfae0e29c Binary files /dev/null and b/dynamic_accounts_report/static/description/images/db_m.png differ diff --git a/dynamic_accounts_report/static/description/images/db_pdf.png b/dynamic_accounts_report/static/description/images/db_pdf.png new file mode 100644 index 000000000..b43c5302a Binary files /dev/null and b/dynamic_accounts_report/static/description/images/db_pdf.png differ diff --git a/dynamic_accounts_report/static/description/images/db_xls.png b/dynamic_accounts_report/static/description/images/db_xls.png new file mode 100644 index 000000000..00c3e9967 Binary files /dev/null and b/dynamic_accounts_report/static/description/images/db_xls.png differ diff --git a/dynamic_accounts_report/static/description/images/dynamic_financial_reports.png b/dynamic_accounts_report/static/description/images/dynamic_financial_reports.png new file mode 100644 index 000000000..289f53b10 Binary files /dev/null and b/dynamic_accounts_report/static/description/images/dynamic_financial_reports.png differ diff --git a/dynamic_accounts_report/static/description/images/dynamic_gl.png b/dynamic_accounts_report/static/description/images/dynamic_gl.png new file mode 100644 index 000000000..af29ee4b0 Binary files /dev/null and b/dynamic_accounts_report/static/description/images/dynamic_gl.png differ diff --git a/dynamic_accounts_report/static/description/images/dynamic_tb.png b/dynamic_accounts_report/static/description/images/dynamic_tb.png new file mode 100644 index 000000000..e604f0a91 Binary files /dev/null and b/dynamic_accounts_report/static/description/images/dynamic_tb.png differ diff --git a/dynamic_accounts_report/static/description/images/gantt.png b/dynamic_accounts_report/static/description/images/gantt.png new file mode 100644 index 000000000..eba731e73 Binary files /dev/null and b/dynamic_accounts_report/static/description/images/gantt.png differ diff --git a/dynamic_accounts_report/static/description/images/gl_journal.png b/dynamic_accounts_report/static/description/images/gl_journal.png new file mode 100644 index 000000000..ca9cc1073 Binary files /dev/null and b/dynamic_accounts_report/static/description/images/gl_journal.png differ diff --git a/dynamic_accounts_report/static/description/images/gl_pdf.png b/dynamic_accounts_report/static/description/images/gl_pdf.png new file mode 100644 index 000000000..dced02cec Binary files /dev/null and b/dynamic_accounts_report/static/description/images/gl_pdf.png differ diff --git a/dynamic_accounts_report/static/description/images/gl_xlsx.png b/dynamic_accounts_report/static/description/images/gl_xlsx.png new file mode 100644 index 000000000..d792aa98b Binary files /dev/null and b/dynamic_accounts_report/static/description/images/gl_xlsx.png differ diff --git a/dynamic_accounts_report/static/description/images/kit.gif b/dynamic_accounts_report/static/description/images/kit.gif new file mode 100644 index 000000000..0eb79a326 Binary files /dev/null and b/dynamic_accounts_report/static/description/images/kit.gif differ diff --git a/dynamic_accounts_report/static/description/images/land.png b/dynamic_accounts_report/static/description/images/land.png new file mode 100644 index 000000000..bf1ac0ffa Binary files /dev/null and b/dynamic_accounts_report/static/description/images/land.png differ diff --git a/dynamic_accounts_report/static/description/images/magento.png b/dynamic_accounts_report/static/description/images/magento.png new file mode 100644 index 000000000..111e9ef8a Binary files /dev/null and b/dynamic_accounts_report/static/description/images/magento.png differ diff --git a/dynamic_accounts_report/static/description/images/mobile_service_shop_pro_banner.jpg b/dynamic_accounts_report/static/description/images/mobile_service_shop_pro_banner.jpg new file mode 100644 index 000000000..7a2e022ca Binary files /dev/null and b/dynamic_accounts_report/static/description/images/mobile_service_shop_pro_banner.jpg differ diff --git a/dynamic_accounts_report/static/description/images/odoo11_magento_banner.jpg b/dynamic_accounts_report/static/description/images/odoo11_magento_banner.jpg new file mode 100644 index 000000000..b2d9b33ce Binary files /dev/null and b/dynamic_accounts_report/static/description/images/odoo11_magento_banner.jpg differ diff --git a/dynamic_accounts_report/static/description/images/pa_m.png b/dynamic_accounts_report/static/description/images/pa_m.png new file mode 100644 index 000000000..40ffae7f2 Binary files /dev/null and b/dynamic_accounts_report/static/description/images/pa_m.png differ diff --git a/dynamic_accounts_report/static/description/images/pa_pdf.png b/dynamic_accounts_report/static/description/images/pa_pdf.png new file mode 100644 index 000000000..6bd391161 Binary files /dev/null and b/dynamic_accounts_report/static/description/images/pa_pdf.png differ diff --git a/dynamic_accounts_report/static/description/images/pa_xls.png b/dynamic_accounts_report/static/description/images/pa_xls.png new file mode 100644 index 000000000..39b917e67 Binary files /dev/null and b/dynamic_accounts_report/static/description/images/pa_xls.png differ diff --git a/dynamic_accounts_report/static/description/images/pal_pdf.png b/dynamic_accounts_report/static/description/images/pal_pdf.png new file mode 100644 index 000000000..f6ed76d5e Binary files /dev/null and b/dynamic_accounts_report/static/description/images/pal_pdf.png differ diff --git a/dynamic_accounts_report/static/description/images/pal_xls.png b/dynamic_accounts_report/static/description/images/pal_xls.png new file mode 100644 index 000000000..2b99482c6 Binary files /dev/null and b/dynamic_accounts_report/static/description/images/pal_xls.png differ diff --git a/dynamic_accounts_report/static/description/images/pl_m.png b/dynamic_accounts_report/static/description/images/pl_m.png new file mode 100644 index 000000000..6d207b8b9 Binary files /dev/null and b/dynamic_accounts_report/static/description/images/pl_m.png differ diff --git a/dynamic_accounts_report/static/description/images/pl_m1.png b/dynamic_accounts_report/static/description/images/pl_m1.png new file mode 100644 index 000000000..c9c525a83 Binary files /dev/null and b/dynamic_accounts_report/static/description/images/pl_m1.png differ diff --git a/dynamic_accounts_report/static/description/images/pl_pdf.png b/dynamic_accounts_report/static/description/images/pl_pdf.png new file mode 100644 index 000000000..8e3c7b8f1 Binary files /dev/null and b/dynamic_accounts_report/static/description/images/pl_pdf.png differ diff --git a/dynamic_accounts_report/static/description/images/pl_xls.png b/dynamic_accounts_report/static/description/images/pl_xls.png new file mode 100644 index 000000000..a6ec068b1 Binary files /dev/null and b/dynamic_accounts_report/static/description/images/pl_xls.png differ diff --git a/dynamic_accounts_report/static/description/images/project_custome_gantt_banner.gif b/dynamic_accounts_report/static/description/images/project_custome_gantt_banner.gif new file mode 100644 index 000000000..3ee64f1c5 Binary files /dev/null and b/dynamic_accounts_report/static/description/images/project_custome_gantt_banner.gif differ diff --git a/dynamic_accounts_report/static/description/images/report_maker_banner.gif b/dynamic_accounts_report/static/description/images/report_maker_banner.gif new file mode 100644 index 000000000..db6305f39 Binary files /dev/null and b/dynamic_accounts_report/static/description/images/report_maker_banner.gif differ diff --git a/dynamic_accounts_report/static/description/images/stock.png b/dynamic_accounts_report/static/description/images/stock.png new file mode 100644 index 000000000..a8dade6e9 Binary files /dev/null and b/dynamic_accounts_report/static/description/images/stock.png differ diff --git a/dynamic_accounts_report/static/description/images/tb_gl.png b/dynamic_accounts_report/static/description/images/tb_gl.png new file mode 100644 index 000000000..f45e20ad1 Binary files /dev/null and b/dynamic_accounts_report/static/description/images/tb_gl.png differ diff --git a/dynamic_accounts_report/static/description/images/tb_pdf.png b/dynamic_accounts_report/static/description/images/tb_pdf.png new file mode 100644 index 000000000..861060047 Binary files /dev/null and b/dynamic_accounts_report/static/description/images/tb_pdf.png differ diff --git a/dynamic_accounts_report/static/description/images/tb_xlsx.png b/dynamic_accounts_report/static/description/images/tb_xlsx.png new file mode 100644 index 000000000..d99937649 Binary files /dev/null and b/dynamic_accounts_report/static/description/images/tb_xlsx.png differ diff --git a/dynamic_accounts_report/static/description/index.html b/dynamic_accounts_report/static/description/index.html new file mode 100644 index 000000000..e072f8fbe --- /dev/null +++ b/dynamic_accounts_report/static/description/index.html @@ -0,0 +1,1041 @@ + + +
+
+
+

Odoo 13 Dynamic Financial Reports

+

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 13 community edition.

+
+

Key Highlights

+
    +
  • + + Dynamic Financial Reports for Odoo13 Community Edition. +
  • +
  • + + Drill-down approach enabled. +
  • +
  • + + Varous Filters to Compare. +
  • +
  • + + Access the Journal Entries. +
  • +
  • + + PDF and XLSX Reports available. +
  • +
+
+
+
+ + +
+
+
+ + + +
+
+
+ + +

Screenshots

+
+
+
+ +
+ +
+
+ +
+ + + +
+ + + +

Overview

+
+

+ Accounting in odoo is sufficient for any organization to meet all their needs related to + accounting. As you know for any organization, accounting is one of the most important + processes in order to run the company without any financial losses. Odoo accounting is + connected with all the other apps such as sales, purchase, inventory and more. +
+
+ This module comes under Odoo13 Full Accounting Kit by Cybrosys Technologies which is + built under the V14 platform. It facilitates the dynamic financial report of general ledger, trial balance, balance sheet, profit & loss, cash flow statements, partner ledger, partner ageing, day book, bank book and cashbook. + We can drill down from the main report to the journal entries associated with each account. + One can open the form view of each journal entry and view the complete details here. Along with the drill down option, various supporting filters can be applied on each report. + Also, one can print the reports in both the pdf and the xlsx formats. + + +

+ + +
+ + + + + +
+
    + + +
+
+
+
+
+
+ +
+

Suggested Products

+
+ +
+ + +
+

Our Service

+
+ +
+
+
+

Our Industries

+
+ +
+
+
+
+ Odoo Industry
+
+
+

+ + Trading

+

+ Easily procure and sell your products.

+
+
+
+
+
+ Odoo Industry +
+
+
+

+ + Manufacturing

+

+ Plan, track and schedule your operations.

+
+
+
+
+
+ + Odoo Industry
+
+
+

+ + Restaurant

+

+ Run your bar or restaurant methodical.

+
+
+
+
+
+ Odoo Industry
+
+
+

+ + POS

+

+ Easy configuring and convivial selling.

+
+
+
+
+
+ Odoo Industry
+
+
+

+ + E-commerce & Website

+

+ Mobile friendly, awe-inspiring product pages.

+
+
+
+
+
+ + Odoo Industry
+
+
+

+ + Hotel Management

+

+ An all-inclusive hotel management application.

+
+
+
+
+
+ + Odoo Industry
+
+
+

+ + Education

+

+ A Collaborative platform for educational management.

+
+
+
+
+
+ Odoo Industry
+
+
+

+ + Service Management

+

+ Keep track of services and invoice accordingly.

+
+
+
+
+
+ + +
+
+
+

Need Any Help?

+
+ +

If you have anything to share with us based on your use of this module, + please + let us know. We are ready to offer our support.

+
+

Email us

+

odoo@cybrosys.com / info@cybrosys.com

+ +
+
+

Contact Us

+ www.cybrosys.com +
+
+ +
+
+ + +
+
+
+ + +
+
+ +
+ + + + + + + + +
+
+
+
+ diff --git a/dynamic_accounts_report/static/src/css/report.css b/dynamic_accounts_report/static/src/css/report.css new file mode 100644 index 000000000..a1f6e984c --- /dev/null +++ b/dynamic_accounts_report/static/src/css/report.css @@ -0,0 +1,9 @@ +.mon_fld{ +text-align: right; + +} + +.cf_fld{ +text-align: right; +width: 300px !important; +} \ No newline at end of file diff --git a/dynamic_accounts_report/static/src/js/action_manager.js b/dynamic_accounts_report/static/src/js/action_manager.js new file mode 100644 index 000000000..9eda3ec0e --- /dev/null +++ b/dynamic_accounts_report/static/src/js/action_manager.js @@ -0,0 +1,52 @@ +odoo.define('dynamic_accounts_report.action_manager', function (require) { +"use strict"; +/** + * The purpose of this file is to add the actions of type + * 'xlsx' to the ActionManager. + */ +var ActionManager = require('web.ActionManager'); +var framework = require('web.framework'); +var session = require('web.session'); + + +ActionManager.include({ + + /** + * Executes actions of type 'ir.actions.report'. + * + * @private + * @param {Object} action the description of the action to execute + * @param {Object} options @see doAction for details + * @returns {Promise} resolved when the action has been executed + */ + _executedynamicxlsxReportDownloadAction: function (action) { + framework.blockUI(); + var def = $.Deferred(); + session.get_file({ + url: '/dynamic_xlsx_reports', + data: action.data, + success: def.resolve.bind(def), + error: (error) => this.call('crash_manager', 'rpc_error', error), + complete: framework.unblockUI, + }); + return def; + }, + /** + * Overrides to handle the 'ir.actions.report' actions. + * + * @override + * @private + */ + + _handleAction: function (action, options) { + + if (action.type === 'ir_actions_dynamic_xlsx_download') { + return this._executedynamicxlsxReportDownloadAction(action, options); + } + return this._super.apply(this, arguments); + }, + + +}); + +}); diff --git a/dynamic_accounts_report/static/src/js/ageing.js b/dynamic_accounts_report/static/src/js/ageing.js new file mode 100644 index 000000000..4085ec304 --- /dev/null +++ b/dynamic_accounts_report/static/src/js/ageing.js @@ -0,0 +1,376 @@ +odoo.define('dynamic_accounts_report.ageing', function (require) { + 'use strict'; + var AbstractAction = require('web.AbstractAction'); + var core = require('web.core'); + var field_utils = require('web.field_utils'); + var rpc = require('web.rpc'); + var session = require('web.session'); + var utils = require('web.utils'); + var QWeb = core.qweb; + var _t = core._t; + + window.click_num = 0; + var PartnerAgeing = AbstractAction.extend({ + template: 'AgeingTemp', + events: { + 'click .parent-line': 'journal_line_click', + 'click .child_col1': 'journal_line_click', + 'click #apply_filter': 'apply_filter', + 'click #pdf': 'print_pdf', + 'click #xlsx': 'print_xlsx', + 'click .gl-line': 'show_drop_down', + 'click .view-account-move': 'view_acc_move', + }, + + init: function(parent, action) { + this._super(parent, action); + this.currency=action.currency; + this.report_lines = action.report_lines; + + this.wizard_id = action.context.wizard | null; + + }, + + + start: function() { + var self = this; + self.initial_render = true; + rpc.query({ + model: 'account.partner.ageing', + method: 'create', + args: [{ + + }] + }).then(function(t_res) { + self.wizard_id = t_res; + + self.load_data(self.initial_render); + }) + }, + + + load_data: function (initial_render = true) { + + var self = this; + + self.$(".categ").empty(); + try{ + var self = this; + rpc.query({ + model: 'account.partner.ageing', + method: 'view_report', + args: [[this.wizard_id]], + }).then(function(datas) { + + if (initial_render) { + self.$('.filter_view_tb').html(QWeb.render('AgeingFilterView', { + filter_data: datas['filters'], + })); + self.$el.find('.partners').select2({ + placeholder: ' Partners...', + }); + self.$el.find('.category').select2({ + placeholder: ' Partner Category...', + }); + + } + var child=[]; + + self.$('.table_view_tb').html(QWeb.render('Ageingtable', { + + report_lines : datas['report_lines'], + move_lines :datas['report_lines'][2], + filter : datas['filters'], + currency : datas['currency'], + })); + + }); + + } + catch (el) { + window.location.href + } + }, + + print_pdf: function(e) { + e.preventDefault(); + + var self = this; + self._rpc({ + model: 'account.partner.ageing', + method: 'view_report', + args: [ + [self.wizard_id] + ], + }).then(function(data) { + var action = { + 'type': 'ir.actions.report', + 'report_type': 'qweb-pdf', + 'report_name': 'dynamic_accounts_report.partner_ageing', + 'report_file': 'dynamic_accounts_report.partner_ageing', + 'data': { + 'report_data': data + }, + 'context': { + 'active_model': 'account.partner.ageing', + 'landscape': 1, + 'ageing_pdf_report': true + + }, + 'display_name': 'Partner Ageing', + }; + + return self.do_action(action); + }); + }, + + + + print_xlsx: function() { + var self = this; + self._rpc({ + model: 'account.partner.ageing', + method: 'view_report', + args: [ + [self.wizard_id] + ], + }).then(function(data) { + + var action = { + 'type': 'ir_actions_dynamic_xlsx_download', + 'data': { + 'model': 'account.partner.ageing', + 'options': JSON.stringify(data['filters']), + 'output_format': 'xlsx', + 'report_data': JSON.stringify(data['report_lines']), + 'report_name': 'Partner Ageing', + 'dfr_data': JSON.stringify(data), + }, + }; + return self.do_action(action); + }); + }, + + + + + + create_lines_with_style: function(rec, attr, datas) { + var temp_str = ""; + var style_name = "border-bottom: 1px solid #e6e6e6;"; + var attr_name = attr + " style="+style_name; + + + + temp_str += ""+rec['code'] +rec['name'] +""; + if(datas.currency[1]=='after'){ + temp_str += ""+rec['debit'].toFixed(2)+datas.currency[0]+""; + temp_str += ""+rec['credit'].toFixed(2) +datas.currency[0]+ ""; + + } + else{ + temp_str += ""+datas.currency[0]+rec['debit'].toFixed(2) + ""; + temp_str += ""+datas.currency[0]+rec['credit'].toFixed(2) + ""; + + } + return temp_str; + }, + + + journal_line_click: function (el){ + + click_num++; + var self = this; + var line = $(el.target).parent().data('id'); + + return self.do_action({ + type: 'ir.actions.act_window', + view_type: 'form', + view_mode: 'form', + res_model: 'account.move', + views: [ + [false, 'form'] + ], + res_id: line, + target: 'current', + }); + + }, + + show_drop_down: function(event) { + event.preventDefault(); + var self = this; + var account_id = $(event.currentTarget).data('account-id'); + + var partner_id = $(event.currentTarget)[0].cells[0].innerText; + + var offset = 0; + var td = $(event.currentTarget).next('tr').find('td'); + if (td.length == 1) { + + + + self._rpc({ + model: 'account.partner.ageing', + method: 'view_report', + args: [ + [self.wizard_id] + ], + }).then(function(data) { + for (var i = 0; i < data['report_lines'][0].length; i++) { + + + if (account_id == data['report_lines'][0][i]['partner_id'] ){ + + + $(event.currentTarget).next('tr').find('td .gl-table-div').remove(); + $(event.currentTarget).next('tr').find('td ul').after( + QWeb.render('SubSectional', { + account_data: data['report_lines'][0][i]['child_lines'], + + })) + + $(event.currentTarget).next('tr').find('td ul li:first a').css({ + 'background-color': '#00ede8', + 'font-weight': 'bold', + }); + } + } + + }); + } + }, + + view_acc_move: function(event) { + event.preventDefault(); + var self = this; + var context = {}; + var show_acc_move = function(res_model, res_id, view_id) { + var action = { + type: 'ir.actions.act_window', + view_type: 'form', + view_mode: 'form', + res_model: res_model, + views: [ + [view_id || false, 'form'] + ], + res_id: res_id, + target: 'current', + context: context, + }; + return self.do_action(action); + }; + rpc.query({ + model: 'account.move', + method: 'search_read', + domain: [ + ['id', '=', $(event.currentTarget).data('move-id')] + ], + fields: ['id'], + limit: 1, + }) + .then(function(record) { + if (record.length > 0) { + show_acc_move('account.move', record[0].id); + } else { + show_acc_move('account.move', $(event.currentTarget).data('move-id')); + } + }); + }, + + + apply_filter: function(event) { + + event.preventDefault(); + var self = this; + self.initial_render = false; + + var filter_data_selected = {}; + + if ($("#date_from").val()) { + var dateString = $("#date_from").val(); + + filter_data_selected.date_from= dateString; + } + var partner_ids = []; + var partner_text = []; + var span_res = document.getElementById("partner_res") + var partner_list = $(".partners").select2('data') + for (var i = 0; i < partner_list.length; i++) { + if(partner_list[i].element[0].selected === true) + {partner_ids.push(parseInt(partner_list[i].id)) + if(partner_text.includes(partner_list[i].text) === false) + {partner_text.push(partner_list[i].text) + } + span_res.value = partner_text + span_res.innerHTML=span_res.value; + } + } + if (partner_list.length == 0){ + span_res.value = "" + span_res.innerHTML=""; + } + filter_data_selected.partner_ids = partner_ids + + var partner_category_ids = []; + var partner_category_text = []; + var span_res = document.getElementById("category_res") + var category_list = $(".category").select2('data') + + for (var i = 0; i < category_list.length; i++) { + if(category_list[i].element[0].selected === true) + {partner_category_ids.push(parseInt(category_list[i].id)) + if(partner_category_text.includes(category_list[i].text) === false) + {partner_category_text.push(category_list[i].text) + } + span_res.value = partner_category_text + span_res.innerHTML=span_res.value; + } + } + if (category_list.length == 0){ + span_res.value = "" + span_res.innerHTML=""; + } + filter_data_selected.partner_category_ids = partner_category_ids + + + if ($(".target_move").length) { + + var post_res = document.getElementById("post_res") + filter_data_selected.target_move = $(".target_move")[0].value + post_res.value = $(".target_move")[0].value + post_res.innerHTML=post_res.value; + if ($(".target_move")[0].value == "") { + post_res.innerHTML="all"; + + } + } + + if ($(".result_selection").length) { + var account_res = document.getElementById("account_res") + filter_data_selected.result_selection = $(".result_selection")[0].value + account_res.value = $(".result_selection")[0].value + account_res.innerHTML=account_res.value; + if ($(".result_selection")[0].value == "") { + account_res.innerHTML="customer"; + + } + } + + + rpc.query({ + model: 'account.partner.ageing', + method: 'write', + args: [ + self.wizard_id, filter_data_selected + ], + }).then(function(res) { + self.initial_render = false; + self.load_data(self.initial_render); + }); + }, + + }); + core.action_registry.add("p_a", PartnerAgeing); + return PartnerAgeing; +}); \ No newline at end of file diff --git a/dynamic_accounts_report/static/src/js/cash_flow.js b/dynamic_accounts_report/static/src/js/cash_flow.js new file mode 100644 index 000000000..80501ecc8 --- /dev/null +++ b/dynamic_accounts_report/static/src/js/cash_flow.js @@ -0,0 +1,277 @@ +odoo.define('dynamic_cash_flow_statements.cash_flow', function (require) { + 'use strict'; + var AbstractAction = require('web.AbstractAction'); + var core = require('web.core'); + var field_utils = require('web.field_utils'); + var rpc = require('web.rpc'); + var session = require('web.session'); + var utils = require('web.utils'); + var QWeb = core.qweb; + var _t = core._t; + + window.click_num = 0; + var CashFlow = AbstractAction.extend({ + template: 'CFTemp', + events: { + 'click .parent-line': 'journal_line_click', + 'click .child_col1': 'journal_line_click', + 'click #apply_filter': 'apply_filter', + 'click #pdf': 'print_pdf', + 'click #xlsx': 'print_xlsx', + 'click .cf-line': 'get_move_lines', + }, + + init: function(parent, action) { + this._super(parent, action); + this.currency=action.currency; + this.report_lines = action.report_lines; + this.wizard_id = action.context.wizard | null; + }, + + + start: function() { + var self = this; + self.initial_render = true; + rpc.query({ + model: 'account.cash.flow', + method: 'create', + args: [{ + + }] + }).then(function(t_res) { + self.wizard_id = t_res; + self.load_data(self.initial_render); + }) + }, + + get_move_lines: function(event) { + event.preventDefault(); + var self = this; + var account_id = $(event.currentTarget).data('account-id'); + var offset = 0; + var td = $(event.currentTarget).next('tr').find('td'); + if (td.length == 1) { + rpc.query({ + model: 'account.cash.flow', + method: 'view_report', + args: [ + [self.wizard_id] + ], + }).then(function(datas) { + + if(datas['levels']== 'detailed'){ + $(event.currentTarget).next('tr').find('td ul').after( + QWeb.render('SubSectionCF', { + count: 3, + offset: 0, + account_data: datas['journal_res'], + level:datas['levels'], + currency : datas['currency'], + line_id:parseInt(event.currentTarget.attributes[3].value), + })) + }else if(datas['levels']== 'very' || datas['levels']== false){ + $(event.currentTarget).next('tr').find('td ul').after( + QWeb.render('ChildSubSectionCF', { + count: 3, + offset: 0, + account_data: datas['account_res'], + level:datas['levels'], + currency : datas['currency'], + line_id:parseInt(event.currentTarget.attributes[3].value), + })) + } + + $(event.currentTarget).next('tr').find('td ul li:first a').css({ + 'background-color': '#00ede8', + 'font-weight': 'bold', + }); + }) + } + }, + + + load_data: function (initial_render = true) { + var self = this; + self.$(".categ").empty(); + try{ + var self = this; + rpc.query({ + model: 'account.cash.flow', + method: 'view_report', + args: [[this.wizard_id]], + }).then(function(datas) { + if (initial_render) { + self.$('.filter_view_tb').html(QWeb.render('CashFilterView', { + filter_data: datas['filters'], + })); + self.$el.find('.journals').select2({ + placeholder: 'Select Journals...', + }); + } + var child=[]; + + self.$('.table_view_tb').html(QWeb.render('CashTable', { + + account_data: datas['fetched_data'], + level:datas['levels'], + currency : datas['currency'], + })); + + }); + + } + catch (el) { + window.location.href + } + }, + + show_gl: function(e) { + var self = this; + var account_id = $(e.target).attr('data-account-id'); + var options = { + account_ids: [account_id], + } + + var action = { + type: 'ir.actions.client', + name: 'GL View', + tag: 'g_l', + target: 'new', + + domain: [['account_ids','=', account_id]], + + + } + return this.do_action(action); + + }, + print_pdf: function(e) { + e.preventDefault(); + var self = this; + self._rpc({ + model: 'account.cash.flow', + method: 'view_report', + args: [ + [self.wizard_id] + ], + }).then(function(data) { + var action = { + 'type': 'ir.actions.report', + 'report_type': 'qweb-pdf', + 'report_name': 'dynamic_accounts_report.cash_flow', + 'report_file': 'dynamic_accounts_report.cash_flow', + 'data': { + 'report_data': data + }, + 'context': { + 'active_model': 'account.cash.flow', + 'landscape': 1, + 'trial_pdf_report': true + }, + 'display_name': 'Cash Flow Statements', + }; + return self.do_action(action); + }); + }, + + + + print_xlsx: function() { + var self = this; + self._rpc({ + model: 'account.cash.flow', + method: 'view_report', + args: [ + [self.wizard_id] + ], + }).then(function(data) { + var action = { + 'type': 'ir_actions_dynamic_xlsx_download', + 'data': { + 'model': 'account.cash.flow', + 'options': JSON.stringify(data['filters']), + 'output_format': 'xlsx', + 'report_data': JSON.stringify(data['report_lines']), + 'report_name': 'Cash Flow Statements', + 'dfr_data': JSON.stringify(data), + }, + }; + return self.do_action(action); + }); + }, + + journal_line_click: function (el){ + click_num++; + var self = this; + var line = $(el.target).parent().data('id'); + return self.do_action({ + type: 'ir.actions.act_window', + view_type: 'form', + view_mode: 'form', + res_model: 'account.move', + views: [ + [false, 'form'] + ], + res_id: line, + target: 'current', + }); + + }, + + + apply_filter: function(event) { + + event.preventDefault(); + var self = this; + self.initial_render = false; + + var filter_data_selected = {}; + + + + if ($(".levels").length){ + var level_res = document.getElementById("level_res") + filter_data_selected.levels = $(".levels")[0].value + level_res.value = $(".levels")[0].value + level_res.innerHTML=level_res.value; + if ($(".levels").value==""){ + type_res.innerHTML="summary"; + filter_data_selected.type = "Summary" + } + } + + if ($("#date_from").val()) { + var dateString = $("#date_from").val(); + filter_data_selected.date_from = dateString; + } + if ($("#date_to").val()) { + var dateString = $("#date_to").val(); + filter_data_selected.date_to = dateString; + } + + if ($(".target_move").length) { + var post_res = document.getElementById("post_res") + filter_data_selected.target_move = $(".target_move")[0].value + post_res.value = $(".target_move")[0].value + post_res.innerHTML=post_res.value; + if ($(".target_move")[0].value == "") { + post_res.innerHTML="all"; + + } + } + rpc.query({ + model: 'account.cash.flow', + method: 'write', + args: [ + self.wizard_id, filter_data_selected + ], + }).then(function(res) { + self.initial_render = false; + self.load_data(self.initial_render); + }); + }, + + }); + core.action_registry.add("c_f", CashFlow); + return CashFlow; +}); \ No newline at end of file diff --git a/dynamic_accounts_report/static/src/js/daybook.js b/dynamic_accounts_report/static/src/js/daybook.js new file mode 100644 index 000000000..3f6b6c376 --- /dev/null +++ b/dynamic_accounts_report/static/src/js/daybook.js @@ -0,0 +1,355 @@ +odoo.define('dynamic_partner_daybook.daybook', function (require) { + 'use strict'; + var AbstractAction = require('web.AbstractAction'); + var core = require('web.core'); + var field_utils = require('web.field_utils'); + var rpc = require('web.rpc'); + var session = require('web.session'); + var utils = require('web.utils'); + var QWeb = core.qweb; + var _t = core._t; + + window.click_num = 0; + var DayBook = AbstractAction.extend({ + template: 'DaybookTemp', + events: { + 'click .parent-line': 'journal_line_click', + 'click .child_col1': 'journal_line_click', + 'click #apply_filter': 'apply_filter', + 'click #pdf': 'print_pdf', + 'click #xlsx': 'print_xlsx', + 'click .db-line': 'show_drop_down', + 'click .view-account-move': 'view_acc_move', + }, + + init: function(parent, action) { + this._super(parent, action); + this.currency=action.currency; + this.report_lines = action.report_lines; + this.wizard_id = action.context.wizard | null; + }, + + + start: function() { + var self = this; + self.initial_render = true; + rpc.query({ + model: 'account.day.book', + method: 'create', + args: [{ + + }] + }).then(function(t_res) { + self.wizard_id = t_res; + self.load_data(self.initial_render); + }) + }, + + + load_data: function (initial_render = true) { + var self = this; + self.$(".categ").empty(); + try{ + var self = this; + self._rpc({ + model: 'account.day.book', + method: 'view_report', + args: [[this.wizard_id]], + }).then(function(datas) { + + if (initial_render) { + + self.$('.filter_view_db').html(QWeb.render('DayFilterView', { + filter_data: datas['filters'], + })); + self.$el.find('.journals').select2({ + placeholder: ' Journals...', + }); + self.$el.find('.account').select2({ + placeholder: ' Accounts...', + }); + + + } + var child=[]; + + self.$('.table_view_db').html(QWeb.render('Daytable', { + + report_lines : datas['report_lines'], + filter : datas['filters'], + currency : datas['currency'], + })); + + }); + + } + catch (el) { + window.location.href + } + }, + + print_pdf: function(e) { + e.preventDefault(); + + var self = this; + self._rpc({ + model: 'account.day.book', + method: 'view_report', + args: [ + [self.wizard_id] + ], + }).then(function(data) { + + var action = { + 'type': 'ir.actions.report', + 'report_type': 'qweb-pdf', + 'report_name': 'dynamic_accounts_report.day_book', + 'report_file': 'dynamic_accounts_report.day_book', + 'data': { + 'report_data': data + }, + 'context': { + 'active_model': 'account.day.book', + 'landscape': 1, + 'daybook_pdf_report': true + }, + 'display_name': 'Day Book', + }; + + return self.do_action(action); + }); + }, + + print_xlsx: function() { + var self = this; + self._rpc({ + model: 'account.day.book', + method: 'view_report', + args: [ + [self.wizard_id] + ], + }).then(function(data) { + + var action = { + 'type': 'ir_actions_dynamic_xlsx_download', + 'data': { + 'model': 'account.day.book', + 'options': JSON.stringify(data['filters']), + 'output_format': 'xlsx', + 'report_data': JSON.stringify(data['report_lines']), + 'report_name': 'Day Book', + 'dfr_data': JSON.stringify(data), + }, + }; + return self.do_action(action); + }); + }, + + create_lines_with_style: function(rec, attr, datas) { + + var temp_str = ""; + var style_name = "border-bottom: 1px solid #e6e6e6;"; + var attr_name = attr + " style="+style_name; + temp_str += ""+rec['code'] +rec['name'] +""; + if(datas.currency[1]=='after'){ + temp_str += ""+rec['debit'].toFixed(2)+datas.currency[0]+""; + temp_str += ""+rec['credit'].toFixed(2) +datas.currency[0]+ ""; + } + else{ + temp_str += ""+datas.currency[0]+rec['debit'].toFixed(2) + ""; + temp_str += ""+datas.currency[0]+rec['credit'].toFixed(2) + ""; + } + return temp_str; + }, + + + journal_line_click: function (el){ + click_num++; + var self = this; + var line = $(el.target).parent().data('id'); + return self.do_action({ + type: 'ir.actions.act_window', + view_type: 'form', + view_mode: 'form', + res_model: 'account.move', + views: [ + [false, 'form'] + ], + res_id: line, + target: 'current', + }); + + }, + + show_drop_down: function(event) { + event.preventDefault(); + var self = this; + var account_id = $(event.currentTarget).data('account-id'); + var offset = 0; + var td = $(event.currentTarget).next('tr').find('td'); + if (td.length == 1) { + + self._rpc({ + model: 'account.day.book', + method: 'view_report', + args: [ + [self.wizard_id] + ], + }).then(function(data) { + for (var i = 0; i < data['report_lines'].length; i++) { + + if (account_id == data['report_lines'][i]['id'] ){ + $(event.currentTarget).next('tr').find('td .db-table-div').remove(); + $(event.currentTarget).next('tr').find('td ul').after( + QWeb.render('SubSectiondb', { + + account_data: data['report_lines'][i]['child_lines'], + })) + + $(event.currentTarget).next('tr').find('td ul li:first a').css({ + 'background-color': '#00ede8', + 'font-weight': 'bold', + }); + } + } + + }); + } + }, + + view_acc_move: function(event) { + + event.preventDefault(); + var self = this; + var context = {}; + var show_acc_move = function(res_model, res_id, view_id) { + var action = { + type: 'ir.actions.act_window', + view_type: 'form', + view_mode: 'form', + res_model: res_model, + views: [ + [view_id || false, 'form'] + ], + res_id: res_id, + target: 'current', + context: context, + }; + return self.do_action(action); + }; + rpc.query({ + model: 'account.move', + method: 'search_read', + domain: [ + ['id', '=', $(event.currentTarget).data('move-id')] + ], + fields: ['id'], + limit: 1, + }) + .then(function(record) { + + if (record.length > 0) { + show_acc_move('account.move', record[0].id); + } else { + show_acc_move('account.move', $(event.currentTarget).data('move-id')); + } + }); + }, + + + apply_filter: function(event) { + + event.preventDefault(); + var self = this; + self.initial_render = false; + + var filter_data_selected = {}; + + + var account_ids = []; + var account_text = []; + + var account_res = document.getElementById("acc_res") + + var account_list = $(".account").select2('data') + for (var i = 0; i < account_list.length; i++) { + if(account_list[i].element[0].selected === true){ + + account_ids.push(parseInt(account_list[i].id)) + if(account_text.includes(account_list[i].text) === false){ + account_text.push(account_list[i].text) + } + account_res.value = account_text + account_res.innerHTML=account_res.value; + } + } + if (account_list.length == 0){ + account_res.value = "" + account_res.innerHTML=""; + + } + + filter_data_selected.account_ids = account_ids + + + + var journal_ids = []; + var journal_text = []; + var journal_res = document.getElementById("journal_res") + var journal_list = $(".journals").select2('data') + for (var i = 0; i < journal_list.length; i++) { + if(journal_list[i].element[0].selected === true){ + + journal_ids.push(parseInt(journal_list[i].id)) + if(journal_text.includes(journal_list[i].text) === false){ + journal_text.push(journal_list[i].text) + } + journal_res.value = journal_text + journal_res.innerHTML=journal_res.value; + } + } + if (journal_list.length == 0){ + journal_res.value = "" + journal_res.innerHTML=""; + + } + filter_data_selected.journal_ids = journal_ids + + if ($("#date_from").val()) { + var dateString = $("#date_from").val(); + + filter_data_selected.date_from = dateString; + } + if ($("#date_to").val()) { + var dateString = $("#date_to").val(); + filter_data_selected.date_to = dateString; + } + + if ($(".target_move").length) { + + var post_res = document.getElementById("post_res") + filter_data_selected.target_move = $(".target_move")[0].value + post_res.value = $(".target_move")[0].value + post_res.innerHTML=post_res.value; + if ($(".target_move")[0].value == "") { + post_res.innerHTML="all"; + + } + } + + rpc.query({ + model: 'account.day.book', + method: 'write', + args: [ + self.wizard_id, filter_data_selected + ], + }).then(function(res) { + self.initial_render = false; + self.load_data(self.initial_render); + }); + }, + + }); + core.action_registry.add("d_b", DayBook); + return DayBook; +}); diff --git a/dynamic_accounts_report/static/src/js/financial_reports.js b/dynamic_accounts_report/static/src/js/financial_reports.js new file mode 100644 index 000000000..e9ac3bdc9 --- /dev/null +++ b/dynamic_accounts_report/static/src/js/financial_reports.js @@ -0,0 +1,343 @@ +odoo.define('dynamic_accounts_report.financial_reports', function (require) { + 'use strict'; + var AbstractAction = require('web.AbstractAction'); + var core = require('web.core'); + var field_utils = require('web.field_utils'); + var rpc = require('web.rpc'); + var session = require('web.session'); + var utils = require('web.utils'); + var QWeb = core.qweb; + var _t = core._t; + + window.click_num = 0; + var ProfitAndLoss = AbstractAction.extend({ + template: 'dfr_template_new', + events: { + 'click .parent-line': 'journal_line_click', + 'click .child_col1': 'journal_line_click', + 'click #apply_filter': 'apply_filter', + 'click #pdf': 'print_pdf', + 'click #xlsx': 'print_xlsx', + 'click .show-gl': 'show_gl', + }, + + init: function(parent, action) { + this._super(parent, action); + this.currency=action.currency; + this.report_lines = action.report_lines; + this.wizard_id = action.context.wizard | null; + }, + start: function() { + var self = this; + self.initial_render = true; + rpc.query({ + model: 'dynamic.balance.sheet.report', + method: 'create', + args: [{ + }] + }).then(function(t_res) { + self.wizard_id = t_res; + self.load_data(self.initial_render); + }) + }, + + load_data: function (initial_render = true) { + var self = this; + var action_title = self._title; + self.$(".categ").empty(); + try{ + var self = this; + rpc.query({ + model: 'dynamic.balance.sheet.report', + method: 'view_report', + args: [[this.wizard_id], action_title], + }).then(function(datas) { + if (initial_render) { + self.$('.filter_view_dfr').html(QWeb.render('DfrFilterView', { + filter_data: datas['filters'], + title : datas['name'], + })); + self.$el.find('.journals').select2({ + placeholder: ' Journals...', + }); + self.$el.find('.account').select2({ + placeholder: ' Accounts...', + }); + self.$el.find('.account-tag').select2({ + placeholder: 'Account Tag...', + }); + self.$el.find('.analytics').select2({ + placeholder: 'Analytic Accounts...', + }); + self.$el.find('.analytic-tag').select2({ + placeholder: 'Analytic Tag...', + }); + + } + var child=[]; + self.$('.table_view_dfr').html(QWeb.render('dfr_table', { + + report_lines : datas['report_lines'], + filter : datas['filters'], + currency : datas['currency'], + credit_total : datas['credit_total'], + debit_total : datas['debit_total'], + debit_balance : datas['debit_balance'], + bs_lines : datas['bs_lines'], + })); + }); + } + catch (el) { + window.location.href + } + }, + + show_gl: function(e) { + var self = this; + var account_id = $(e.target).attr('data-account-id'); + var options = { + account_ids: [account_id], + } + var action = { + type: 'ir.actions.client', + name: 'GL View', + tag: 'g_l', + target: 'new', + domain: [['account_ids','=', account_id]], + + } + return this.do_action(action); + }, + + print_pdf: function(e) { + e.preventDefault(); + var self = this; + var action_title = self._title; + self._rpc({ + model: 'dynamic.balance.sheet.report', + method: 'view_report', + args: [ + [self.wizard_id], action_title + ], + }).then(function(data) { + var action = { + 'type': 'ir.actions.report', + 'report_type': 'qweb-pdf', + 'report_name': 'dynamic_accounts_report.balance_sheet', + 'report_file': 'dynamic_accounts_report.balance_sheet', + 'data': { + 'report_data': data, + 'report_name': action_title + }, + 'context': { + 'active_model': 'dynamic.balance.sheet.report', + 'landscape': 1, + 'bs_report': true + }, + 'display_name': action_title, + }; + return self.do_action(action); + }); + }, + + print_xlsx: function() { + var self = this; + var action_title = self._title; + self._rpc({ + model: 'dynamic.balance.sheet.report', + method: 'view_report', + args: [ + [self.wizard_id], action_title + ], + }).then(function(data) { + var action = { + 'type': 'ir_actions_dynamic_xlsx_download', + 'data': { + 'model': 'dynamic.balance.sheet.report', + 'options': JSON.stringify(data['filters']), + 'output_format': 'xlsx', + 'report_data': action_title, + 'report_name': action_title, + 'dfr_data': JSON.stringify(data['bs_lines']), + }, + }; + return self.do_action(action); + }); + }, + + journal_line_click: function (el){ + click_num++; + var self = this; + var line = $(el.target).parent().data('id'); + return self.do_action({ + type: 'ir.actions.act_window', + view_type: 'form', + view_mode: 'form', + res_model: 'account.move', + views: [ + [false, 'form'] + ], + res_id: line, + target: 'current', + }); + + }, + + apply_filter: function(event) { + + event.preventDefault(); + var self = this; + self.initial_render = false; + var filter_data_selected = {}; + var account_ids = []; + var account_text = []; + var account_res = document.getElementById("acc_res") + var account_list = $(".account").select2('data') + for (var i = 0; i < account_list.length; i++) { + if(account_list[i].element[0].selected === true){ + + account_ids.push(parseInt(account_list[i].id)) + if(account_text.includes(account_list[i].text) === false){ + account_text.push(account_list[i].text) + } + account_res.value = account_text + account_res.innerHTML=account_res.value; + } + } + if (account_list.length == 0){ + account_res.value = "" + account_res.innerHTML=""; + + } + filter_data_selected.account_ids = account_ids + + + var journal_ids = []; + var journal_text = []; + var journal_res = document.getElementById("journal_res") + var journal_list = $(".journals").select2('data') + for (var i = 0; i < journal_list.length; i++) { + if(journal_list[i].element[0].selected === true){ + + journal_ids.push(parseInt(journal_list[i].id)) + if(journal_text.includes(journal_list[i].text) === false){ + journal_text.push(journal_list[i].text) + } + journal_res.value = journal_text + journal_res.innerHTML=journal_res.value; + } + } + if (journal_list.length == 0){ + journal_res.value = "" + journal_res.innerHTML=""; + + } + filter_data_selected.journal_ids = journal_ids + + var account_tag_ids = []; + var account_tag_text = []; + var account_tag_res = document.getElementById("acc_tag_res") + + var account_tag_list = $(".account-tag").select2('data') + for (var i = 0; i < account_tag_list.length; i++) { + if(account_tag_list[i].element[0].selected === true){ + + account_tag_ids.push(parseInt(account_tag_list[i].id)) + if(account_tag_text.includes(account_tag_list[i].text) === false){ + account_tag_text.push(account_tag_list[i].text) + } + + account_tag_res.value = account_tag_text + account_tag_res.innerHTML=account_tag_res.value; + } + } + if (account_tag_list.length == 0){ + account_tag_res.value = "" + account_tag_res.innerHTML=""; + + } + filter_data_selected.account_tag_ids = account_tag_ids + + var analytic_ids = [] + var analytic_text = []; + var analytic_res = document.getElementById("analytic_res") + var analytic_list = $(".analytics").select2('data') + + for (var i = 0; i < analytic_list.length; i++) { + if(analytic_list[i].element[0].selected === true){ + + analytic_ids.push(parseInt(analytic_list[i].id)) + if(analytic_text.includes(analytic_list[i].text) === false){ + analytic_text.push(analytic_list[i].text) + } + analytic_res.value = analytic_text + analytic_res.innerHTML=analytic_res.value; + } + } + if (analytic_list.length == 0){ + analytic_res.value = "" + analytic_res.innerHTML=""; + + } + filter_data_selected.analytic_ids = analytic_ids + + var analytic_tag_ids = []; + var analytic_tag_text = []; + var analytic_tag_res = document.getElementById("analic_tag_res") + var analytic_tag_list = $(".analytic-tag").select2('data') + for (var i = 0; i < analytic_tag_list.length; i++) { + if(analytic_tag_list[i].element[0].selected === true){ + + analytic_tag_ids.push(parseInt(analytic_tag_list[i].id)) + if(analytic_tag_text.includes(analytic_tag_list[i].text) === false){ + analytic_tag_text.push(analytic_tag_list[i].text) + + } + + analytic_tag_res.value = analytic_tag_text + analytic_tag_res.innerHTML=analytic_tag_res.value; + } + } + if (analytic_tag_list.length == 0){ + analytic_tag_res.value = "" + analytic_tag_res.innerHTML=""; + + } + filter_data_selected.analytic_tag_ids = analytic_tag_ids + + + if ($("#date_from").val()) { + var dateString = $("#date_from").val(); + filter_data_selected.date_from = dateString; + } + if ($("#date_to").val()) { + var dateString = $("#date_from").val(); + filter_data_selected.date_to = dateString; + } + + if ($(".target_move").length) { + var post_res = document.getElementById("post_res") + filter_data_selected.target_move = $(".target_move")[0].value + post_res.value = $(".target_move")[0].value + post_res.innerHTML=post_res.value; + if ($(".target_move")[0].value == "") { + post_res.innerHTML="all"; + + } + } + rpc.query({ + model: 'dynamic.balance.sheet.report', + method: 'write', + args: [ + self.wizard_id, filter_data_selected + ], + }).then(function(res) { + self.initial_render = false; + self.load_data(self.initial_render); + }); + }, + + }); + core.action_registry.add("dfr_n", ProfitAndLoss); + return ProfitAndLoss; +}); diff --git a/dynamic_accounts_report/static/src/js/general_ledger.js b/dynamic_accounts_report/static/src/js/general_ledger.js new file mode 100644 index 000000000..dd65ed3d5 --- /dev/null +++ b/dynamic_accounts_report/static/src/js/general_ledger.js @@ -0,0 +1,421 @@ +odoo.define('dynamic_cash_flow_statements.general_ledger', function (require) { + 'use strict'; + var AbstractAction = require('web.AbstractAction'); + var core = require('web.core'); + var field_utils = require('web.field_utils'); + var rpc = require('web.rpc'); + var session = require('web.session'); + var utils = require('web.utils'); + var QWeb = core.qweb; + var _t = core._t; + + window.click_num = 0; + var GeneralLedger = AbstractAction.extend({ + template: 'GeneralTemp', + events: { + 'click .parent-line': 'journal_line_click', + 'click .child_col1': 'journal_line_click', + 'click #apply_filter': 'apply_filter', + 'click #pdf': 'print_pdf', + 'click #xlsx': 'print_xlsx', + 'click .gl-line': 'show_drop_down', + 'click .view-account-move': 'view_acc_move', + }, + + init: function(parent, action) { + this._super(parent, action); + this.currency=action.currency; + this.report_lines = action.report_lines; + this.wizard_id = action.context.wizard | null; + }, + + + start: function() { + var self = this; + self.initial_render = true; + var view_act = this.__parentedParent.actions + var act_id = view_act[Object.keys(view_act).pop()] + if (act_id.domain) { + rpc.query({ + model: 'account.general.ledger', + method: 'create', + args: [{ + account_ids: [act_id.domain[0][2]] + }] + }).then(function(t_res) { + self.wizard_id = t_res; + self.load_data(self.initial_render); + }) + }else{ + rpc.query({ + model: 'account.general.ledger', + method: 'create', + args: [{ + + }] + }).then(function(t_res) { + self.wizard_id = t_res; + self.load_data(self.initial_render); + }) + } + }, + + + load_data: function (initial_render = true) { + var self = this; + self.$(".categ").empty(); + try{ + var self = this; + var action_title = self._title + rpc.query({ + model: 'account.general.ledger', + method: 'view_report', + args: [[this.wizard_id], action_title], + }).then(function(datas) { + + if (initial_render) { + self.$('.filter_view_tb').html(QWeb.render('GLFilterView', { + filter_data: datas['filters'], + title : datas['name'], + })); + self.$el.find('.journals').select2({ + placeholder: ' Journals...', + }); + self.$el.find('.account').select2({ + placeholder: ' Accounts...', + }); + self.$el.find('.analytics').select2({ + placeholder: 'Analytic Accounts...', + }); + self.$el.find('.analytic_tags').select2({ + placeholder: 'Analytic Tags...', + }); + + } + var child=[]; + + self.$('.table_view_tb').html(QWeb.render('GLTable', { + + report_lines : datas['report_lines'], + filter : datas['filters'], + currency : datas['currency'], + credit_total : datas['credit_total'], + debit_total : datas['debit_total'], + debit_balance : datas['debit_balance'] + })); + + }); + + } + catch (el) { + window.location.href + } + }, + + print_pdf: function(e) { + e.preventDefault(); + var self = this; + var action_title = self._title + self._rpc({ + model: 'account.general.ledger', + method: 'view_report', + args: [ + [self.wizard_id], action_title + ], + }).then(function(data) { + var action = { + 'type': 'ir.actions.report', + 'report_type': 'qweb-pdf', + 'report_name': 'dynamic_accounts_report.general_ledger', + 'report_file': 'dynamic_accounts_report.general_ledger', + 'data': { + 'report_data': data + }, + 'context': { + 'active_model': 'account.general.ledger', + 'landscape': 1, + 'trial_pdf_report': true + }, + 'display_name': action_title, + }; + return self.do_action(action); + }); + }, + + print_xlsx: function() { + var self = this; + var action_title = self._title + self._rpc({ + model: 'account.general.ledger', + method: 'view_report', + args: [ + [self.wizard_id], action_title + ], + }).then(function(data) { + var action = { + 'type': 'ir_actions_dynamic_xlsx_download', + 'data': { + 'model': 'account.general.ledger', + 'options': JSON.stringify(data['filters']), + 'output_format': 'xlsx', + 'report_data': JSON.stringify(data['report_lines']), + 'report_name': action_title, + 'dfr_data': JSON.stringify(data), + }, + }; + return self.do_action(action); + }); + }, + + + + + + create_lines_with_style: function(rec, attr, datas) { + var temp_str = ""; + var style_name = "border-bottom: 1px solid #e6e6e6;"; + var attr_name = attr + " style="+style_name; + + temp_str += ""+rec['code'] +rec['name'] +""; + if(datas.currency[1]=='after'){ + temp_str += ""+rec['debit'].toFixed(2)+datas.currency[0]+""; + temp_str += ""+rec['credit'].toFixed(2) +datas.currency[0]+ ""; + } + else{ + temp_str += ""+datas.currency[0]+rec['debit'].toFixed(2) + ""; + temp_str += ""+datas.currency[0]+rec['credit'].toFixed(2) + ""; + + } + return temp_str; + }, + + + journal_line_click: function (el){ + click_num++; + var self = this; + var line = $(el.target).parent().data('id'); + return self.do_action({ + type: 'ir.actions.act_window', + view_type: 'form', + view_mode: 'form', + res_model: 'account.move', + views: [ + [false, 'form'] + ], + res_id: line, + target: 'current', + }); + + }, + + show_drop_down: function(event) { + event.preventDefault(); + var self = this; + var account_id = $(event.currentTarget).data('account-id'); + var offset = 0; + var td = $(event.currentTarget).next('tr').find('td'); + if (td.length == 1) { + var action_title = self._title + self._rpc({ + model: 'account.general.ledger', + method: 'view_report', + args: [ + [self.wizard_id], action_title + ], + }).then(function(data) { + + for (var i = 0; i < data['report_lines'].length; i++) { + + if (account_id == data['report_lines'][i]['id'] ){ + + $(event.currentTarget).next('tr').find('td .gl-table-div').remove(); + $(event.currentTarget).next('tr').find('td ul').after( + QWeb.render('SubSection', { + account_data: data['report_lines'][i]['move_lines'], + })) + $(event.currentTarget).next('tr').find('td ul li:first a').css({ + 'background-color': '#00ede8', + 'font-weight': 'bold', + }); + } + } + + }); + } + }, + + view_acc_move: function(event) { + event.preventDefault(); + var self = this; + var context = {}; + var show_acc_move = function(res_model, res_id, view_id) { + var action = { + type: 'ir.actions.act_window', + view_type: 'form', + view_mode: 'form', + res_model: res_model, + views: [ + [view_id || false, 'form'] + ], + res_id: res_id, + target: 'current', + context: context, + }; + return self.do_action(action); + }; + rpc.query({ + model: 'account.move', + method: 'search_read', + domain: [ + ['id', '=', $(event.currentTarget).data('move-id')] + ], + fields: ['id'], + limit: 1, + }) + .then(function(record) { + if (record.length > 0) { + show_acc_move('account.move', record[0].id); + } else { + show_acc_move('account.move', $(event.currentTarget).data('move-id')); + } + }); + }, + + apply_filter: function(event) { + + event.preventDefault(); + var self = this; + self.initial_render = false; + + var filter_data_selected = {}; + + + var account_ids = []; + var account_text = []; + + var account_res = document.getElementById("acc_res") + var account_list = $(".account").select2('data') + for (var i = 0; i < account_list.length; i++) { + if(account_list[i].element[0].selected === true){ + + account_ids.push(parseInt(account_list[i].id)) + if(account_text.includes(account_list[i].text) === false){ + account_text.push(account_list[i].text) + } + account_res.value = account_text + account_res.innerHTML=account_res.value; + } + } + if (account_list.length == 0){ + account_res.value = "" + account_res.innerHTML=""; + + } + filter_data_selected.account_ids = account_ids + + + + var journal_ids = []; + var journal_text = []; + var journal_res = document.getElementById("journal_res") + var journal_list = $(".journals").select2('data') + + for (var i = 0; i < journal_list.length; i++) { + if(journal_list[i].element[0].selected === true){ + + journal_ids.push(parseInt(journal_list[i].id)) + if(journal_text.includes(journal_list[i].text) === false){ + journal_text.push(journal_list[i].text) + } + journal_res.value = journal_text + journal_res.innerHTML=journal_res.value; + } + } + if (journal_list.length == 0){ + journal_res.value = "" + journal_res.innerHTML=""; + + } + filter_data_selected.journal_ids = journal_ids + + var analytic_ids = [] + var analytic_text = []; + var analytic_res = document.getElementById("analytic_res") + var analytic_list = $(".analytics").select2('data') + + for (var i = 0; i < analytic_list.length; i++) { + if(analytic_list[i].element[0].selected === true){ + + analytic_ids.push(parseInt(analytic_list[i].id)) + if(analytic_text.includes(analytic_list[i].text) === false){ + analytic_text.push(analytic_list[i].text) + } + analytic_res.value = analytic_text + analytic_res.innerHTML=analytic_res.value; + } + } + if (analytic_list.length == 0){ + analytic_res.value = "" + analytic_res.innerHTML=""; + + } + filter_data_selected.analytic_ids = analytic_ids + + var analytic_tag_ids = [] + var analytic_tag_text = []; + var analytic_tag_res = document.getElementById("analytic_tag_res") + var analytic_tag_list = $(".analytic_tags").select2('data') + for (var i = 0; i < analytic_tag_list.length; i++) { + if(analytic_tag_list[i].element[0].selected === true){ + + analytic_tag_ids.push(parseInt(analytic_tag_list[i].id)) + if(analytic_tag_text.includes(analytic_tag_list[i].text) === false){ + analytic_tag_text.push(analytic_tag_list[i].text) + } + analytic_tag_res.value = analytic_tag_text + analytic_tag_res.innerHTML=analytic_tag_res.value; + } + } + if (analytic_tag_list.length == 0){ + analytic_tag_res.value = "" + analytic_tag_res.innerHTML=""; + + } + filter_data_selected.analytic_tag_ids = analytic_tag_ids + + if ($("#date_from").val()) { + + var dateString = $("#date_from").val(); + filter_data_selected.date_from = dateString; + } + if ($("#date_to").val()) { + var dateString = $("#date_from").val(); + filter_data_selected.date_to = dateString; + } + + if ($(".target_move").length) { + var post_res = document.getElementById("post_res") + filter_data_selected.target_move = $(".target_move")[0].value + post_res.value = $(".target_move")[0].value + post_res.innerHTML=post_res.value; + if ($(".target_move")[0].value == "") { + post_res.innerHTML="all"; + + } + } + rpc.query({ + model: 'account.general.ledger', + method: 'write', + args: [ + self.wizard_id, filter_data_selected + ], + }).then(function(res) { + self.initial_render = false; + self.load_data(self.initial_render); + }); + }, + + }); + core.action_registry.add("g_l", GeneralLedger); + return GeneralLedger; +}); \ No newline at end of file diff --git a/dynamic_accounts_report/static/src/js/partner_ledger.js b/dynamic_accounts_report/static/src/js/partner_ledger.js new file mode 100644 index 000000000..373cda33f --- /dev/null +++ b/dynamic_accounts_report/static/src/js/partner_ledger.js @@ -0,0 +1,394 @@ +odoo.define('dynamic_accounts_report.partner_ledger', function (require) { + 'use strict'; + var AbstractAction = require('web.AbstractAction'); + var core = require('web.core'); + var field_utils = require('web.field_utils'); + var rpc = require('web.rpc'); + var session = require('web.session'); + var utils = require('web.utils'); + var QWeb = core.qweb; + var _t = core._t; + + window.click_num = 0; + var PartnerLedger = AbstractAction.extend({ + template: 'PartnerTemp', + events: { + 'click .parent-line': 'journal_line_click', + 'click .child_col1': 'journal_line_click', + 'click #apply_filter': 'apply_filter', + 'click #pdf': 'print_pdf', + 'click #xlsx': 'print_xlsx', + 'click .pl-line': 'show_drop_down', + 'click .view-account-move': 'view_acc_move', + + }, + + init: function(parent, action) { + this._super(parent, action); + this.currency=action.currency; + this.report_lines = action.report_lines; + this.wizard_id = action.context.wizard | null; + }, + + start: function() { + var self = this; + self.initial_render = true; + rpc.query({ + model: 'account.partner.ledger', + method: 'create', + args: [{ + }] + }).then(function(t_res) { + self.wizard_id = t_res; + self.load_data(self.initial_render); + }) + }, + + load_data: function (initial_render = true) { + var self = this; + self.$(".categ").empty(); + try{ + var self = this; + rpc.query({ + model: 'account.partner.ledger', + method: 'view_report', + args: [[this.wizard_id]], + }).then(function(datas) { + if (initial_render) { + self.$('.filter_view_tb').html(QWeb.render('PLFilterView', { + filter_data: datas['filters'], + })); + self.$el.find('.journals').select2({ + placeholder: ' Journals...', + }); + + self.$el.find('.account').select2({ + placeholder: ' Accounts...', + }); + self.$el.find('.partners').select2({ + placeholder: 'Partners...', + }); + self.$el.find('.reconciled').select2({ + placeholder: 'Reconciled status...', + }); + self.$el.find('.type').select2({ + placeholder: 'Account Type...', + }); + self.$el.find('.category').select2({ + placeholder: 'Partner Tag...', + }); + self.$el.find('.acc').select2({ + placeholder: 'Select Acc...', + }); + } + var child=[]; + + self.$('.table_view_tb').html(QWeb.render('PLTable', { + report_lines : datas['report_lines'], + filter : datas['filters'], + currency : datas['currency'], + credit_total : datas['credit_total'], + debit_total : datas['debit_total'], + debit_balance : datas['debit_balance'] + })); + }); + + } + catch (el) { + window.location.href + } + }, + + print_pdf: function(e) { + e.preventDefault(); + var self = this; + self._rpc({ + model: 'account.partner.ledger', + method: 'view_report', + args: [ + [self.wizard_id] + ], + }).then(function(data) { + var action = { + 'type': 'ir.actions.report', + 'report_type': 'qweb-pdf', + 'report_name': 'dynamic_accounts_report.partner_ledger', + 'report_file': 'dynamic_accounts_report.partner_ledger', + 'data': { + 'report_data': data + }, + 'context': { + 'active_model': 'account.partner.ledger', + 'landscape': 1, + 'partner_ledger_pdf_report': true + }, + 'display_name': 'Partner Ledger', + }; + return self.do_action(action); + }); + }, + + + + print_xlsx: function() { + var self = this; + self._rpc({ + model: 'account.partner.ledger', + method: 'view_report', + args: [ + [self.wizard_id] + ], + }).then(function(data) { + var action = { + 'type': 'ir_actions_dynamic_xlsx_download', + 'data': { + 'model': 'account.partner.ledger', + 'options': JSON.stringify(data['filters']), + 'output_format': 'xlsx', + 'report_data': JSON.stringify(data['report_lines']), + 'report_name': 'Partner Ledger', + 'dfr_data': JSON.stringify(data), + }, + }; + return self.do_action(action); + }); + }, + + journal_line_click: function (el){ + click_num++; + var self = this; + var line = $(el.target).parent().data('id'); + return self.do_action({ + type: 'ir.actions.act_window', + view_type: 'form', + view_mode: 'form', + res_model: 'account.move', + views: [ + [false, 'form'] + ], + res_id: line, + target: 'current', + }); + }, + + show_drop_down: function(event) { + event.preventDefault(); + var self = this; + var account_id = $(event.currentTarget).data('account-id'); + var offset = 0; + var td = $(event.currentTarget).next('tr').find('td'); + if (td.length == 1) { + self._rpc({ + model: 'account.partner.ledger', + method: 'view_report', + args: [ + [self.wizard_id] + ], + }).then(function(data) { + for (var i = 0; i < data['report_lines'].length; i++) { + + if (account_id == data['report_lines'][i]['id'] ){ + $(event.currentTarget).next('tr').find('td .pl-table-div').remove(); + $(event.currentTarget).next('tr').find('td ul').after( + QWeb.render('SubSectionPL', { + account_data: data['report_lines'][i]['move_lines'], + })) + $(event.currentTarget).next('tr').find('td ul li:first a').css({ + 'background-color': '#00ede8', + 'font-weight': 'bold', + }); + } + } + }); + } + }, + + view_acc_move: function(event) { + event.preventDefault(); + var self = this; + var context = {}; + var show_acc_move = function(res_model, res_id, view_id) { + var action = { + type: 'ir.actions.act_window', + view_type: 'form', + view_mode: 'form', + res_model: res_model, + views: [ + [view_id || false, 'form'] + ], + res_id: res_id, + target: 'current', + context: context, + }; + return self.do_action(action); + }; + rpc.query({ + model: 'account.move', + method: 'search_read', + domain: [ + ['id', '=', $(event.currentTarget).data('move-id')] + ], + fields: ['id'], + limit: 1, + }) + .then(function(record) { + if (record.length > 0) { + show_acc_move('account.move', record[0].id); + } else { + show_acc_move('account.move', $(event.currentTarget).data('move-id')); + } + }); + }, + + apply_filter: function(event) { + event.preventDefault(); + var self = this; + self.initial_render = false; + var filter_data_selected = {}; + + var account_ids = []; + var account_text = []; + var span_res = document.getElementById("account_res") + var account_list = $(".account").select2('data') + for (var i = 0; i < account_list.length; i++) { + if(account_list[i].element[0].selected === true) + {account_ids.push(parseInt(account_list[i].id)) + if(account_text.includes(account_list[i].text) === false) + {account_text.push(account_list[i].text) + } + span_res.value = account_text + span_res.innerHTML=span_res.value; + } + } + if (account_list.length == 0){ + span_res.value = "" + span_res.innerHTML=""; } + filter_data_selected.account_ids = account_ids + + + var journal_ids = []; + var journal_text = []; + var journal_res = document.getElementById("journal_res") + var journal_list = $(".journals").select2('data') + for (var i = 0; i < journal_list.length; i++) { + if(journal_list[i].element[0].selected === true){ + journal_ids.push(parseInt(journal_list[i].id)) + if(journal_text.includes(journal_list[i].text) === false){ + journal_text.push(journal_list[i].text) + } + journal_res.value = journal_text + journal_res.innerHTML=journal_res.value; + } + } + if (journal_list.length == 0){ + journal_res.value = "" + journal_res.innerHTML=""; + } + filter_data_selected.journal_ids = journal_ids + + var partner_ids = []; + var partner_text = []; + var span_res = document.getElementById("partner_res") + var partner_list = $(".partners").select2('data') + for (var i = 0; i < partner_list.length; i++) { + if(partner_list[i].element[0].selected === true) + {partner_ids.push(parseInt(partner_list[i].id)) + if(partner_text.includes(partner_list[i].text) === false) + {partner_text.push(partner_list[i].text) + } + span_res.value = partner_text + span_res.innerHTML=span_res.value; + } + } + if (partner_list.length == 0){ + span_res.value = "" + span_res.innerHTML=""; + } + filter_data_selected.partner_ids = partner_ids + + var account_type_ids = []; + var account_type_ids_text = []; + var span_res = document.getElementById("type_res") + var type_list = $(".type").select2('data') + for (var i = 0; i < type_list.length; i++) { + if(type_list[i].element[0].selected === true) + {account_type_ids.push(parseInt(type_list[i].id)) + if(account_type_ids_text.includes(type_list[i].text) === false) + {account_type_ids_text.push(type_list[i].text) + } + span_res.value = account_type_ids_text + span_res.innerHTML=span_res.value; + } + } + if (type_list.length == 0){ + span_res.value = "" + span_res.innerHTML=""; + } + filter_data_selected.account_type_ids = account_type_ids + + var partner_category_ids = []; + var partner_category_text = []; + var span_res = document.getElementById("category_res") + var category_list = $(".category").select2('data') + for (var i = 0; i < category_list.length; i++) { + if(category_list[i].element[0].selected === true) + {partner_category_ids.push(parseInt(category_list[i].id)) + if(partner_category_text.includes(category_list[i].text) === false) + {partner_category_text.push(category_list[i].text) + } + span_res.value = partner_category_text + span_res.innerHTML=span_res.value; + } + } + if (category_list.length == 0){ + span_res.value = "" + span_res.innerHTML=""; + } + filter_data_selected.partner_category_ids = partner_category_ids + + if ($("#date_from").val()) { + var dateString = $("#date_from").val(); + filter_data_selected.date_from = dateString; + } + if ($("#date_to").val()) { + var dateString = $("#date_to").val(); + filter_data_selected.date_to = dateString; + } + + if ($(".reconciled").length){ + var reconciled_res = document.getElementById("reconciled_res") + filter_data_selected.reconciled = $(".reconciled")[1].value + reconciled_res.value = $(".reconciled")[0].value + reconciled_res.innerHTML=reconciled_res.value; + if ($(".reconciled").value==""){ + reconciled_res.innerHTML="unreconciled"; + filter_data_selected.reconciled = "unreconciled" + } + } + + if ($(".target_move").length) { + var post_res = document.getElementById("post_res") + filter_data_selected.target_move = $(".target_move")[0].value + post_res.value = $(".target_move")[0].value + post_res.innerHTML=post_res.value; + if ($(".target_move")[0].value == "") { + post_res.innerHTML="posted"; + + } + } + rpc.query({ + model: 'account.partner.ledger', + method: 'write', + args: [ + self.wizard_id, filter_data_selected + ], + }).then(function(res) { + self.initial_render = false; + self.load_data(self.initial_render); + }); + }, + + }); + core.action_registry.add("p_l", PartnerLedger); + return PartnerLedger; +}); diff --git a/dynamic_accounts_report/static/src/js/trial_balance.js b/dynamic_accounts_report/static/src/js/trial_balance.js new file mode 100644 index 000000000..357cf059b --- /dev/null +++ b/dynamic_accounts_report/static/src/js/trial_balance.js @@ -0,0 +1,241 @@ +odoo.define('dynamic_cash_flow_statements.trial', function (require) { + 'use strict'; + var AbstractAction = require('web.AbstractAction'); + var core = require('web.core'); + var field_utils = require('web.field_utils'); + var rpc = require('web.rpc'); + var session = require('web.session'); + var utils = require('web.utils'); + var QWeb = core.qweb; + var _t = core._t; + + window.click_num = 0; + var TrialBalance = AbstractAction.extend({ + template: 'TrialTemp', + events: { + 'click .parent-line': 'journal_line_click', + 'click .child_col1': 'journal_line_click', + 'click #apply_filter': 'apply_filter', + 'click #pdf': 'print_pdf', + 'click #xlsx': 'print_xlsx', + 'click .show-gl': 'show_gl', + }, + + init: function(parent, action) { + this._super(parent, action); + this.currency=action.currency; + this.report_lines = action.report_lines; + this.wizard_id = action.context.wizard | null; + }, + + + start: function() { + var self = this; + self.initial_render = true; + rpc.query({ + model: 'account.trial.balance', + method: 'create', + args: [{ + + }] + }).then(function(t_res) { + self.wizard_id = t_res; + self.load_data(self.initial_render); + }) + }, + + + load_data: function (initial_render = true) { + var self = this; + self.$(".categ").empty(); + try{ + var self = this; + rpc.query({ + model: 'account.trial.balance', + method: 'view_report', + args: [[this.wizard_id]], + }).then(function(datas) { + if (initial_render) { + self.$('.filter_view_tb').html(QWeb.render('TrialFilterView', { + filter_data: datas['filters'], + })); + self.$el.find('.journals').select2({ + placeholder: 'Select Journals...', + }); + } + var child=[]; + + self.$('.table_view_tb').html(QWeb.render('TrialTable', { + + report_lines : datas['report_lines'], + filter : datas['filters'], + currency : datas['currency'], + credit_total : datas['credit_total'], + debit_total : datas['debit_total'], + })); + }); + + } + catch (el) { + window.location.href + } + }, + + show_gl: function(e) { + var self = this; + var account_id = $(e.target).attr('data-account-id'); + var options = { + account_ids: [account_id], + } + + var action = { + type: 'ir.actions.client', + name: 'GL View', + tag: 'g_l', + target: 'new', + + domain: [['account_ids','=', account_id]], + + + } + return this.do_action(action); + + }, + + print_pdf: function(e) { + e.preventDefault(); + var self = this; + self._rpc({ + model: 'account.trial.balance', + method: 'view_report', + args: [ + [self.wizard_id] + ], + }).then(function(data) { + var action = { + 'type': 'ir.actions.report', + 'report_type': 'qweb-pdf', + 'report_name': 'dynamic_accounts_report.trial_balance', + 'report_file': 'dynamic_accounts_report.trial_balance', + 'data': { + 'report_data': data + }, + 'context': { + 'active_model': 'account.trial.balance', + 'landscape': 1, + 'trial_pdf_report': true + }, + 'display_name': 'Trial Balance', + }; + return self.do_action(action); + }); + }, + + print_xlsx: function() { + var self = this; + self._rpc({ + model: 'account.trial.balance', + method: 'view_report', + args: [ + [self.wizard_id] + ], + }).then(function(data) { + var action = { + 'type': 'ir_actions_dynamic_xlsx_download', + 'data': { + 'model': 'account.trial.balance', + 'options': JSON.stringify(data['filters']), + 'output_format': 'xlsx', + 'report_data': JSON.stringify(data['report_lines']), + 'report_name': 'Trial Balance', + 'dfr_data': JSON.stringify(data), + }, + }; + return self.do_action(action); + }); + }, + + journal_line_click: function (el){ + click_num++; + var self = this; + var line = $(el.target).parent().data('id'); + return self.do_action({ + type: 'ir.actions.act_window', + view_type: 'form', + view_mode: 'form', + res_model: 'account.move', + views: [ + [false, 'form'] + ], + res_id: line, + target: 'current', + }); + + }, + + + apply_filter: function(event) { + + event.preventDefault(); + var self = this; + self.initial_render = false; + + var filter_data_selected = {}; + var journal_ids = []; + var journal_text = []; + var journal_res = document.getElementById("journal_res") + var journal_list = $(".journals").select2('data') + + for (var i = 0; i < journal_list.length; i++) { + if(journal_list[i].element[0].selected === true){ + + journal_ids.push(parseInt(journal_list[i].id)) + if(journal_text.includes(journal_list[i].text) === false){ + journal_text.push(journal_list[i].text) + } + journal_res.value = journal_text + journal_res.innerHTML=journal_res.value; + } + } + if (journal_list.length == 0){ + journal_res.value = "" + journal_res.innerHTML=""; + + } + filter_data_selected.journal_ids = journal_ids + + if ($("#date_from").val()) { + var dateString = $("#date_from").val(); + filter_data_selected.date_from = dateString; + } + if ($("#date_to").val()) { + var dateString = $("#date_to").val(); + filter_data_selected.date_to = dateString; + } + + if ($(".target_move").length) { + var post_res = document.getElementById("post_res") + filter_data_selected.target_move = $(".target_move")[0].value + post_res.value = $(".target_move")[0].value + post_res.innerHTML=post_res.value; + if ($(".target_move")[0].value == "") { + post_res.innerHTML="all"; + + } + } + rpc.query({ + model: 'account.trial.balance', + method: 'write', + args: [ + self.wizard_id, filter_data_selected + ], + }).then(function(res) { + self.initial_render = false; + self.load_data(self.initial_render); + }); + }, + + }); + core.action_registry.add("t_b", TrialBalance); + return TrialBalance; +}); \ No newline at end of file diff --git a/dynamic_accounts_report/static/src/xml/ageing.xml b/dynamic_accounts_report/static/src/xml/ageing.xml new file mode 100644 index 000000000..ef86ed719 --- /dev/null +++ b/dynamic_accounts_report/static/src/xml/ageing.xml @@ -0,0 +1,475 @@ + + + +
+
+

+ PARTNER AGEING +

+ +
+ +
+
+
+

+
+
+
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PartnerNot Due0-2020-4040-6060-8080+Total
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
    + +
+
+
+
+
+ + + + + +
+
+
+ + +
+
+

+
+
+ +

+
+
+ + +
+
+ + +Account Type: + + + +
+
+ + + Partners: + + + +
+
+ + + Partner tag: + + + + +
+ + +
+ + +Target Move: + + + +
+
+ +
+
+ + +
+
+
+
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Entry LabelDueDateJRNLAccountNot Due0-2021-4041-6061-8080+
+ + + + + + + + + + + - + + + + + + - + + + + + + + + + - + + + + + - + + + + + + + + + - + + + + + - + + + + + + + + + + - + + + + + - + + + + + + + + + + - + + + + + - + + + + + + + + + - + + + + + - + + + + + + + + - + + + + + - + + + + + + + + + + + - + + + + + + + + + + + - + + + + + + + + + + + - + + + + + + + + + + + - + + + + + + + + + + + - + + + + + + + +
+
+
+ +
\ No newline at end of file diff --git a/dynamic_accounts_report/static/src/xml/cash_flow_view.xml b/dynamic_accounts_report/static/src/xml/cash_flow_view.xml new file mode 100644 index 000000000..293c65488 --- /dev/null +++ b/dynamic_accounts_report/static/src/xml/cash_flow_view.xml @@ -0,0 +1,351 @@ + + + +
+
+

+ CASH FLOW STATEMENTS +

+ +
+ +
+
+
+

+
+
+
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameCash InCash OutBalance
+ + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + +
+
    + +
+
+
+
+
+ + + + + + +
+
+
+ + +
+
+

+
+
+ +

+
+
+ + +
+ + +
+ + +Target Move: + + + +
+ +
+ + +Level: + + + +
+ + +
+ +
+
+ + +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameCash InCash OutBalance
+ + + + + + + + + + + + + +
+ +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
+
+ +
\ No newline at end of file diff --git a/dynamic_accounts_report/static/src/xml/daybook.xml b/dynamic_accounts_report/static/src/xml/daybook.xml new file mode 100644 index 000000000..3edc4b410 --- /dev/null +++ b/dynamic_accounts_report/static/src/xml/daybook.xml @@ -0,0 +1,288 @@ + + + +
+
+

+ Day Book +

+ +
+ +
+
+
+

+
+
+
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
DateDebitCreditBalance
+ + + + + + + + + + +
+
    +
+
+
+
+
+ + + + + +
+
+
+ + +
+
+

+
+ +
+ +

+
+
+ + +
+
+ + +Journals: + + + +
+
+ + +Accounts: + + + +
+ + +
+ + +Target Move: + + + +
+
+ +
+
+ + +
+
+
+
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DateJRNLPartnerMoveEntry LabelDebitCreditBalance
+ + + + + + + + + + + + + + - + + + + + + + + - + + + + + + + + - + + + + + + + + - + + + + + + + + - + + + + + + + + - + + + + + +
+
+
+ +
\ No newline at end of file diff --git a/dynamic_accounts_report/static/src/xml/financial_reports_view.xml b/dynamic_accounts_report/static/src/xml/financial_reports_view.xml new file mode 100644 index 000000000..509dd7f1f --- /dev/null +++ b/dynamic_accounts_report/static/src/xml/financial_reports_view.xml @@ -0,0 +1,265 @@ + + + +
+
+
+
+

+
+
+
+
+
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DebitCreditBalance
+ + + - + + +
+ + +
+
+ +
+ +
+
+
+ +
+

+ +

+ +
+
+ +
+
+ + +
+
+

+
+
+ +

+
+
+ + +
+
+ + +Journals: + + + +
+ +
+ + + Accounts: + + + +
+ + + +
+ + + Analytic Accounts: + + + +
+ +
+ + + Analytic Tags: + + + +
+ + +
+ + +Target Move: + + + +
+
+ +
+
+ + +
+
+
+
+ +
\ No newline at end of file diff --git a/dynamic_accounts_report/static/src/xml/general_ledger_view.xml b/dynamic_accounts_report/static/src/xml/general_ledger_view.xml new file mode 100644 index 000000000..3bbec08ee --- /dev/null +++ b/dynamic_accounts_report/static/src/xml/general_ledger_view.xml @@ -0,0 +1,382 @@ + + +
+
+
+
+

+
+
+
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AccountDebitCreditBalance
+ + + + - + + + + + - + + + + + + + + - + + + + + + + + - + + + + + + + + - + + + + + + + + - + + + + + + + + - + + + + + +
+
    +
+
+
+
+
+ + + +
+

+ +

+ +
+
+
+
+ + +
+
+

+
+
+ +

+
+
+ + +
+
+ + + Journals: + + + +
+ +
+ + + Accounts: + + + +
+ +
+ + + Analytic Accounts: + + + +
+ +
+ + + Analytic Tags: + + + +
+ + +
+ + + Target Move: + + + +
+
+ +
+
+ + +
+
+
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DateJRNLPartnerMoveEntry LabelDebitCreditBalance
+ + + + + + + + + + + + + + - + + + + + + + + - + + + + + + + + - + + + + + + + + - + + + + + + + + - + + + + + + + + - + + + + + +
+
+
+ + +
\ No newline at end of file diff --git a/dynamic_accounts_report/static/src/xml/partner_ledger_view.xml b/dynamic_accounts_report/static/src/xml/partner_ledger_view.xml new file mode 100644 index 000000000..e7045cc86 --- /dev/null +++ b/dynamic_accounts_report/static/src/xml/partner_ledger_view.xml @@ -0,0 +1,349 @@ + + +
+
+

+ Partner Ledger +

+
+ +
+
+
+

+
+
+
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PartnerDebitCreditBalance
+ + + + + + + + + + + + + + + + + + + + + + +
+
    +
+
+
+
+
+ + +
+
+
+ + +
+
+

+
+
+ +

+
+
+ + +
+
+ + + Partners: + + + + +
+
+ + + Reconciliation Status: + + + + +
+
+ + + Account Type + + + + +
+
+ + + Partner tag: + + + + +
+ +
+ + + Journals: + + + +
+
+ + + Accounts: + + + + + +
+ + +
+ + + Target Move: + + + +
+
+ +
+
+ + +
+
+
+
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DateJRNLAccountMoveEntry LabelDebitCreditBalance
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ +
\ No newline at end of file diff --git a/dynamic_accounts_report/static/src/xml/trial_balance_view.xml b/dynamic_accounts_report/static/src/xml/trial_balance_view.xml new file mode 100644 index 000000000..e39962ade --- /dev/null +++ b/dynamic_accounts_report/static/src/xml/trial_balance_view.xml @@ -0,0 +1,281 @@ + + +
+
+

+ TRIAL BALANCE +

+ +
+ +
+
+
+

+
+
+
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AccountInitial DebitInitial CreditDebitCredit
+ + + - + + +
+ + +
+
+ + + + + + + + + + + + + 0 + + 0 + + 0 + + + 0 + + + + + + + + + + + + + +
+ Total + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+ + + + +
+
+
+ + +
+
+

+
+
+ +

+
+
+ + +
+
+ + + Journals: + + + +
+ +
+ + + Target Move: + + + +
+
+ +
+
+ + +
+
+
+
+ +
\ No newline at end of file diff --git a/dynamic_accounts_report/views/kit_menus.xml b/dynamic_accounts_report/views/kit_menus.xml new file mode 100644 index 000000000..14c4fa630 --- /dev/null +++ b/dynamic_accounts_report/views/kit_menus.xml @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dynamic_accounts_report/views/templates.xml b/dynamic_accounts_report/views/templates.xml new file mode 100644 index 000000000..9965a94db --- /dev/null +++ b/dynamic_accounts_report/views/templates.xml @@ -0,0 +1,23 @@ + + + +