diff --git a/dynamic_accounts_report/__manifest__.py b/dynamic_accounts_report/__manifest__.py index b936a0c57..967d2c973 100644 --- a/dynamic_accounts_report/__manifest__.py +++ b/dynamic_accounts_report/__manifest__.py @@ -21,9 +21,8 @@ ################################################################################ { 'name': 'Odoo18 Dynamic Accounting Reports', - 'version': '18.0.1.1.2', + 'version': '18.0.1.2.3', 'category': 'Accounting', - 'live_test_url': 'https://www.youtube.com/watch?v=bqtqqnGVAD8', 'summary': "Odoo 18 Accounting Financial Reports,Dynamic Accounting Reports, Dynamic Financial Reports,Dynamic Report Odoo18, Odoo18,Financial Reports, Odoo18 Accounting,Accounting, Odoo Apps", 'description': "This module creates dynamic Accounting General Ledger, Trial" "Balance, Balance Sheet, Profit and Loss, Cash Book, Partner" diff --git a/dynamic_accounts_report/doc/RELEASE_NOTES.md b/dynamic_accounts_report/doc/RELEASE_NOTES.md index 5a8b464ac..63b677466 100644 --- a/dynamic_accounts_report/doc/RELEASE_NOTES.md +++ b/dynamic_accounts_report/doc/RELEASE_NOTES.md @@ -13,4 +13,9 @@ #### 27.01.2025 #### Version 18.0.1.1.2 #### UPDT -- Fixed the errors in the filters. \ No newline at end of file +- Fixed the errors in the filters. + +#### 16.05.2025 +#### Version 18.0.1.2.3 +#### UPDT +- Bug Fixing and added thousand seperators \ No newline at end of file diff --git a/dynamic_accounts_report/models/account_general_ledger.py b/dynamic_accounts_report/models/account_general_ledger.py index cb58773b1..b67d4af71 100644 --- a/dynamic_accounts_report/models/account_general_ledger.py +++ b/dynamic_accounts_report/models/account_general_ledger.py @@ -276,53 +276,53 @@ class AccountGeneralLedger(models.TransientModel): sheet.merge_range('J9:K9', 'Credit', sub_heading) sheet.merge_range('L9:M9', 'Balance', sub_heading) row = 8 - for account in data['account']: - row += 1 - sheet.write(row, col, account, txt_name) - sheet.write(row, col + 1, ' ', txt_name) - sheet.merge_range(row, col + 2, row, col + 4, ' ', txt_name) - sheet.merge_range(row, col + 5, row, col + 6, ' ', - txt_name) - sheet.merge_range(row, col + 7, row, col + 8, - data['total'][account]['total_debit'], - txt_name) - sheet.merge_range(row, col + 9, row, col + 10, - data['total'][account]['total_credit'], - txt_name) - sheet.merge_range(row, col + 11, row, col + 12, - data['total'][account]['total_debit'] - - data['total'][account]['total_credit'], - txt_name) - for rec in data['data'][account]: + if data['account']: + for account in data['account']: row += 1 - partner = rec[0]['partner_id'] - name = partner[1] if partner else None - sheet.write(row, col, rec[0]['move_name'], txt_name) - sheet.write(row, col + 1, rec[0]['date'], txt_name) - sheet.merge_range(row, col + 2, row, col + 4, - rec[0]['name'], txt_name) - sheet.merge_range(row, col + 5, row, col + 6, name, + sheet.write(row, col, account, txt_name) + sheet.write(row, col + 1, ' ', txt_name) + sheet.merge_range(row, col + 2, row, col + 4, ' ', txt_name) + sheet.merge_range(row, col + 5, row, col + 6, ' ', txt_name) sheet.merge_range(row, col + 7, row, col + 8, - rec[0]['debit'], + data['total'][account]['total_debit_display'], txt_name) sheet.merge_range(row, col + 9, row, col + 10, - rec[0]['credit'], txt_name) - sheet.merge_range(row, col + 11, row, col + 12, ' ', + data['total'][account]['total_credit_display'], + txt_name) + sheet.merge_range(row, col + 11, row, col + 12, + data['total'][account]['balance_display'], txt_name) - row += 1 - sheet.merge_range(row, col, row, col + 6, 'Total', - filter_head) - sheet.merge_range(row, col + 7, row, col + 8, - data['grand_total']['total_debit'], - filter_head) - sheet.merge_range(row, col + 9, row, col + 10, - data['grand_total']['total_credit'], - filter_head) - sheet.merge_range(row, col + 11, row, col + 12, - float(data['grand_total']['total_debit']) - - float(data['grand_total']['total_credit']), - filter_head) + for rec in data['data'][account]: + row += 1 + partner = rec[0]['partner_id'] + name = partner[1] if partner else None + sheet.write(row, col, rec[0]['move_name'], txt_name) + sheet.write(row, col + 1, rec[0]['date'], txt_name) + sheet.merge_range(row, col + 2, row, col + 4, + rec[0]['name'], txt_name) + sheet.merge_range(row, col + 5, row, col + 6, name, + txt_name) + sheet.merge_range(row, col + 7, row, col + 8, + rec[0]['debit'], + txt_name) + sheet.merge_range(row, col + 9, row, col + 10, + rec[0]['credit'], txt_name) + sheet.merge_range(row, col + 11, row, col + 12, ' ', + txt_name) + row += 1 + sheet.merge_range(row, col, row, col + 6, 'Total', + filter_head) + sheet.merge_range(row, col + 7, row, col + 8, + data['grand_total']['total_debit_display'], + filter_head) + sheet.merge_range(row, col + 9, row, col + 10, + data['grand_total']['total_credit_display'], + filter_head) + sheet.merge_range(row, col + 11, row, col + 12, + float(data['grand_total']['total_debit']) - + float(data['grand_total']['total_credit']), + filter_head) workbook.close() output.seek(0) response.stream.write(output.read()) diff --git a/dynamic_accounts_report/models/account_partner_ledger.py b/dynamic_accounts_report/models/account_partner_ledger.py index 4306e946f..e7276cd6e 100644 --- a/dynamic_accounts_report/models/account_partner_ledger.py +++ b/dynamic_accounts_report/models/account_partner_ledger.py @@ -361,136 +361,141 @@ class AccountPartnerLedger(models.TransientModel): data = json.loads(data) output = io.BytesIO() workbook = xlsxwriter.Workbook(output, {'in_memory': True}) - start_date = data['filters']['start_date'] if \ - data['filters']['start_date'] else '' - end_date = data['filters']['end_date'] if \ - data['filters']['end_date'] else '' + start_date = data['filters']['start_date'] if data['filters']['start_date'] else '' + end_date = data['filters']['end_date'] if data['filters']['end_date'] else '' sheet = workbook.add_worksheet() - head = workbook.add_format( - {'font_size': 15, 'align': 'center', 'bold': True}) - head_highlight = workbook.add_format( - {'font_size': 10, 'align': 'center', 'bold': True}) + + # Define formats + head = workbook.add_format({'font_size': 15, 'align': 'center', 'bold': True}) + head_highlight = workbook.add_format({'font_size': 10, 'align': 'center', 'bold': True}) sub_heading = workbook.add_format( - {'align': 'center', 'bold': True, 'font_size': '10px', - 'border': 1, 'bg_color': '#D3D3D3', + {'align': 'center', 'bold': True, 'font_size': '10px', 'border': 1, 'bg_color': '#D3D3D3', 'border_color': 'black'}) filter_head = workbook.add_format( - {'align': 'center', 'bold': True, 'font_size': '10px', - 'border': 1, 'bg_color': '#D3D3D3', + {'align': 'center', 'bold': True, 'font_size': '10px', 'border': 1, 'bg_color': '#D3D3D3', 'border_color': 'black'}) - filter_body = workbook.add_format( - {'align': 'center', 'bold': True, 'font_size': '10px'}) + filter_body = workbook.add_format({'align': 'center', 'bold': True, 'font_size': '10px'}) side_heading_sub = workbook.add_format( - {'align': 'left', 'bold': True, 'font_size': '10px', - 'border': 1, - 'border_color': 'black'}) + {'align': 'left', 'bold': True, 'font_size': '10px', 'border': 1, 'border_color': 'black'}) side_heading_sub.set_indent(1) txt_name = workbook.add_format({'font_size': '10px', 'border': 1}) txt_name.set_indent(2) + + # Set column widths sheet.set_column(0, 0, 30) sheet.set_column(1, 1, 20) sheet.set_column(2, 2, 15) sheet.set_column(3, 3, 15) + + # Write headers and filters col = 0 - sheet.write('A1:b1', report_name, head) - sheet.write('B3:b4', 'Date Range', filter_head) - sheet.write('B4:b4', 'Partners', filter_head) - sheet.write('B5:b4', 'Accounts', filter_head) - sheet.write('B6:b4', 'Options', filter_head) + sheet.write('A1:B1', report_name, head) + sheet.write('B3:B4', 'Date Range', filter_head) + sheet.write('B4:B4', 'Partners', filter_head) + sheet.write('B5:B4', 'Accounts', filter_head) + sheet.write('B6:B4', 'Options', filter_head) + if start_date or end_date: - sheet.merge_range('C3:G3', f"{start_date} to {end_date}", - filter_body) + sheet.merge_range('C3:G3', f"{start_date} to {end_date}", filter_body) + if data['filters']['partner']: - display_names = [partner.get('display_name', 'undefined') for - partner in data['filters']['partner']] + display_names = [partner.get('display_name', 'undefined') for partner in data['filters']['partner']] display_names_str = ', '.join(display_names) sheet.merge_range('C4:G4', display_names_str, filter_body) + if data['filters']['account']: account_keys = list(data['filters']['account'].keys()) account_keys_str = ', '.join(account_keys) sheet.merge_range('C5:G5', account_keys_str, filter_body) + if data['filters']['options']: option_keys = list(data['filters']['options'].keys()) option_keys_str = ', '.join(option_keys) sheet.merge_range('C6:G6', option_keys_str, filter_body) - if data: - if report_action == 'dynamic_accounts_report.action_partner_ledger': - sheet.write(8, col, ' ', sub_heading) - sheet.write(8, col + 1, 'JNRL', sub_heading) - sheet.write(8, col + 2, 'Account', sub_heading) - sheet.merge_range('D9:E9', 'Ref', sub_heading) - sheet.merge_range('F9:G9', 'Due Date', sub_heading) - sheet.merge_range('H9:I9', 'Debit', sub_heading) - sheet.merge_range('J9:K9', 'Credit', sub_heading) - sheet.merge_range('L9:M9', 'Balance', sub_heading) - row = 8 - for partner in data['partners']: + + # Define a helper function to format numbers with thousand separators + def format_number(value): + if value is None: + return "0.00" + return "{:,.2f}".format(float(value)) + + # Process partner data + if data and report_action == 'dynamic_accounts_report.action_partner_ledger': + sheet.write(8, col, ' ', sub_heading) + sheet.write(8, col + 1, 'JNRL', sub_heading) + sheet.write(8, col + 2, 'Account', sub_heading) + sheet.merge_range('D9:E9', 'Ref', sub_heading) + sheet.merge_range('F9:G9', 'Due Date', sub_heading) + sheet.merge_range('H9:I9', 'Debit', sub_heading) + sheet.merge_range('J9:K9', 'Credit', sub_heading) + sheet.merge_range('L9:M9', 'Balance', sub_heading) + + row = 8 + # Ensure data['partners'] is iterable; default to empty list if None + partners = data.get('partners', []) or [] + for partner in partners: + row += 1 + # Format partner totals + total_debit = data['total'][partner]['total_debit'] if data['total'] and partner in data['total'] else 0 + total_credit = data['total'][partner]['total_credit'] if data['total'] and partner in data[ + 'total'] else 0 + balance = total_debit - total_credit + + sheet.write(row, col, partner, txt_name) + sheet.write(row, col + 1, ' ', txt_name) + sheet.write(row, col + 2, ' ', txt_name) + sheet.merge_range(row, col + 3, row, col + 4, ' ', txt_name) + sheet.merge_range(row, col + 5, row, col + 6, ' ', txt_name) + sheet.merge_range(row, col + 7, row, col + 8, format_number(total_debit), txt_name) + sheet.merge_range(row, col + 9, row, col + 10, format_number(total_credit), txt_name) + sheet.merge_range(row, col + 11, row, col + 12, format_number(balance), txt_name) + + # Handle initial balance + initial_balance = data['total'][partner]['initial_balance'] if data['total'] and partner in data[ + 'total'] else 0 + if initial_balance != 0: row += 1 - sheet.write(row, col, partner, txt_name) + initial_debit = data['total'][partner]['initial_debit'] if data['total'] and partner in data[ + 'total'] else 0 + initial_credit = data['total'][partner]['initial_credit'] if data['total'] and partner in data[ + 'total'] else 0 + + sheet.write(row, col, '', txt_name) sheet.write(row, col + 1, ' ', txt_name) sheet.write(row, col + 2, ' ', txt_name) - sheet.merge_range(row, col + 3, row, col + 4, ' ', - txt_name) - sheet.merge_range(row, col + 5, row, col + 6, ' ', - txt_name) - sheet.merge_range(row, col + 7, row, col + 8, - data['total'][partner]['total_debit'], - txt_name) - sheet.merge_range(row, col + 9, row, col + 10, - data['total'][partner]['total_credit'], - txt_name) - sheet.merge_range(row, col + 11, row, col + 12, - data['total'][partner]['total_debit'] - - data['total'][partner]['total_credit'], - txt_name) - if data['total'][partner]['initial_balance'] != 0: - row += 1 - sheet.write(row, col, '', txt_name) - sheet.write(row, col + 1, ' ', txt_name) - sheet.write(row, col + 2, ' ', txt_name) - sheet.merge_range(row, col + 3, row, col + 4, 'Initial Balance ', - head_highlight) - sheet.merge_range(row, col + 5, row, col + 6, ' ', - txt_name) - sheet.merge_range(row, col + 7, row, col + 8, - data['total'][partner]['initial_debit'], - txt_name) - sheet.merge_range(row, col + 9, row, col + 10, - data['total'][partner]['initial_credit'], - txt_name) - sheet.merge_range(row, col + 11, row, col + 12, - data['total'][partner]['initial_balance'], - txt_name) - for rec in data['data'][partner]: - row += 1 - sheet.write(row, col, rec[0]['date'], txt_name) - sheet.write(row, col + 1, rec[0]['jrnl'], txt_name) - sheet.write(row, col + 2, rec[0]['code'], txt_name) - sheet.merge_range(row, col + 3, row, col + 4, - rec[0]['move_name'], - txt_name) - sheet.merge_range(row, col + 5, row, col + 6, - rec[0]['date_maturity'], - txt_name) - sheet.merge_range(row, col + 7, row, col + 8, - rec[0]['debit'], txt_name) - sheet.merge_range(row, col + 9, row, col + 10, - rec[0]['credit'], txt_name) - sheet.merge_range(row, col + 11, row, col + 12, ' ', - txt_name) - row += 1 - sheet.merge_range(row, col, row, col + 6, 'Total', filter_head) - sheet.merge_range(row, col + 7, row, col + 8, - data['grand_total']['total_debit'], - filter_head) - sheet.merge_range(row, col + 9, row, col + 10, - data['grand_total']['total_credit'], - filter_head) - sheet.merge_range(row, col + 11, row, col + 12, - data['grand_total']['total_debit'] - - data['grand_total']['total_credit'], - filter_head) + sheet.merge_range(row, col + 3, row, col + 4, 'Initial Balance', head_highlight) + sheet.merge_range(row, col + 5, row, col + 6, ' ', txt_name) + sheet.merge_range(row, col + 7, row, col + 8, format_number(initial_debit), txt_name) + sheet.merge_range(row, col + 9, row, col + 10, format_number(initial_credit), txt_name) + sheet.merge_range(row, col + 11, row, col + 12, format_number(initial_balance), txt_name) + + # Process move lines for the partner + for rec in data['data'][partner]: + row += 1 + sheet.write(row, col, rec[0]['date'], txt_name) + sheet.write(row, col + 1, rec[0]['jrnl'], txt_name) + sheet.write(row, col + 2, rec[0]['code'], txt_name) + sheet.merge_range(row, col + 3, row, col + 4, rec[0]['move_name'], txt_name) + sheet.merge_range(row, col + 5, row, col + 6, rec[0]['date_maturity'] or '', txt_name) + sheet.merge_range(row, col + 7, row, col + 8, format_number(rec[0]['debit']), txt_name) + sheet.merge_range(row, col + 9, row, col + 10, format_number(rec[0]['credit']), txt_name) + sheet.merge_range(row, col + 11, row, col + 12, ' ', txt_name) + + # Grand totals + row += 1 + # Ensure grand_total values are numbers + grand_total_debit = data['grand_total']['total_debit'] if data['grand_total'] and data['grand_total'][ + 'total_debit'] is not None else 0 + grand_total_credit = data['grand_total']['total_credit'] if data['grand_total'] and data['grand_total'][ + 'total_credit'] is not None else 0 + grand_balance = grand_total_debit - grand_total_credit + + sheet.merge_range(row, col, row, col + 6, 'Total', filter_head) + sheet.merge_range(row, col + 7, row, col + 8, format_number(grand_total_debit), filter_head) + sheet.merge_range(row, col + 9, row, col + 10, format_number(grand_total_credit), filter_head) + sheet.merge_range(row, col + 11, row, col + 12, format_number(grand_balance), filter_head) + workbook.close() output.seek(0) response.stream.write(output.read()) - output.close() + output.close() \ No newline at end of file diff --git a/dynamic_accounts_report/models/account_trial_balance.py b/dynamic_accounts_report/models/account_trial_balance.py index 5dd50f778..d3117e49b 100644 --- a/dynamic_accounts_report/models/account_trial_balance.py +++ b/dynamic_accounts_report/models/account_trial_balance.py @@ -77,14 +77,13 @@ class AccountTrialBalance(models.TransientModel): data = { 'account': account_id.display_name, 'account_id': account_id.id, - 'journal_ids': self.env['account.journal'].search_read([], [ - 'name']), - 'initial_total_debit': initial_total_debit, - 'initial_total_credit': initial_total_credit, + 'journal_ids': self.env['account.journal'].search_read([], ['name']), + 'initial_total_debit': "{:,.2f}".format(initial_total_debit), + 'initial_total_credit': "{:,.2f}".format(initial_total_credit), 'total_debit': total_debit, 'total_credit': total_credit, - 'end_total_debit': end_total_debit, - 'end_total_credit': end_total_credit + 'end_total_debit': "{:,.2f}".format(end_total_debit), + 'end_total_credit': "{:,.2f}".format(end_total_credit) } move_line_list.append(data) journal = { @@ -422,7 +421,7 @@ class AccountTrialBalance(models.TransientModel): if data: if report_action == 'dynamic_accounts_report.action_trial_balance': row = 11 - for move_line in data['data']: + for move_line in data['data'][0]: sheet.write(row, col, move_line['account'], side_heading_sub) sheet.write(row, col + 1, move_line['initial_total_debit'], @@ -450,4 +449,4 @@ class AccountTrialBalance(models.TransientModel): workbook.close() output.seek(0) response.stream.write(output.read()) - output.close() + output.close() \ No newline at end of file diff --git a/dynamic_accounts_report/models/aged_payable_report.py b/dynamic_accounts_report/models/aged_payable_report.py index 63e35aade..7aa401cf5 100644 --- a/dynamic_accounts_report/models/aged_payable_report.py +++ b/dynamic_accounts_report/models/aged_payable_report.py @@ -255,8 +255,7 @@ class AgePayableReport(models.TransientModel): txt_name) for rec in data['data'][move_line]: row += 1 - sheet.write(row, col, rec['move_name'] + rec['name'], - txt_name) + sheet.write(row, col, rec['move_name'] + (rec['name'] or ""), txt_name) sheet.write(row, col + 1, rec['date'], txt_name) sheet.write(row, col + 2, rec['amount_currency'], diff --git a/dynamic_accounts_report/models/aged_receivable_report.py b/dynamic_accounts_report/models/aged_receivable_report.py index 037a57060..2efa6ce66 100644 --- a/dynamic_accounts_report/models/aged_receivable_report.py +++ b/dynamic_accounts_report/models/aged_receivable_report.py @@ -35,9 +35,9 @@ class AgeReceivableReport(models.TransientModel): def view_report(self): """ Generate a report with move line data categorized by partner and debit - difference.This method retrieves move line data from the + difference. This method retrieves move line data from the 'account.move.line' model, filters the records based on specific - criteria (parent_state, account_type, reconciled),and categorizes the + criteria (parent_state, account_type, reconciled), and categorizes the data by each partner's name. For each move line, it calculates the debit difference based on the number of days between today's date and the maturity date of the move line. @@ -56,6 +56,11 @@ class AgeReceivableReport(models.TransientModel): currency_id = self.env.company.currency_id.symbol partner_ids = paid.mapped('partner_id') today = fields.Date.today() + + # Define a helper function to format numbers with thousand separators + def format_number(value): + return "{:,.2f}".format(value) # Adds thousand separator and 2 decimal places + for partner_id in partner_ids: move_line_ids = paid.filtered( lambda rec: rec.partner_id in partner_id) @@ -63,29 +68,51 @@ class AgeReceivableReport(models.TransientModel): ['name', 'move_name', 'date', 'amount_currency', 'account_id', 'date_maturity', 'currency_id', 'debit', 'move_id']) for val in move_line_data: + difference = 0 # Initialize difference to avoid undefined variable if val['date_maturity']: - diffrence = (today - val['date_maturity']).days - val['diff0'] = val['debit'] if diffrence <= 0 else 0.0 - val['diff1'] = val['debit'] if 0 < diffrence <= 30 else 0.0 - val['diff2'] = val['debit'] if 30 < diffrence <= 60 else 0.0 - val['diff3'] = val['debit'] if 60 < diffrence <= 90 else 0.0 - val['diff4'] = val['debit'] if 90 < diffrence <= 120 else 0.0 - val['diff5'] = val['debit'] if diffrence > 120 else 0.0 + difference = (today - val['date_maturity']).days + # Keep raw numeric values for calculations + val['raw_amount_currency'] = val['amount_currency'] + val['raw_debit'] = val['debit'] + val['diff0'] = val['debit'] if difference <= 0 else 0.0 + val['diff1'] = val['debit'] if 0 < difference <= 30 else 0.0 + val['diff2'] = val['debit'] if 30 < difference <= 60 else 0.0 + val['diff3'] = val['debit'] if 60 < difference <= 90 else 0.0 + val['diff4'] = val['debit'] if 90 < difference <= 120 else 0.0 + val['diff5'] = val['debit'] if difference > 120 else 0.0 + # Keep raw values for diff fields + val['raw_diff0'] = val['diff0'] + val['raw_diff1'] = val['diff1'] + val['raw_diff2'] = val['diff2'] + val['raw_diff3'] = val['diff3'] + val['raw_diff4'] = val['diff4'] + val['raw_diff5'] = val['diff5'] + # Format the numeric fields for display + val['amount_currency'] = format_number(val['amount_currency']) + val['debit'] = format_number(val['debit']) + val['diff0'] = format_number(val['diff0']) + val['diff1'] = format_number(val['diff1']) + val['diff2'] = format_number(val['diff2']) + val['diff3'] = format_number(val['diff3']) + val['diff4'] = format_number(val['diff4']) + val['diff5'] = format_number(val['diff5']) move_line_list[partner_id.name] = move_line_data partner_total[partner_id.name] = { - 'debit_sum': sum(val['debit'] for val in move_line_data), - 'diff0_sum': round(sum(val['diff0'] for val in move_line_data), - 2), - 'diff1_sum': round(sum(val['diff1'] for val in move_line_data), - 2), - 'diff2_sum': round(sum(val['diff2'] for val in move_line_data), - 2), - 'diff3_sum': round(sum(val['diff3'] for val in move_line_data), - 2), - 'diff4_sum': round(sum(val['diff4'] for val in move_line_data), - 2), - 'diff5_sum': round(sum(val['diff5'] for val in move_line_data), - 2), + 'debit_sum': sum(val['raw_debit'] for val in move_line_data), + 'diff0_sum': round(sum(val['raw_diff0'] for val in move_line_data), 2), + 'diff1_sum': round(sum(val['raw_diff1'] for val in move_line_data), 2), + 'diff2_sum': round(sum(val['raw_diff2'] for val in move_line_data), 2), + 'diff3_sum': round(sum(val['raw_diff3'] for val in move_line_data), 2), + 'diff4_sum': round(sum(val['raw_diff4'] for val in move_line_data), 2), + 'diff5_sum': round(sum(val['raw_diff5'] for val in move_line_data), 2), + # Format the summary fields for display + 'debit_sum_display': format_number(sum(val['raw_debit'] for val in move_line_data)), + 'diff0_sum_display': format_number(round(sum(val['raw_diff0'] for val in move_line_data), 2)), + 'diff1_sum_display': format_number(round(sum(val['raw_diff1'] for val in move_line_data), 2)), + 'diff2_sum_display': format_number(round(sum(val['raw_diff2'] for val in move_line_data), 2)), + 'diff3_sum_display': format_number(round(sum(val['raw_diff3'] for val in move_line_data), 2)), + 'diff4_sum_display': format_number(round(sum(val['raw_diff4'] for val in move_line_data), 2)), + 'diff5_sum_display': format_number(round(sum(val['raw_diff5'] for val in move_line_data), 2)), 'currency_id': currency_id, 'partner_id': partner_id.id } @@ -166,7 +193,7 @@ class AgeReceivableReport(models.TransientModel): @api.model def get_xlsx_report(self, data, response, report_name, report_action): """ - Generate an Excel report based on the provided data. + Generate an Excel report based on the provided data with thousand separators. :param data: The data used to generate the report. :type data: str (JSON format) @@ -204,6 +231,14 @@ class AgeReceivableReport(models.TransientModel): side_heading_sub.set_indent(1) txt_name = workbook.add_format({'font_size': '10px', 'border': 1}) txt_name.set_indent(2) + # Define a number format with thousand separator + num_format = workbook.add_format({'font_size': '10px', 'border': 1, 'num_format': '#,##0.00'}) + num_format.set_indent(2) + # Define a number format for totals with thousand separator + total_num_format = workbook.add_format( + {'align': 'center', 'bold': True, 'font_size': '10px', + 'border': 1, 'bg_color': '#D3D3D3', + 'border_color': 'black', 'num_format': '#,##0.00'}) sheet.set_column(0, 0, 30) sheet.set_column(1, 1, 20) sheet.set_column(2, 2, 15) @@ -249,25 +284,25 @@ class AgeReceivableReport(models.TransientModel): txt_name) sheet.write(row, col + 8, data['total'][move_line]['diff0_sum'], - txt_name) + num_format) sheet.write(row, col + 9, data['total'][move_line]['diff1_sum'], - txt_name) + num_format) sheet.write(row, col + 10, data['total'][move_line]['diff2_sum'], - txt_name) + num_format) sheet.write(row, col + 11, data['total'][move_line]['diff3_sum'], - txt_name) + num_format) sheet.write(row, col + 12, data['total'][move_line]['diff4_sum'], - txt_name) + num_format) sheet.write(row, col + 13, data['total'][move_line]['diff5_sum'], - txt_name) + num_format) sheet.write(row, col + 14, data['total'][move_line]['debit_sum'], - txt_name) + num_format) for rec in data['data'][move_line]: row += 1 if not rec['name']: @@ -277,7 +312,7 @@ class AgeReceivableReport(models.TransientModel): sheet.write(row, col + 1, rec['date'], txt_name) sheet.write(row, col + 2, rec['amount_currency'], - txt_name) + num_format) sheet.write(row, col + 3, rec['currency_id'][1], txt_name) sheet.merge_range(row, col + 4, row, col + 5, @@ -286,38 +321,38 @@ class AgeReceivableReport(models.TransientModel): sheet.merge_range(row, col + 6, row, col + 7, rec['date_maturity'], txt_name) - sheet.write(row, col + 8, rec['diff0'], txt_name) - sheet.write(row, col + 9, rec['diff1'], txt_name) - sheet.write(row, col + 10, rec['diff2'], txt_name) - sheet.write(row, col + 11, rec['diff3'], txt_name) - sheet.write(row, col + 12, rec['diff4'], txt_name) - sheet.write(row, col + 13, rec['diff5'], txt_name) + sheet.write(row, col + 8, rec['diff0'], num_format) + sheet.write(row, col + 9, rec['diff1'], num_format) + sheet.write(row, col + 10, rec['diff2'], num_format) + sheet.write(row, col + 11, rec['diff3'], num_format) + sheet.write(row, col + 12, rec['diff4'], num_format) + sheet.write(row, col + 13, rec['diff5'], num_format) sheet.write(row, col + 14, ' ', txt_name) sheet.merge_range(row + 1, col, row + 1, col + 7, 'Total', filter_head) sheet.write(row + 1, col + 8, data['grand_total']['diff0_sum'], - filter_head) + total_num_format) sheet.write(row + 1, col + 9, data['grand_total']['diff1_sum'], - filter_head) + total_num_format) sheet.write(row + 1, col + 10, data['grand_total']['diff2_sum'], - filter_head) + total_num_format) sheet.write(row + 1, col + 11, data['grand_total']['diff3_sum'], - filter_head) + total_num_format) sheet.write(row + 1, col + 12, data['grand_total']['diff4_sum'], - filter_head) + total_num_format) sheet.write(row + 1, col + 13, data['grand_total']['diff5_sum'], - filter_head) + total_num_format) sheet.write(row + 1, col + 14, data['grand_total']['total_debit'], - filter_head) + total_num_format) workbook.close() output.seek(0) response.stream.write(output.read()) - output.close() + output.close() \ No newline at end of file diff --git a/dynamic_accounts_report/models/bank_book_report.py b/dynamic_accounts_report/models/bank_book_report.py index 4c3f0fb6c..5fa8db34a 100644 --- a/dynamic_accounts_report/models/bank_book_report.py +++ b/dynamic_accounts_report/models/bank_book_report.py @@ -268,10 +268,10 @@ class BankBookReport(models.TransientModel): sheet.merge_range(row, col + 9, row, col + 10, ' ', txt_name) sheet.merge_range(row, col + 11, row, col + 12, - data['total'][move_line]['total_debit'], + data['total'][move_line]['total_debit_display'], txt_name) sheet.merge_range(row, col + 13, row, col + 14, - data['total'][move_line]['total_credit'], + data['total'][move_line]['total_credit_display'], txt_name) sheet.merge_range(row, col + 15, row, col + 16, data['total'][move_line]['total_debit'] - @@ -298,18 +298,18 @@ class BankBookReport(models.TransientModel): rec['name'], txt_name) sheet.merge_range(row, col + 11, row, col + 12, - rec['debit'], txt_name) + rec['debit_display'], txt_name) sheet.merge_range(row, col + 13, row, col + 14, - rec['credit'], txt_name) + rec['credit_display'], txt_name) sheet.merge_range(row, col + 15, row, col + 16, ' ', txt_name) sheet.merge_range(row + 1, col, row + 1, col + 10, 'Total', filter_head) sheet.merge_range(row + 1, col + 11, row + 1, col + 12, - data['grand_total']['total_debit'], + data['grand_total']['total_debit_display'], filter_head) sheet.merge_range(row + 1, col + 13, row + 1, col + 14, - data['grand_total']['total_credit'], + data['grand_total']['total_credit_display'], filter_head) sheet.merge_range(row + 1, col + 15, row + 1, col + 16, float(data['grand_total']['total_debit']) - diff --git a/dynamic_accounts_report/report/aged_receivable_templates.xml b/dynamic_accounts_report/report/aged_receivable_templates.xml index be7f6ff06..499cd14e6 100644 --- a/dynamic_accounts_report/report/aged_receivable_templates.xml +++ b/dynamic_accounts_report/report/aged_receivable_templates.xml @@ -93,7 +93,7 @@ + t-esc="total[move_line]['diff0_sum_display']"/> @@ -101,7 +101,7 @@ + t-esc="total[move_line]['diff1_sum_display']"/> @@ -141,7 +141,7 @@ + t-esc="total[move_line]['debit_sum_display']"/> @@ -243,31 +243,31 @@ Total - + - + - + - + - + - + - + diff --git a/dynamic_accounts_report/report/bank_book_templates.xml b/dynamic_accounts_report/report/bank_book_templates.xml index a69d5e349..8505880e4 100644 --- a/dynamic_accounts_report/report/bank_book_templates.xml +++ b/dynamic_accounts_report/report/bank_book_templates.xml @@ -120,7 +120,7 @@ + t-esc="total[move_line]['total_debit_display']"/> @@ -130,7 +130,7 @@ + t-esc="total[move_line]['total_credit_display']"/> @@ -187,7 +187,7 @@ + t-esc="valuelist['debit_display']"/> @@ -195,7 +195,7 @@ + t-esc="valuelist['credit_display']"/> @@ -211,11 +211,11 @@ Total - + - + diff --git a/dynamic_accounts_report/report/general_ledger_templates.xml b/dynamic_accounts_report/report/general_ledger_templates.xml index a98423b7b..d56dce9e0 100644 --- a/dynamic_accounts_report/report/general_ledger_templates.xml +++ b/dynamic_accounts_report/report/general_ledger_templates.xml @@ -76,9 +76,9 @@

