diff --git a/dynamic_accounts_report/__manifest__.py b/dynamic_accounts_report/__manifest__.py index 01c2b9039..b2a288f6c 100644 --- a/dynamic_accounts_report/__manifest__.py +++ b/dynamic_accounts_report/__manifest__.py @@ -22,7 +22,7 @@ { 'name': 'Dynamic Financial Reports', - 'version': '15.0.1.1.5', + 'version': '15.0.1.1.6', 'category': 'Accounting', 'live_test_url': 'https://www.youtube.com/watch?v=gVQi9q9Rs-E&t=5s', 'summary': """Dynamic Financial Reports with drill diff --git a/dynamic_accounts_report/controllers/controllers.py b/dynamic_accounts_report/controllers/controllers.py index aa96f68c6..4d0076094 100644 --- a/dynamic_accounts_report/controllers/controllers.py +++ b/dynamic_accounts_report/controllers/controllers.py @@ -24,7 +24,6 @@ class TBXLSXReportController(http.Controller): ('Content-Disposition', content_disposition(report_name + '.xlsx')) ] ) - print('report data in controller: ', report_data) report_obj.get_dynamic_xlsx_report(options, response, report_data, dfr_data) response.set_cookie('fileToken', token) diff --git a/dynamic_accounts_report/doc/RELEASE_NOTES.md b/dynamic_accounts_report/doc/RELEASE_NOTES.md index 94e06de8a..a5287f6be 100644 --- a/dynamic_accounts_report/doc/RELEASE_NOTES.md +++ b/dynamic_accounts_report/doc/RELEASE_NOTES.md @@ -31,3 +31,8 @@ #### Version 15.0.1.1.5 #### UPDT AND BUGFIX - Report Bug Fix + +#### 08.02.2023 +#### Version 15.0.1.1.6 +#### UPDT AND BUGFIX +- Report Bug Fix: Correct the currency used in the General Ledger diff --git a/dynamic_accounts_report/report/general_ledger.py b/dynamic_accounts_report/report/general_ledger.py index 25f21bc81..912522d1c 100644 --- a/dynamic_accounts_report/report/general_ledger.py +++ b/dynamic_accounts_report/report/general_ledger.py @@ -6,9 +6,7 @@ class GeneralLedger(models.AbstractModel): @api.model def _get_report_values(self, docids, data=None): - print('data frm repot', data) if self.env.context.get('trial_pdf_report'): - print(data.get('report_data')['report_lines'], "data") if data.get('report_data'): data.update({'account_data': data.get('report_data')['report_lines'], 'Filters': data.get('report_data')['filters'], diff --git a/dynamic_accounts_report/static/src/js/ageing.js b/dynamic_accounts_report/static/src/js/ageing.js index 9c92aad4c..6d111743e 100644 --- a/dynamic_accounts_report/static/src/js/ageing.js +++ b/dynamic_accounts_report/static/src/js/ageing.js @@ -125,7 +125,6 @@ odoo.define('dynamic_accounts_report.ageing', function (require) { } var child=[]; - console.log(datas['report_lines'][0]) self.$('.table_view_tb').html(QWeb.render('Ageingtable', { report_lines : datas['report_lines'], diff --git a/dynamic_accounts_report/static/src/js/financial_reports.js b/dynamic_accounts_report/static/src/js/financial_reports.js index e88a06d90..71efcc0b5 100644 --- a/dynamic_accounts_report/static/src/js/financial_reports.js +++ b/dynamic_accounts_report/static/src/js/financial_reports.js @@ -85,35 +85,32 @@ odoo.define('dynamic_accounts_report.financial_reports', function (require) { method: 'view_report', args: [[this.wizard_id], action_title, self.searchModel.config.context.lang], }).then(function(datas) { - - - console.log('Balance sheet values..........',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...', - }); - self.$el.find('.target_move').select2({ - placeholder: 'Target Move...', - }); - - } - var child=[]; + 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...', + }); + self.$el.find('.target_move').select2({ + placeholder: 'Target Move...', + }); + + } + var child=[]; self.$('.table_view_dfr').html(QWeb.render('dfr_table', { report_lines : datas['report_lines'], @@ -242,7 +239,6 @@ odoo.define('dynamic_accounts_report.financial_reports', function (require) { var account_ids = []; var account_text = []; var account_res = document.getElementById("acc_res") - console.log('account.value....',account_res.value) var account_list = $(".account").select2('data') for (var i = 0; i < account_list.length; i++) { if(account_list[i].element[0].selected === true){ diff --git a/dynamic_accounts_report/static/src/js/general_ledger.js b/dynamic_accounts_report/static/src/js/general_ledger.js index e0822ab7d..d63f1ef44 100644 --- a/dynamic_accounts_report/static/src/js/general_ledger.js +++ b/dynamic_accounts_report/static/src/js/general_ledger.js @@ -100,7 +100,6 @@ odoo.define('dynamic_accounts_report.general_ledger', function (require) { try{ var self = this; var action_title = self._title - console.log("action_title:",action_title) self._rpc({ model: 'account.general.ledger', method: 'view_report', @@ -279,7 +278,6 @@ odoo.define('dynamic_accounts_report.general_ledger', function (require) { event.preventDefault(); var self = this; var account_id = $(event.currentTarget).data('account-id'); - console.log(account_id,'account_id') var offset = 0; var td = $(event.currentTarget).next('tr').find('td'); if (td.length == 1) { diff --git a/dynamic_accounts_report/static/src/xml/general_ledger_view.xml b/dynamic_accounts_report/static/src/xml/general_ledger_view.xml index cc1a4f4dd..8ba03bae5 100644 --- a/dynamic_accounts_report/static/src/xml/general_ledger_view.xml +++ b/dynamic_accounts_report/static/src/xml/general_ledger_view.xml @@ -370,7 +370,8 @@ - - + + @@ -380,7 +381,8 @@ - - + + @@ -391,7 +393,8 @@ - + + @@ -406,7 +409,8 @@ - + + @@ -416,7 +420,8 @@ - + + @@ -428,7 +433,8 @@ - + + diff --git a/dynamic_accounts_report/wizard/ageing.py b/dynamic_accounts_report/wizard/ageing.py index fd4675cec..31a4cc221 100644 --- a/dynamic_accounts_report/wizard/ageing.py +++ b/dynamic_accounts_report/wizard/ageing.py @@ -59,7 +59,6 @@ class AgeingView(models.TransientModel): records = self._get_report_values(data) currency = self._get_currency() - print(records['Partners']) return { 'name': "Partner Ageing", 'type': 'ir.actions.client', diff --git a/dynamic_accounts_report/wizard/balance_sheet.py b/dynamic_accounts_report/wizard/balance_sheet.py index 038e673e8..f60960eab 100644 --- a/dynamic_accounts_report/wizard/balance_sheet.py +++ b/dynamic_accounts_report/wizard/balance_sheet.py @@ -111,10 +111,8 @@ class BalanceSheetView(models.TransientModel): 'lang': 'en_US'}} account_lines = self.get_account_lines(new_data) - print("account_lines",account_lines) report_lines = self.view_report_pdf(account_lines, new_data)[ 'report_lines'] - print("report_lines",report_lines) move_line_accounts = [] move_lines_dict = {} diff --git a/dynamic_accounts_report/wizard/balance_sheet_config.py b/dynamic_accounts_report/wizard/balance_sheet_config.py index 31e809656..1c3ccbcdf 100644 --- a/dynamic_accounts_report/wizard/balance_sheet_config.py +++ b/dynamic_accounts_report/wizard/balance_sheet_config.py @@ -94,7 +94,6 @@ class BalanceSheet(models.TransientModel): res = {} fields = ['credit', 'debit', 'balance'] - print("reportssssssss",reports) for report in reports: if report.id in res: continue @@ -128,7 +127,6 @@ class BalanceSheet(models.TransientModel): elif report.type == 'sum': # it's the sum of the children of this account.report res2 = self._compute_report_balance(report.children_ids) - print(fields,"ffff") for key, value in res2.items(): for field in fields: res[report.id][field] += value[field] @@ -196,7 +194,6 @@ class BalanceSheet(models.TransientModel): # used to display the details of the # financial report, so it's not needed here. continue - print("get_account:",res[report.id]) if res[report.id].get('account'): sub_lines = [] for account_id, value \ @@ -247,7 +244,6 @@ class BalanceSheet(models.TransientModel): flag = True if flag: sub_lines.append(vals) - print("sub_lines",sub_lines) lines += sorted(sub_lines, key=lambda sub_line: sub_line['name']) return lines diff --git a/dynamic_accounts_report/wizard/general_ledger.py b/dynamic_accounts_report/wizard/general_ledger.py index 1dbbf48fa..c481377c7 100644 --- a/dynamic_accounts_report/wizard/general_ledger.py +++ b/dynamic_accounts_report/wizard/general_ledger.py @@ -46,7 +46,6 @@ class GeneralView(models.TransientModel): @api.model def view_report(self, option, title): - print("view_report") r = self.env['account.general.ledger'].search([('id', '=', option[0])]) self = r new_title = '' @@ -102,7 +101,6 @@ class GeneralView(models.TransientModel): filters = self.get_filter(option) records = self._get_report_values(data) currency = self._get_currency() - print('last return') return { 'name': new_title, 'type': 'ir.actions.client', @@ -286,14 +284,12 @@ class GeneralView(models.TransientModel): return res def _get_accounts(self, accounts, init_balance, display_account, data): - print("function called..........") cr = self.env.cr MoveLine = self.env['account.move.line'] move_lines = {x: [] for x in accounts.ids} # Prepare initial sql query and Get the initial move lines if init_balance and data.get('date_from'): - print("function called..2") init_tables, init_where_clause, init_where_params = MoveLine.with_context( date_from=self.env.context.get('date_from'), date_to=False, initial_bal=True)._query_get() @@ -345,7 +341,6 @@ class GeneralView(models.TransientModel): params = tuple(init_where_params) else: params = (tuple(accounts.ids),) + tuple(init_where_params) - # print("aaaaaaaaaaaaaaaaaaaaaaa", params) cr.execute(sql, params) for row in cr.dictfetchall(): row['m_id'] = row['account_id'] @@ -402,8 +397,6 @@ class GeneralView(models.TransientModel): params = tuple(where_params) else: params = (tuple(accounts.ids),) + tuple(where_params) - # print("sql", sql) - # print("params", params) cr.execute(sql, params) account_res = cr.dictfetchall() @@ -626,7 +619,6 @@ class GeneralView(models.TransientModel): def get_dynamic_xlsx_report(self, data, response, report_data, dfr_data): report_data_main = json.loads(report_data) - print('report data: ', report_data_main) output = io.BytesIO() name_data = json.loads(dfr_data) filters = json.loads(data) @@ -721,8 +713,6 @@ class GeneralView(models.TransientModel): sheet.write(row + 1, col + 7, line_data.get('debit'), txt) sheet.write(row + 1, col + 8, line_data.get('credit'), txt) sheet.write(row + 1, col + 9, line_data.get('balance'), txt) - else: - print('///////////',rec_data) workbook.close() output.seek(0) diff --git a/dynamic_accounts_report/wizard/partner_leadger.py b/dynamic_accounts_report/wizard/partner_leadger.py index bf5373973..51be6c70b 100644 --- a/dynamic_accounts_report/wizard/partner_leadger.py +++ b/dynamic_accounts_report/wizard/partner_leadger.py @@ -127,7 +127,6 @@ class PartnerView(models.TransientModel): filters['category_list'] = data.get('category_list') filters['account_type_list'] = data.get('account_type_list') filters['target_move'] = data.get('target_move').capitalize() - print(filters, "filters") return filters def get_filter_data(self, option): @@ -163,8 +162,6 @@ class PartnerView(models.TransientModel): o_company = j.company_id accounts.append((j.id, j.name)) - - print(r.reconciled, "rec") filter_dict = { 'journal_ids': r.journal_ids.ids, 'account_ids': r.account_ids.ids, @@ -294,7 +291,6 @@ class PartnerView(models.TransientModel): if data.get('partners'): WHERE += ' AND p.id IN %s' % str( tuple(data.get('partners').ids) + tuple([0])) - print(data, "data") if data.get('reconciled') == 'unreconciled': WHERE += ' AND l.full_reconcile_id is null AND' \ ' l.balance != 0 AND a.reconcile is true'