- + + + @@ -93,6 +93,9 @@ + - @@ -173,7 +176,7 @@ +
@@ -101,7 +104,7 @@ - + @@ -119,33 +122,33 @@ - - + + - - + + - - + +
+ t-esc="total[account]['currency_id']"/> @@ -181,7 +184,7 @@ + t-esc="total[account]['currency_id']"/> @@ -189,9 +192,10 @@
-
+
@@ -199,15 +203,19 @@ diff --git a/dynamic_accounts_report/report/partner_ledger_templates.xml b/dynamic_accounts_report/report/partner_ledger_templates.xml index a5a089831..a40ebd282 100644 --- a/dynamic_accounts_report/report/partner_ledger_templates.xml +++ b/dynamic_accounts_report/report/partner_ledger_templates.xml @@ -118,7 +118,7 @@ + t-esc="total[partner]['total_debit_display']"/> @@ -128,7 +128,7 @@ + t-esc="total[partner]['total_credit_display']"/> @@ -228,7 +228,7 @@ + t-esc="valuelist[0]['debit_display']"/> diff --git a/dynamic_accounts_report/report/trial_balance.xml b/dynamic_accounts_report/report/trial_balance.xml index 91dd04d18..f59c6a136 100644 --- a/dynamic_accounts_report/report/trial_balance.xml +++ b/dynamic_accounts_report/report/trial_balance.xml @@ -112,7 +112,7 @@ - @@ -169,4 +169,4 @@ - + \ No newline at end of file diff --git a/dynamic_accounts_report/static/description/assets/icons/blog-icon.png b/dynamic_accounts_report/static/description/assets/icons/blog-icon.png deleted file mode 100644 index ba4c7c366..000000000 Binary files a/dynamic_accounts_report/static/description/assets/icons/blog-icon.png and /dev/null differ diff --git a/dynamic_accounts_report/static/description/assets/icons/copylink.svg b/dynamic_accounts_report/static/description/assets/icons/copylink.svg deleted file mode 100644 index 3b67f60e0..000000000 --- a/dynamic_accounts_report/static/description/assets/icons/copylink.svg +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dynamic_accounts_report/static/description/assets/icons/whatsapp.svg b/dynamic_accounts_report/static/description/assets/icons/whatsapp.svg deleted file mode 100644 index bba9ca395..000000000 --- a/dynamic_accounts_report/static/description/assets/icons/whatsapp.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/dynamic_accounts_report/static/description/assets/icons/youtube-icon.png b/dynamic_accounts_report/static/description/assets/icons/youtube-icon.png deleted file mode 100644 index f206560dc..000000000 Binary files a/dynamic_accounts_report/static/description/assets/icons/youtube-icon.png and /dev/null differ diff --git a/dynamic_accounts_report/static/description/index.html b/dynamic_accounts_report/static/description/index.html index adeb53257..5a07f9781 100644 --- a/dynamic_accounts_report/static/description/index.html +++ b/dynamic_accounts_report/static/description/index.html @@ -91,40 +91,10 @@ -
-
-
-
-
-
- Supports: -
- Community -
- - - - -
-
-
-
- Availability: -
- On Premise -
-
- Odoo Online -
-
- Odoo.sh -
-
-
+
+
+ Community
@@ -175,10 +145,9 @@ font-family: Montserrat; display: inline-block; padding: 7px 33px; - border: 1px solid #7f54b3; - color: #7f54b3; + border: 1px solid var(--primary-color); + color: var(--primary-color); text-decoration: none; - width: 231px; " class="mx-1 mb-2 deep-1 deep_hover"> Email Us + >Email Us Skype Us - - - - - +91 9074270811 + >Skype Us
@@ -243,115 +188,16 @@ style="z-index: 3; height: auto;">
-
+
-
+
- - - -
-

- Blog and Video Details -

-
-
-
-
- -
-

Read - Blog

-

Read Our Detailed - Blog

-
-
- -
-

- https://www.cybrosys.com/blog/what-are-the-key-features-and-benefits-of-odoo-18-dynamic-accounting-reports -

-
-
-
-
-
-
- -
-

- Video Tutorial

-

Watch Detailed Demo on - Youtube

- Watch - Demo -
-
-
-
- - - - -
-
-
- Odoo18 Dynamic Accounting Reports -

- Are you ready to make your business more - organized? -
Improve now! -

- -
-
- -
-
-
- - - - -
+
+
+ Odoo18 Dynamic Accounting Reports +

+ Are you ready to make your business more + organized? +
Improve now! +

+ +
+
+ +
+
+
+ +
+

@@ -1374,7 +1270,7 @@

-

+

-

+

- Print reports in XLSX Format. + Print reports in XLSX Format.

@@ -1859,8 +1755,7 @@ aria-controls="collapseFAQOne" style="cursor: pointer; background-color:#f8f8f8; border:none; border-top-right-radius:10px; border-top-left-radius:10px; padding: 12px 24px;"> Is - it possible to apply filters to the reports? + style=" font-size:18px; line-height:30px; font-weight:500; color:#040f3a">Is it possible to apply filters to the reports? { currency = account_list.currency_id totalDebitSum += account_list.total_debit || 0; + account_list.total_debit_display = this.formatNumberWithSeparators(account_list.total_debit || 0); totalCreditSum += account_list.total_credit || 0; + account_list.total_credit_display = this.formatNumberWithSeparators(account_list.total_credit || 0); + let balance = account_list.total_debit - account_list.total_credit; + account_list.balance_display = this.formatNumberWithSeparators(balance); }); } - }) + } self.state.account = account_list self.state.account_list = account_list self.state.account_data_list = self.state.account_data @@ -79,7 +95,9 @@ class GeneralLedger extends owl.Component { self.state.account_total = account_totals self.state.currency = currency self.state.total_debit = totalDebitSum.toFixed(2) + self.state.total_debit_display = this.formatNumberWithSeparators(self.state.total_debit) self.state.total_credit = totalCreditSum.toFixed(2) + self.state.total_credit_display = this.formatNumberWithSeparators(self.state.total_credit) self.state.title = action_title } catch (el) { @@ -90,9 +108,11 @@ class GeneralLedger extends owl.Component { ev.preventDefault(); var self = this; let totals = { - 'total_debit':this.state.total_debit, - 'total_credit':this.state.total_credit, - 'currency':this.state.currency, + 'total_debit':this.state.total_debit || false, + 'total_debit_display':this.state.total_debit_display || false, + 'total_credit':this.state.total_credit || false, + 'total_credit_display':this.state.total_credit_display || false, + 'currency':this.state.currency || false, } var action_title = self.props.action.display_name; return self.action.doAction({ @@ -102,7 +122,7 @@ class GeneralLedger extends owl.Component { 'report_file': 'dynamic_accounts_report.general_ledger', 'data': { 'account': self.state.account, - 'data': self.state.account_data, + 'account_data': self.state.account_data, 'total': self.state.account_total, 'title': action_title, 'filters': this.filter(), @@ -116,7 +136,9 @@ class GeneralLedger extends owl.Component { var self = this; let totals = { 'total_debit':this.state.total_debit, + 'total_debit_display':this.state.total_debit_display || false, 'total_credit':this.state.total_credit, + 'total_credit_display':this.state.total_credit_display || false, 'currency':this.state.currency, } var action_title = self.props.action.display_name; diff --git a/dynamic_accounts_report/static/src/js/partner_ledger.js b/dynamic_accounts_report/static/src/js/partner_ledger.js index 112e98b0f..1a4e2583f 100644 --- a/dynamic_accounts_report/static/src/js/partner_ledger.js +++ b/dynamic_accounts_report/static/src/js/partner_ledger.js @@ -26,6 +26,7 @@ class PartnerLedger extends owl.Component { selected_partner: [], selected_partner_rec: [], total_debit: null, + total_debit_display:null, total_credit: null, partner_list: null, total_list: null, @@ -35,8 +36,19 @@ class PartnerLedger extends owl.Component { message_list : [], }); this.load_data(self.initial_render = true); + } + formatNumberWithSeparators(number) { + const parsedNumber = parseFloat(number); + if (isNaN(parsedNumber)) { + return "0.00"; // Fallback to 0.00 if the input is invalid + } + return parsedNumber.toLocaleString('en-US', { + minimumFractionDigits: 2, + maximumFractionDigits: 2 + }); } + async load_data() { /** * Loads the data for the partner ledger report. @@ -51,27 +63,35 @@ class PartnerLedger extends owl.Component { try { var self = this; self.state.data = await self.orm.call("account.partner.ledger", "view_report", [[this.wizard_id], action_title,]); - // Extract partner information from the data - $.each(self.state.data, function (index, value) { - if (index !== 'partner_totals') { - partner_list.push(index) - } - else { - partner_totals = value - Object.values(partner_totals).forEach(partner_list => { - currency = partner_list.currency_id - totalDebitSum += partner_list.total_debit || 0; - totalCreditSum += partner_list.total_credit || 0; - }); - } - }) + const dataArray = self.state.data; + Object.entries(dataArray).forEach(([key, value]) => { + if (key !== 'partner_totals') { + partner_list.push(key); + value.forEach(entry => { + entry[0].debit_display = this.formatNumberWithSeparators(entry[0].debit || 0); + entry[0].credit_display = this.formatNumberWithSeparators(entry[0].credit || 0); + entry[0].amount_currency_display = this.formatNumberWithSeparators(entry[0].amount_currency || 0); + }); + } else { + partner_totals = value; + } + }); + Object.values(partner_totals).forEach(partner => { + currency = partner.currency_id; + totalDebitSum += partner.total_debit || 0; + totalCreditSum += partner.total_credit || 0; + partner.total_debit_display = this.formatNumberWithSeparators(partner.total_debit || 0) + partner.total_credit_display = this.formatNumberWithSeparators(partner.total_credit || 0) + }); self.state.partners = partner_list self.state.partner_list = partner_list self.state.total_list = partner_totals self.state.total = partner_totals self.state.currency = currency self.state.total_debit = totalDebitSum + self.state.total_debit_display = this.formatNumberWithSeparators(self.state.total_debit || 0) self.state.total_credit = totalCreditSum + self.state.total_credit_display = this.formatNumberWithSeparators(self.state.total_credit || 0) self.state.title = action_title } catch (el) { @@ -91,7 +111,9 @@ class PartnerLedger extends owl.Component { let partner_totals = '' let totals = { 'total_debit':this.state.total_debit, + 'total_debit_display':this.state.total_debit_display, 'total_credit':this.state.total_credit, + 'total_credit_display':this.state.total_credit_display, 'currency':this.state.currency, } var action_title = this.props.action.display_name; diff --git a/dynamic_accounts_report/static/src/js/trial_balance.js b/dynamic_accounts_report/static/src/js/trial_balance.js index 3a4e049e1..c9014b12c 100644 --- a/dynamic_accounts_report/static/src/js/trial_balance.js +++ b/dynamic_accounts_report/static/src/js/trial_balance.js @@ -26,6 +26,7 @@ class TrialBalance extends owl.Component { data: null, total: null, journals: null, + accounts: null, selected_analytic: [], analytic_account: null, selected_journal_list: [], @@ -61,6 +62,7 @@ class TrialBalance extends owl.Component { self.end_date.el.value = endOfMonth.getFullYear() + '-' + String(endOfMonth.getMonth() + 1).padStart(2, '0') + '-' + String(endOfMonth.getDate()).padStart(2, '0'); self.state.date_viewed.push(monthNamesShort[today.getMonth()] + ' ' + today.getFullYear()) self.state.journals = self.state.data[1]['journal_ids'] + self.state.accounts = self.state.data[0] $.each(self.state.data, function (index, value) { self.state.journals = value.journal_ids }) @@ -242,20 +244,22 @@ class TrialBalance extends owl.Component { } this.state.data = await this.orm.call("account.trial.balance", "get_filter_values", [this.start_date.el.value, this.end_date.el.value, this.state.comparison_number, this.state.comparison_type, this.state.selected_journal_list, this.state.selected_analytic, this.state.options,this.state.method,]); var date_viewed = [] - this.state.data.forEach((value, index) => { - if (index == 'journal_ids') { - this.state.journals = value - } - if (value.dynamic_date_num) { - let iterable = Array.isArray(value.dynamic_date_num) ? value.dynamic_date_num - : Object.values(value.dynamic_date_num); - for (const date_num of iterable) { - if (!date_viewed.includes(date_num)) { - date_viewed.push(date_num); - } - } - } - }) +// this.state.data.forEach((value, index) => { +// console.log(index) +// if (index == 'journal_ids') { +// this.state.journals = value +// console.log(this.state.journals) +// } +// if (value.dynamic_date_num) { +// let iterable = Array.isArray(value.dynamic_date_num) ? value.dynamic_date_num +// : Object.values(value.dynamic_date_num); +// for (const date_num of iterable) { +// if (!date_viewed.includes(date_num)) { +// date_viewed.push(date_num); +// } +// } +// } +// }) if (date_viewed.length !== 0) { this.state.date_viewed = date_viewed.reverse() } @@ -307,14 +311,15 @@ class TrialBalance extends owl.Component { this.applyFilter(null, ev) } sumByKey(data, key) { - /** - * Calculates the sum of values in an array of objects by a specified key. - * - * @param {Array} data - Array of objects containing numeric values. - * @param {string} key - The key to access the numeric value in each object. - * @returns {number} The sum of the numeric values. - */ - return data.reduce((acc, item) => acc + (item[key] || 0), 0); + if (!Array.isArray(data)) return 0; + return data.reduce((acc, item) => { + let raw = item[key]; + if (typeof raw === 'string') { + raw = raw.replace(/,/g, ''); // remove commas + } + const val = parseFloat(raw); + return acc + (isNaN(val) ? 0 : val); + }, 0); } get comparison_number_range() { /** @@ -527,4 +532,4 @@ class TrialBalance extends owl.Component { } } TrialBalance.template = 'trl_b_template_new'; -actionRegistry.add("trl_b", TrialBalance); +actionRegistry.add("trl_b", TrialBalance); \ No newline at end of file diff --git a/dynamic_accounts_report/static/src/xml/aged_receivable_report_views.xml b/dynamic_accounts_report/static/src/xml/aged_receivable_report_views.xml index 53a73c3ea..64b6ae51e 100644 --- a/dynamic_accounts_report/static/src/xml/aged_receivable_report_views.xml +++ b/dynamic_accounts_report/static/src/xml/aged_receivable_report_views.xml @@ -191,7 +191,7 @@ + t-esc="state.total[move_line]['diff0_sum_display']"/>
@@ -250,8 +250,13 @@ t-attf-id="move_line-{{i}}"> diff --git a/dynamic_accounts_report/static/src/xml/bank_flow_templates.xml b/dynamic_accounts_report/static/src/xml/bank_flow_templates.xml index ee5177a25..e2bc09f88 100644 --- a/dynamic_accounts_report/static/src/xml/bank_flow_templates.xml +++ b/dynamic_accounts_report/static/src/xml/bank_flow_templates.xml @@ -238,7 +238,7 @@ + t-esc="state.total[move_line]['total_debit_display']"/> @@ -320,7 +320,7 @@ + t-esc="valuelist['debit_display']"/> @@ -342,11 +342,11 @@ - + + + - @@ -293,7 +295,7 @@ + @@ -375,7 +378,7 @@ @@ -442,11 +442,11 @@ - @@ -369,19 +369,19 @@ @@ -389,10 +389,10 @@ style="border-spacing: 0 10px;color:#000"> @@ -429,4 +429,4 @@ - + \ No newline at end of file
Total - + + + - + + +
@@ -236,7 +236,7 @@ + t-esc="valuelist[0]['credit_display']"/> @@ -244,7 +244,7 @@ + t-esc="valuelist[0]['amount_currency_display']"/> @@ -260,16 +260,18 @@ Total - + - + + +
@@ -199,7 +199,7 @@ + t-esc="state.total[move_line]['diff1_sum_display']"/> @@ -207,7 +207,7 @@ + t-esc="state.total[move_line]['diff2_sum_display']"/> @@ -215,7 +215,7 @@ + t-esc="state.total[move_line]['diff3_sum_display']"/> @@ -223,7 +223,7 @@ + t-esc="state.total[move_line]['diff4_sum_display']"/> @@ -231,7 +231,7 @@ + t-esc="state.total[move_line]['diff5_sum_display']"/> @@ -239,7 +239,7 @@ + t-esc="state.total[move_line]['debit_sum_display']"/>
+ + - + + + + @@ -359,31 +364,31 @@ - + - + - + - + - + - + - +
@@ -246,13 +246,13 @@ + t-esc="state.total[move_line]['total_credit_display']"/> - +
@@ -328,7 +328,7 @@ + t-esc="valuelist['credit_display']"/>
- + - + diff --git a/dynamic_accounts_report/static/src/xml/cash_flow_templates.xml b/dynamic_accounts_report/static/src/xml/cash_flow_templates.xml index e845e08b9..cd690ef0f 100644 --- a/dynamic_accounts_report/static/src/xml/cash_flow_templates.xml +++ b/dynamic_accounts_report/static/src/xml/cash_flow_templates.xml @@ -131,7 +131,6 @@
- - - + + - - + + - - + +
+ t-esc="state.account_data.account_totals[account]['currency_id']"/> @@ -383,7 +386,7 @@ + t-esc="state.account_data.account_totals[account]['currency_id']"/> @@ -400,11 +403,11 @@ - + - + diff --git a/dynamic_accounts_report/static/src/xml/partner_ledger_view.xml b/dynamic_accounts_report/static/src/xml/partner_ledger_view.xml index 8da9ab218..2ff785a5f 100644 --- a/dynamic_accounts_report/static/src/xml/partner_ledger_view.xml +++ b/dynamic_accounts_report/static/src/xml/partner_ledger_view.xml @@ -284,7 +284,7 @@ + t-esc="state.total[partner]['total_debit_display']"/> @@ -292,7 +292,7 @@ + t-esc="state.total[partner]['total_credit_display']"/> @@ -412,7 +412,7 @@ + t-esc="valuelist[0]['debit_display']"/> @@ -420,7 +420,7 @@ + t-esc="valuelist[0]['credit_display']"/> @@ -428,7 +428,7 @@ + t-esc="valuelist[0]['amount_currency_display']"/>
- + - + diff --git a/dynamic_accounts_report/static/src/xml/trial_balance_view.xml b/dynamic_accounts_report/static/src/xml/trial_balance_view.xml index dc2a801b9..69b8ac617 100644 --- a/dynamic_accounts_report/static/src/xml/trial_balance_view.xml +++ b/dynamic_accounts_report/static/src/xml/trial_balance_view.xml @@ -312,7 +312,7 @@
+ t-esc="move_line['total_debit']"/> + t-esc="move_line['total_credit']"/> + t-esc="move_line['end_total_debit']"/> + t-esc="move_line['end_total_credit']"/>
Total - + - + - + - + - + - + - + - +