Browse Source

Jun 18: [FIX] Bug Fixed 'dynamic_accounts_report'

pull/358/merge
Cybrosys Technologies 2 weeks ago
parent
commit
064275a56b
  1. 3
      dynamic_accounts_report/__manifest__.py
  2. 5
      dynamic_accounts_report/doc/RELEASE_NOTES.md
  3. 12
      dynamic_accounts_report/models/account_general_ledger.py
  4. 163
      dynamic_accounts_report/models/account_partner_ledger.py
  5. 13
      dynamic_accounts_report/models/account_trial_balance.py
  6. 3
      dynamic_accounts_report/models/aged_payable_report.py
  7. 123
      dynamic_accounts_report/models/aged_receivable_report.py
  8. 12
      dynamic_accounts_report/models/bank_book_report.py
  9. 20
      dynamic_accounts_report/report/aged_receivable_templates.xml
  10. 12
      dynamic_accounts_report/report/bank_book_templates.xml
  11. 48
      dynamic_accounts_report/report/general_ledger_templates.xml
  12. 16
      dynamic_accounts_report/report/partner_ledger_templates.xml
  13. 2
      dynamic_accounts_report/report/trial_balance.xml
  14. BIN
      dynamic_accounts_report/static/description/assets/icons/blog-icon.png
  15. 37
      dynamic_accounts_report/static/description/assets/icons/copylink.svg
  16. 14
      dynamic_accounts_report/static/description/assets/icons/whatsapp.svg
  17. BIN
      dynamic_accounts_report/static/description/assets/icons/youtube-icon.png
  18. 229
      dynamic_accounts_report/static/description/index.html
  19. 45
      dynamic_accounts_report/static/src/js/aged_receivable_report.js
  20. 40
      dynamic_accounts_report/static/src/js/bank_flow.js
  21. 2
      dynamic_accounts_report/static/src/js/cash_flow.js
  22. 34
      dynamic_accounts_report/static/src/js/general_ledger.js
  23. 46
      dynamic_accounts_report/static/src/js/partner_ledger.js
  24. 49
      dynamic_accounts_report/static/src/js/trial_balance.js
  25. 35
      dynamic_accounts_report/static/src/xml/aged_receivable_report_views.xml
  26. 14
      dynamic_accounts_report/static/src/xml/bank_flow_templates.xml
  27. 1
      dynamic_accounts_report/static/src/xml/cash_flow_templates.xml
  28. 37
      dynamic_accounts_report/static/src/xml/general_ledger_view.xml
  29. 14
      dynamic_accounts_report/static/src/xml/partner_ledger_view.xml
  30. 26
      dynamic_accounts_report/static/src/xml/trial_balance_view.xml

3
dynamic_accounts_report/__manifest__.py

@ -21,9 +21,8 @@
################################################################################ ################################################################################
{ {
'name': 'Odoo18 Dynamic Accounting Reports', 'name': 'Odoo18 Dynamic Accounting Reports',
'version': '18.0.1.1.2', 'version': '18.0.1.2.3',
'category': 'Accounting', '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", '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" 'description': "This module creates dynamic Accounting General Ledger, Trial"
"Balance, Balance Sheet, Profit and Loss, Cash Book, Partner" "Balance, Balance Sheet, Profit and Loss, Cash Book, Partner"

5
dynamic_accounts_report/doc/RELEASE_NOTES.md

@ -14,3 +14,8 @@
#### Version 18.0.1.1.2 #### Version 18.0.1.1.2
#### UPDT #### UPDT
- Fixed the errors in the filters. - Fixed the errors in the filters.
#### 16.05.2025
#### Version 18.0.1.2.3
#### UPDT
- Bug Fixing and added thousand seperators

12
dynamic_accounts_report/models/account_general_ledger.py

@ -276,6 +276,7 @@ class AccountGeneralLedger(models.TransientModel):
sheet.merge_range('J9:K9', 'Credit', sub_heading) sheet.merge_range('J9:K9', 'Credit', sub_heading)
sheet.merge_range('L9:M9', 'Balance', sub_heading) sheet.merge_range('L9:M9', 'Balance', sub_heading)
row = 8 row = 8
if data['account']:
for account in data['account']: for account in data['account']:
row += 1 row += 1
sheet.write(row, col, account, txt_name) sheet.write(row, col, account, txt_name)
@ -284,14 +285,13 @@ class AccountGeneralLedger(models.TransientModel):
sheet.merge_range(row, col + 5, row, col + 6, ' ', sheet.merge_range(row, col + 5, row, col + 6, ' ',
txt_name) txt_name)
sheet.merge_range(row, col + 7, row, col + 8, sheet.merge_range(row, col + 7, row, col + 8,
data['total'][account]['total_debit'], data['total'][account]['total_debit_display'],
txt_name) txt_name)
sheet.merge_range(row, col + 9, row, col + 10, sheet.merge_range(row, col + 9, row, col + 10,
data['total'][account]['total_credit'], data['total'][account]['total_credit_display'],
txt_name) txt_name)
sheet.merge_range(row, col + 11, row, col + 12, sheet.merge_range(row, col + 11, row, col + 12,
data['total'][account]['total_debit'] - data['total'][account]['balance_display'],
data['total'][account]['total_credit'],
txt_name) txt_name)
for rec in data['data'][account]: for rec in data['data'][account]:
row += 1 row += 1
@ -314,10 +314,10 @@ class AccountGeneralLedger(models.TransientModel):
sheet.merge_range(row, col, row, col + 6, 'Total', sheet.merge_range(row, col, row, col + 6, 'Total',
filter_head) filter_head)
sheet.merge_range(row, col + 7, row, col + 8, sheet.merge_range(row, col + 7, row, col + 8,
data['grand_total']['total_debit'], data['grand_total']['total_debit_display'],
filter_head) filter_head)
sheet.merge_range(row, col + 9, row, col + 10, sheet.merge_range(row, col + 9, row, col + 10,
data['grand_total']['total_credit'], data['grand_total']['total_credit_display'],
filter_head) filter_head)
sheet.merge_range(row, col + 11, row, col + 12, sheet.merge_range(row, col + 11, row, col + 12,
float(data['grand_total']['total_debit']) - float(data['grand_total']['total_debit']) -

163
dynamic_accounts_report/models/account_partner_ledger.py

@ -361,60 +361,66 @@ class AccountPartnerLedger(models.TransientModel):
data = json.loads(data) data = json.loads(data)
output = io.BytesIO() output = io.BytesIO()
workbook = xlsxwriter.Workbook(output, {'in_memory': True}) workbook = xlsxwriter.Workbook(output, {'in_memory': True})
start_date = data['filters']['start_date'] if \ start_date = data['filters']['start_date'] if data['filters']['start_date'] else ''
data['filters']['start_date'] else '' end_date = data['filters']['end_date'] if data['filters']['end_date'] else ''
end_date = data['filters']['end_date'] if \
data['filters']['end_date'] else ''
sheet = workbook.add_worksheet() sheet = workbook.add_worksheet()
head = workbook.add_format(
{'font_size': 15, 'align': 'center', 'bold': True}) # Define formats
head_highlight = workbook.add_format( head = workbook.add_format({'font_size': 15, 'align': 'center', 'bold': True})
{'font_size': 10, 'align': 'center', 'bold': True}) head_highlight = workbook.add_format({'font_size': 10, 'align': 'center', 'bold': True})
sub_heading = workbook.add_format( sub_heading = workbook.add_format(
{'align': 'center', 'bold': True, 'font_size': '10px', {'align': 'center', 'bold': True, 'font_size': '10px', 'border': 1, 'bg_color': '#D3D3D3',
'border': 1, 'bg_color': '#D3D3D3',
'border_color': 'black'}) 'border_color': 'black'})
filter_head = workbook.add_format( filter_head = workbook.add_format(
{'align': 'center', 'bold': True, 'font_size': '10px', {'align': 'center', 'bold': True, 'font_size': '10px', 'border': 1, 'bg_color': '#D3D3D3',
'border': 1, 'bg_color': '#D3D3D3',
'border_color': 'black'}) 'border_color': 'black'})
filter_body = workbook.add_format( filter_body = workbook.add_format({'align': 'center', 'bold': True, 'font_size': '10px'})
{'align': 'center', 'bold': True, 'font_size': '10px'})
side_heading_sub = workbook.add_format( side_heading_sub = workbook.add_format(
{'align': 'left', 'bold': True, 'font_size': '10px', {'align': 'left', 'bold': True, 'font_size': '10px', 'border': 1, 'border_color': 'black'})
'border': 1,
'border_color': 'black'})
side_heading_sub.set_indent(1) side_heading_sub.set_indent(1)
txt_name = workbook.add_format({'font_size': '10px', 'border': 1}) txt_name = workbook.add_format({'font_size': '10px', 'border': 1})
txt_name.set_indent(2) txt_name.set_indent(2)
# Set column widths
sheet.set_column(0, 0, 30) sheet.set_column(0, 0, 30)
sheet.set_column(1, 1, 20) sheet.set_column(1, 1, 20)
sheet.set_column(2, 2, 15) sheet.set_column(2, 2, 15)
sheet.set_column(3, 3, 15) sheet.set_column(3, 3, 15)
# Write headers and filters
col = 0 col = 0
sheet.write('A1:b1', report_name, head) sheet.write('A1:B1', report_name, head)
sheet.write('B3:b4', 'Date Range', filter_head) sheet.write('B3:B4', 'Date Range', filter_head)
sheet.write('B4:b4', 'Partners', filter_head) sheet.write('B4:B4', 'Partners', filter_head)
sheet.write('B5:b4', 'Accounts', filter_head) sheet.write('B5:B4', 'Accounts', filter_head)
sheet.write('B6:b4', 'Options', filter_head) sheet.write('B6:B4', 'Options', filter_head)
if start_date or end_date: if start_date or end_date:
sheet.merge_range('C3:G3', f"{start_date} to {end_date}", sheet.merge_range('C3:G3', f"{start_date} to {end_date}", filter_body)
filter_body)
if data['filters']['partner']: if data['filters']['partner']:
display_names = [partner.get('display_name', 'undefined') for display_names = [partner.get('display_name', 'undefined') for partner in data['filters']['partner']]
partner in data['filters']['partner']]
display_names_str = ', '.join(display_names) display_names_str = ', '.join(display_names)
sheet.merge_range('C4:G4', display_names_str, filter_body) sheet.merge_range('C4:G4', display_names_str, filter_body)
if data['filters']['account']: if data['filters']['account']:
account_keys = list(data['filters']['account'].keys()) account_keys = list(data['filters']['account'].keys())
account_keys_str = ', '.join(account_keys) account_keys_str = ', '.join(account_keys)
sheet.merge_range('C5:G5', account_keys_str, filter_body) sheet.merge_range('C5:G5', account_keys_str, filter_body)
if data['filters']['options']: if data['filters']['options']:
option_keys = list(data['filters']['options'].keys()) option_keys = list(data['filters']['options'].keys())
option_keys_str = ', '.join(option_keys) option_keys_str = ', '.join(option_keys)
sheet.merge_range('C6:G6', option_keys_str, filter_body) sheet.merge_range('C6:G6', option_keys_str, filter_body)
if data:
if report_action == 'dynamic_accounts_report.action_partner_ledger': # 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, ' ', sub_heading)
sheet.write(8, col + 1, 'JNRL', sub_heading) sheet.write(8, col + 1, 'JNRL', sub_heading)
sheet.write(8, col + 2, 'Account', sub_heading) sheet.write(8, col + 2, 'Account', sub_heading)
@ -423,73 +429,72 @@ class AccountPartnerLedger(models.TransientModel):
sheet.merge_range('H9:I9', 'Debit', sub_heading) sheet.merge_range('H9:I9', 'Debit', sub_heading)
sheet.merge_range('J9:K9', 'Credit', sub_heading) sheet.merge_range('J9:K9', 'Credit', sub_heading)
sheet.merge_range('L9:M9', 'Balance', sub_heading) sheet.merge_range('L9:M9', 'Balance', sub_heading)
row = 8 row = 8
for partner in data['partners']: # Ensure data['partners'] is iterable; default to empty list if None
partners = data.get('partners', []) or []
for partner in partners:
row += 1 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, partner, txt_name)
sheet.write(row, col + 1, ' ', txt_name) sheet.write(row, col + 1, ' ', txt_name)
sheet.write(row, col + 2, ' ', txt_name) sheet.write(row, col + 2, ' ', txt_name)
sheet.merge_range(row, col + 3, row, col + 4, ' ', sheet.merge_range(row, col + 3, row, col + 4, ' ', txt_name)
txt_name) sheet.merge_range(row, col + 5, row, col + 6, ' ', txt_name)
sheet.merge_range(row, col + 5, row, col + 6, ' ', sheet.merge_range(row, col + 7, row, col + 8, format_number(total_debit), txt_name)
txt_name) sheet.merge_range(row, col + 9, row, col + 10, format_number(total_credit), txt_name)
sheet.merge_range(row, col + 7, row, col + 8, sheet.merge_range(row, col + 11, row, col + 12, format_number(balance), txt_name)
data['total'][partner]['total_debit'],
txt_name) # Handle initial balance
sheet.merge_range(row, col + 9, row, col + 10, initial_balance = data['total'][partner]['initial_balance'] if data['total'] and partner in data[
data['total'][partner]['total_credit'], 'total'] else 0
txt_name) if initial_balance != 0:
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 row += 1
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, '', txt_name)
sheet.write(row, col + 1, ' ', txt_name) sheet.write(row, col + 1, ' ', txt_name)
sheet.write(row, col + 2, ' ', txt_name) sheet.write(row, col + 2, ' ', txt_name)
sheet.merge_range(row, col + 3, row, col + 4, 'Initial Balance ', sheet.merge_range(row, col + 3, row, col + 4, 'Initial Balance', head_highlight)
head_highlight) sheet.merge_range(row, col + 5, row, col + 6, ' ', txt_name)
sheet.merge_range(row, col + 5, row, col + 6, ' ', sheet.merge_range(row, col + 7, row, col + 8, format_number(initial_debit), txt_name)
txt_name) sheet.merge_range(row, col + 9, row, col + 10, format_number(initial_credit), txt_name)
sheet.merge_range(row, col + 7, row, col + 8, sheet.merge_range(row, col + 11, row, col + 12, format_number(initial_balance), txt_name)
data['total'][partner]['initial_debit'],
txt_name) # Process move lines for the partner
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]: for rec in data['data'][partner]:
row += 1 row += 1
sheet.write(row, col, rec[0]['date'], txt_name) sheet.write(row, col, rec[0]['date'], txt_name)
sheet.write(row, col + 1, rec[0]['jrnl'], txt_name) sheet.write(row, col + 1, rec[0]['jrnl'], txt_name)
sheet.write(row, col + 2, rec[0]['code'], txt_name) sheet.write(row, col + 2, rec[0]['code'], txt_name)
sheet.merge_range(row, col + 3, row, col + 4, sheet.merge_range(row, col + 3, row, col + 4, rec[0]['move_name'], txt_name)
rec[0]['move_name'], sheet.merge_range(row, col + 5, row, col + 6, rec[0]['date_maturity'] or '', txt_name)
txt_name) sheet.merge_range(row, col + 7, row, col + 8, format_number(rec[0]['debit']), txt_name)
sheet.merge_range(row, col + 5, row, col + 6, sheet.merge_range(row, col + 9, row, col + 10, format_number(rec[0]['credit']), txt_name)
rec[0]['date_maturity'], sheet.merge_range(row, col + 11, row, col + 12, ' ', txt_name)
txt_name)
sheet.merge_range(row, col + 7, row, col + 8, # Grand totals
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 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, row, col + 6, 'Total', filter_head)
sheet.merge_range(row, col + 7, row, col + 8, sheet.merge_range(row, col + 7, row, col + 8, format_number(grand_total_debit), filter_head)
data['grand_total']['total_debit'], sheet.merge_range(row, col + 9, row, col + 10, format_number(grand_total_credit), filter_head)
filter_head) sheet.merge_range(row, col + 11, row, col + 12, format_number(grand_balance), 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)
workbook.close() workbook.close()
output.seek(0) output.seek(0)
response.stream.write(output.read()) response.stream.write(output.read())

13
dynamic_accounts_report/models/account_trial_balance.py

@ -77,14 +77,13 @@ class AccountTrialBalance(models.TransientModel):
data = { data = {
'account': account_id.display_name, 'account': account_id.display_name,
'account_id': account_id.id, 'account_id': account_id.id,
'journal_ids': self.env['account.journal'].search_read([], [ 'journal_ids': self.env['account.journal'].search_read([], ['name']),
'name']), 'initial_total_debit': "{:,.2f}".format(initial_total_debit),
'initial_total_debit': initial_total_debit, 'initial_total_credit': "{:,.2f}".format(initial_total_credit),
'initial_total_credit': initial_total_credit,
'total_debit': total_debit, 'total_debit': total_debit,
'total_credit': total_credit, 'total_credit': total_credit,
'end_total_debit': end_total_debit, 'end_total_debit': "{:,.2f}".format(end_total_debit),
'end_total_credit': end_total_credit 'end_total_credit': "{:,.2f}".format(end_total_credit)
} }
move_line_list.append(data) move_line_list.append(data)
journal = { journal = {
@ -422,7 +421,7 @@ class AccountTrialBalance(models.TransientModel):
if data: if data:
if report_action == 'dynamic_accounts_report.action_trial_balance': if report_action == 'dynamic_accounts_report.action_trial_balance':
row = 11 row = 11
for move_line in data['data']: for move_line in data['data'][0]:
sheet.write(row, col, move_line['account'], sheet.write(row, col, move_line['account'],
side_heading_sub) side_heading_sub)
sheet.write(row, col + 1, move_line['initial_total_debit'], sheet.write(row, col + 1, move_line['initial_total_debit'],

3
dynamic_accounts_report/models/aged_payable_report.py

@ -255,8 +255,7 @@ class AgePayableReport(models.TransientModel):
txt_name) txt_name)
for rec in data['data'][move_line]: for rec in data['data'][move_line]:
row += 1 row += 1
sheet.write(row, col, rec['move_name'] + rec['name'], sheet.write(row, col, rec['move_name'] + (rec['name'] or ""), txt_name)
txt_name)
sheet.write(row, col + 1, rec['date'], sheet.write(row, col + 1, rec['date'],
txt_name) txt_name)
sheet.write(row, col + 2, rec['amount_currency'], sheet.write(row, col + 2, rec['amount_currency'],

123
dynamic_accounts_report/models/aged_receivable_report.py

@ -35,9 +35,9 @@ class AgeReceivableReport(models.TransientModel):
def view_report(self): def view_report(self):
""" """
Generate a report with move line data categorized by partner and debit 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 '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 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 difference based on the number of days between today's date and the
maturity date of the move line. maturity date of the move line.
@ -56,6 +56,11 @@ class AgeReceivableReport(models.TransientModel):
currency_id = self.env.company.currency_id.symbol currency_id = self.env.company.currency_id.symbol
partner_ids = paid.mapped('partner_id') partner_ids = paid.mapped('partner_id')
today = fields.Date.today() 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: for partner_id in partner_ids:
move_line_ids = paid.filtered( move_line_ids = paid.filtered(
lambda rec: rec.partner_id in partner_id) lambda rec: rec.partner_id in partner_id)
@ -63,29 +68,51 @@ class AgeReceivableReport(models.TransientModel):
['name', 'move_name', 'date', 'amount_currency', 'account_id', ['name', 'move_name', 'date', 'amount_currency', 'account_id',
'date_maturity', 'currency_id', 'debit', 'move_id']) 'date_maturity', 'currency_id', 'debit', 'move_id'])
for val in move_line_data: for val in move_line_data:
difference = 0 # Initialize difference to avoid undefined variable
if val['date_maturity']: if val['date_maturity']:
diffrence = (today - val['date_maturity']).days difference = (today - val['date_maturity']).days
val['diff0'] = val['debit'] if diffrence <= 0 else 0.0 # Keep raw numeric values for calculations
val['diff1'] = val['debit'] if 0 < diffrence <= 30 else 0.0 val['raw_amount_currency'] = val['amount_currency']
val['diff2'] = val['debit'] if 30 < diffrence <= 60 else 0.0 val['raw_debit'] = val['debit']
val['diff3'] = val['debit'] if 60 < diffrence <= 90 else 0.0 val['diff0'] = val['debit'] if difference <= 0 else 0.0
val['diff4'] = val['debit'] if 90 < diffrence <= 120 else 0.0 val['diff1'] = val['debit'] if 0 < difference <= 30 else 0.0
val['diff5'] = val['debit'] if diffrence > 120 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 move_line_list[partner_id.name] = move_line_data
partner_total[partner_id.name] = { partner_total[partner_id.name] = {
'debit_sum': sum(val['debit'] for val in move_line_data), 'debit_sum': sum(val['raw_debit'] for val in move_line_data),
'diff0_sum': round(sum(val['diff0'] for val in move_line_data), 'diff0_sum': round(sum(val['raw_diff0'] for val in move_line_data), 2),
2), 'diff1_sum': round(sum(val['raw_diff1'] for val in move_line_data), 2),
'diff1_sum': round(sum(val['diff1'] for val in move_line_data), 'diff2_sum': round(sum(val['raw_diff2'] for val in move_line_data), 2),
2), 'diff3_sum': round(sum(val['raw_diff3'] for val in move_line_data), 2),
'diff2_sum': round(sum(val['diff2'] for val in move_line_data), 'diff4_sum': round(sum(val['raw_diff4'] for val in move_line_data), 2),
2), 'diff5_sum': round(sum(val['raw_diff5'] for val in move_line_data), 2),
'diff3_sum': round(sum(val['diff3'] for val in move_line_data), # Format the summary fields for display
2), 'debit_sum_display': format_number(sum(val['raw_debit'] for val in move_line_data)),
'diff4_sum': round(sum(val['diff4'] for val in move_line_data), 'diff0_sum_display': format_number(round(sum(val['raw_diff0'] for val in move_line_data), 2)),
2), 'diff1_sum_display': format_number(round(sum(val['raw_diff1'] for val in move_line_data), 2)),
'diff5_sum': round(sum(val['diff5'] for val in move_line_data), 'diff2_sum_display': format_number(round(sum(val['raw_diff2'] for val in move_line_data), 2)),
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, 'currency_id': currency_id,
'partner_id': partner_id.id 'partner_id': partner_id.id
} }
@ -166,7 +193,7 @@ class AgeReceivableReport(models.TransientModel):
@api.model @api.model
def get_xlsx_report(self, data, response, report_name, report_action): 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. :param data: The data used to generate the report.
:type data: str (JSON format) :type data: str (JSON format)
@ -204,6 +231,14 @@ class AgeReceivableReport(models.TransientModel):
side_heading_sub.set_indent(1) side_heading_sub.set_indent(1)
txt_name = workbook.add_format({'font_size': '10px', 'border': 1}) txt_name = workbook.add_format({'font_size': '10px', 'border': 1})
txt_name.set_indent(2) 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(0, 0, 30)
sheet.set_column(1, 1, 20) sheet.set_column(1, 1, 20)
sheet.set_column(2, 2, 15) sheet.set_column(2, 2, 15)
@ -249,25 +284,25 @@ class AgeReceivableReport(models.TransientModel):
txt_name) txt_name)
sheet.write(row, col + 8, sheet.write(row, col + 8,
data['total'][move_line]['diff0_sum'], data['total'][move_line]['diff0_sum'],
txt_name) num_format)
sheet.write(row, col + 9, sheet.write(row, col + 9,
data['total'][move_line]['diff1_sum'], data['total'][move_line]['diff1_sum'],
txt_name) num_format)
sheet.write(row, col + 10, sheet.write(row, col + 10,
data['total'][move_line]['diff2_sum'], data['total'][move_line]['diff2_sum'],
txt_name) num_format)
sheet.write(row, col + 11, sheet.write(row, col + 11,
data['total'][move_line]['diff3_sum'], data['total'][move_line]['diff3_sum'],
txt_name) num_format)
sheet.write(row, col + 12, sheet.write(row, col + 12,
data['total'][move_line]['diff4_sum'], data['total'][move_line]['diff4_sum'],
txt_name) num_format)
sheet.write(row, col + 13, sheet.write(row, col + 13,
data['total'][move_line]['diff5_sum'], data['total'][move_line]['diff5_sum'],
txt_name) num_format)
sheet.write(row, col + 14, sheet.write(row, col + 14,
data['total'][move_line]['debit_sum'], data['total'][move_line]['debit_sum'],
txt_name) num_format)
for rec in data['data'][move_line]: for rec in data['data'][move_line]:
row += 1 row += 1
if not rec['name']: if not rec['name']:
@ -277,7 +312,7 @@ class AgeReceivableReport(models.TransientModel):
sheet.write(row, col + 1, rec['date'], sheet.write(row, col + 1, rec['date'],
txt_name) txt_name)
sheet.write(row, col + 2, rec['amount_currency'], sheet.write(row, col + 2, rec['amount_currency'],
txt_name) num_format)
sheet.write(row, col + 3, rec['currency_id'][1], sheet.write(row, col + 3, rec['currency_id'][1],
txt_name) txt_name)
sheet.merge_range(row, col + 4, row, col + 5, sheet.merge_range(row, col + 4, row, col + 5,
@ -286,36 +321,36 @@ class AgeReceivableReport(models.TransientModel):
sheet.merge_range(row, col + 6, row, col + 7, sheet.merge_range(row, col + 6, row, col + 7,
rec['date_maturity'], rec['date_maturity'],
txt_name) txt_name)
sheet.write(row, col + 8, rec['diff0'], txt_name) sheet.write(row, col + 8, rec['diff0'], num_format)
sheet.write(row, col + 9, rec['diff1'], txt_name) sheet.write(row, col + 9, rec['diff1'], num_format)
sheet.write(row, col + 10, rec['diff2'], txt_name) sheet.write(row, col + 10, rec['diff2'], num_format)
sheet.write(row, col + 11, rec['diff3'], txt_name) sheet.write(row, col + 11, rec['diff3'], num_format)
sheet.write(row, col + 12, rec['diff4'], txt_name) sheet.write(row, col + 12, rec['diff4'], num_format)
sheet.write(row, col + 13, rec['diff5'], txt_name) sheet.write(row, col + 13, rec['diff5'], num_format)
sheet.write(row, col + 14, ' ', txt_name) sheet.write(row, col + 14, ' ', txt_name)
sheet.merge_range(row + 1, col, row + 1, col + 7, 'Total', sheet.merge_range(row + 1, col, row + 1, col + 7, 'Total',
filter_head) filter_head)
sheet.write(row + 1, col + 8, sheet.write(row + 1, col + 8,
data['grand_total']['diff0_sum'], data['grand_total']['diff0_sum'],
filter_head) total_num_format)
sheet.write(row + 1, col + 9, sheet.write(row + 1, col + 9,
data['grand_total']['diff1_sum'], data['grand_total']['diff1_sum'],
filter_head) total_num_format)
sheet.write(row + 1, col + 10, sheet.write(row + 1, col + 10,
data['grand_total']['diff2_sum'], data['grand_total']['diff2_sum'],
filter_head) total_num_format)
sheet.write(row + 1, col + 11, sheet.write(row + 1, col + 11,
data['grand_total']['diff3_sum'], data['grand_total']['diff3_sum'],
filter_head) total_num_format)
sheet.write(row + 1, col + 12, sheet.write(row + 1, col + 12,
data['grand_total']['diff4_sum'], data['grand_total']['diff4_sum'],
filter_head) total_num_format)
sheet.write(row + 1, col + 13, sheet.write(row + 1, col + 13,
data['grand_total']['diff5_sum'], data['grand_total']['diff5_sum'],
filter_head) total_num_format)
sheet.write(row + 1, col + 14, sheet.write(row + 1, col + 14,
data['grand_total']['total_debit'], data['grand_total']['total_debit'],
filter_head) total_num_format)
workbook.close() workbook.close()
output.seek(0) output.seek(0)

12
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, ' ', sheet.merge_range(row, col + 9, row, col + 10, ' ',
txt_name) txt_name)
sheet.merge_range(row, col + 11, row, col + 12, sheet.merge_range(row, col + 11, row, col + 12,
data['total'][move_line]['total_debit'], data['total'][move_line]['total_debit_display'],
txt_name) txt_name)
sheet.merge_range(row, col + 13, row, col + 14, sheet.merge_range(row, col + 13, row, col + 14,
data['total'][move_line]['total_credit'], data['total'][move_line]['total_credit_display'],
txt_name) txt_name)
sheet.merge_range(row, col + 15, row, col + 16, sheet.merge_range(row, col + 15, row, col + 16,
data['total'][move_line]['total_debit'] - data['total'][move_line]['total_debit'] -
@ -298,18 +298,18 @@ class BankBookReport(models.TransientModel):
rec['name'], rec['name'],
txt_name) txt_name)
sheet.merge_range(row, col + 11, row, col + 12, 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, 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, ' ', sheet.merge_range(row, col + 15, row, col + 16, ' ',
txt_name) txt_name)
sheet.merge_range(row + 1, col, row + 1, col + 10, 'Total', sheet.merge_range(row + 1, col, row + 1, col + 10, 'Total',
filter_head) filter_head)
sheet.merge_range(row + 1, col + 11, row + 1, col + 12, sheet.merge_range(row + 1, col + 11, row + 1, col + 12,
data['grand_total']['total_debit'], data['grand_total']['total_debit_display'],
filter_head) filter_head)
sheet.merge_range(row + 1, col + 13, row + 1, col + 14, sheet.merge_range(row + 1, col + 13, row + 1, col + 14,
data['grand_total']['total_credit'], data['grand_total']['total_credit_display'],
filter_head) filter_head)
sheet.merge_range(row + 1, col + 15, row + 1, col + 16, sheet.merge_range(row + 1, col + 15, row + 1, col + 16,
float(data['grand_total']['total_debit']) - float(data['grand_total']['total_debit']) -

20
dynamic_accounts_report/report/aged_receivable_templates.xml

@ -93,7 +93,7 @@
<t t-if="total[move_line]['diff0_sum']" <t t-if="total[move_line]['diff0_sum']"
t-esc="total[move_line]['currency_id']"/> t-esc="total[move_line]['currency_id']"/>
<t t-if="total[move_line]['diff0_sum']" <t t-if="total[move_line]['diff0_sum']"
t-esc="total[move_line]['diff0_sum']"/> t-esc="total[move_line]['diff0_sum_display']"/>
</span> </span>
</th> </th>
<th style="border:0px solid transparent;font-size:11px;font-weight:100;"> <th style="border:0px solid transparent;font-size:11px;font-weight:100;">
@ -101,7 +101,7 @@
<t t-if="total[move_line]['diff1_sum']" <t t-if="total[move_line]['diff1_sum']"
t-esc="total[move_line]['currency_id']"/> t-esc="total[move_line]['currency_id']"/>
<t t-if="total[move_line]['diff1_sum']" <t t-if="total[move_line]['diff1_sum']"
t-esc="total[move_line]['diff1_sum']"/> t-esc="total[move_line]['diff1_sum_display']"/>
</span> </span>
</th> </th>
<th style="border:0px solid transparent;font-size:11px;font-weight:100;"> <th style="border:0px solid transparent;font-size:11px;font-weight:100;">
@ -141,7 +141,7 @@
<t t-if="total[move_line]['debit_sum']" <t t-if="total[move_line]['debit_sum']"
t-esc="total[move_line]['currency_id']"/> t-esc="total[move_line]['currency_id']"/>
<t t-if="total[move_line]['debit_sum']" <t t-if="total[move_line]['debit_sum']"
t-esc="total[move_line]['debit_sum']"/> t-esc="total[move_line]['debit_sum_display']"/>
</span> </span>
</th> </th>
</tr> </tr>
@ -243,31 +243,31 @@
<th style="width:60%;">Total</th> <th style="width:60%;">Total</th>
<th style="width:10%"> <th style="width:10%">
<t t-out="grand_total['currency']"/> <t t-out="grand_total['currency']"/>
<t t-out="grand_total['diff0_sum']"/> <t t-out="grand_total['diff0_sum_display']"/>
</th> </th>
<th style="width:10%"> <th style="width:10%">
<t t-out="grand_total['currency']"/> <t t-out="grand_total['currency']"/>
<t t-out="grand_total['diff1_sum']"/> <t t-out="grand_total['diff1_sum_display']"/>
</th> </th>
<th style="width:10%"> <th style="width:10%">
<t t-out="grand_total['currency']"/> <t t-out="grand_total['currency']"/>
<t t-out="grand_total['diff2_sum']"/> <t t-out="grand_total['diff2_sum_display']"/>
</th> </th>
<th style="width:10%"> <th style="width:10%">
<t t-out="grand_total['currency']"/> <t t-out="grand_total['currency']"/>
<t t-out="grand_total['diff3_sum']"/> <t t-out="grand_total['diff3_sum_display']"/>
</th> </th>
<th style="width:10%"> <th style="width:10%">
<t t-out="grand_total['currency']"/> <t t-out="grand_total['currency']"/>
<t t-out="grand_total['diff4_sum']"/> <t t-out="grand_total['diff4_sum_display']"/>
</th> </th>
<th style="width:10%"> <th style="width:10%">
<t t-out="grand_total['currency']"/> <t t-out="grand_total['currency']"/>
<t t-out="grand_total['diff5_sum']"/> <t t-out="grand_total['diff5_sum_display']"/>
</th> </th>
<th style="width:10%"> <th style="width:10%">
<t t-out="grand_total['currency']"/> <t t-out="grand_total['currency']"/>
<t t-out="grand_total['total_debit']"/> <t t-out="grand_total['total_debit_display']"/>
</th> </th>
</tr> </tr>
</tbody> </tbody>

12
dynamic_accounts_report/report/bank_book_templates.xml

@ -120,7 +120,7 @@
<t t-if="total[move_line]['total_debit']" <t t-if="total[move_line]['total_debit']"
t-esc="total[move_line]['currency_id']"/> t-esc="total[move_line]['currency_id']"/>
<t t-if="total[move_line]['total_debit']" <t t-if="total[move_line]['total_debit']"
t-esc="total[move_line]['total_debit']"/> t-esc="total[move_line]['total_debit_display']"/>
</span> </span>
</strong> </strong>
</th> </th>
@ -130,7 +130,7 @@
<t t-if="total[move_line]['total_credit']" <t t-if="total[move_line]['total_credit']"
t-esc="total[move_line]['currency_id']"/> t-esc="total[move_line]['currency_id']"/>
<t t-if="total[move_line]['total_credit']" <t t-if="total[move_line]['total_credit']"
t-esc="total[move_line]['total_credit']"/> t-esc="total[move_line]['total_credit_display']"/>
</span> </span>
</strong> </strong>
</th> </th>
@ -187,7 +187,7 @@
<t t-if="valuelist['debit']" <t t-if="valuelist['debit']"
t-esc="total[move_line]['currency_id']"/> t-esc="total[move_line]['currency_id']"/>
<t t-if="valuelist['debit']" <t t-if="valuelist['debit']"
t-esc="valuelist['debit']"/> t-esc="valuelist['debit_display']"/>
</span> </span>
</th> </th>
<th style="width:10%"> <th style="width:10%">
@ -195,7 +195,7 @@
<t t-if="valuelist['credit']" <t t-if="valuelist['credit']"
t-esc="total[move_line]['currency_id']"/> t-esc="total[move_line]['currency_id']"/>
<t t-if="valuelist['credit']" <t t-if="valuelist['credit']"
t-esc="valuelist['credit']"/> t-esc="valuelist['credit_display']"/>
</span> </span>
</th> </th>
<th style="width:10%"/> <th style="width:10%"/>
@ -211,11 +211,11 @@
<th style="width:60%;">Total</th> <th style="width:60%;">Total</th>
<th style="width:10%"> <th style="width:10%">
<t t-out="grand_total['currency']"/> <t t-out="grand_total['currency']"/>
<t t-out="grand_total['total_debit']"/> <t t-out="grand_total['total_debit_display']"/>
</th> </th>
<th style="width:10%"> <th style="width:10%">
<t t-out="grand_total['currency']"/> <t t-out="grand_total['currency']"/>
<t t-out="grand_total['total_credit']"/> <t t-out="grand_total['total_credit_display']"/>
</th> </th>
<th style="width:10%"> <th style="width:10%">
<t t-out="grand_total['currency']"/> <t t-out="grand_total['currency']"/>

48
dynamic_accounts_report/report/general_ledger_templates.xml

@ -76,9 +76,9 @@
<br/> <br/>
<br/> <br/>
<t t-if="account"> <t t-if="account">
<t t-foreach="account" <!-- <t t-foreach="account_data.account_totals"-->
t-as="accounts" <!-- t-as="accounts"-->
t-key="accounts_index"> <!-- t-key="accounts_index">-->
<table class="table table-sm table-reports"> <table class="table table-sm table-reports">
<thead style="background:#808080;"> <thead style="background:#808080;">
<tr> <tr>
@ -93,6 +93,9 @@
</tr> </tr>
</thead> </thead>
<tbody style="font-size:11px;font-weight:100;"> <tbody style="font-size:11px;font-weight:100;">
<t t-foreach="account"
t-as="account"
t-key="accounts_index">
<tr class="border-bottom" <tr class="border-bottom"
style="background:#D3D3D3;"> style="background:#D3D3D3;">
<th colspan="6"> <th colspan="6">
@ -101,7 +104,7 @@
<t t-if="accounts != 'false'"> <t t-if="accounts != 'false'">
<strong> <strong>
<b> <b>
<t t-esc="accounts"/> <t t-esc="account"/>
</b> </b>
</strong> </strong>
</t> </t>
@ -119,33 +122,33 @@
<th style="width:10% border:0px solid transparent;"> <th style="width:10% border:0px solid transparent;">
<strong> <strong>
<span> <span>
<t t-if="total[accounts]['total_debit']" <t t-if="total[account]['total_debit']"
t-esc="total[accounts]['currency_id']"/> t-esc="total[account]['currency_id']"/>
<t t-if="total[accounts]['total_debit']" <t t-if="total[account]['total_debit']"
t-esc="total[accounts]['total_debit']"/> t-esc="total[account]['total_debit_display']"/>
</span> </span>
</strong> </strong>
</th> </th>
<th style="width:10% border:0px solid transparent;"> <th style="width:10% border:0px solid transparent;">
<strong> <strong>
<span> <span>
<t t-if="total[accounts]['total_credit']" <t t-if="total[account]['total_credit']"
t-esc="total[accounts]['currency_id']"/> t-esc="total[account]['currency_id']"/>
<t t-if="total[accounts]['total_credit']" <t t-if="total[account]['total_credit']"
t-esc="total[accounts]['total_credit']"/> t-esc="total[account]['total_credit_display']"/>
</span> </span>
</strong> </strong>
</th> </th>
<th style="width:10% border:0px solid transparent;border-right: thin solid #dee2e6;"> <th style="width:10% border:0px solid transparent;border-right: thin solid #dee2e6;">
<strong> <strong>
<span class="fw-bolder"> <span class="fw-bolder">
<t t-esc="total[accounts]['currency_id']"/> <t t-esc="total[account]['currency_id']"/>
<t t-esc="total[accounts]['total_debit'] - total[accounts]['total_credit']"/> <t t-esc="total[account]['total_debit'] - total[account]['total_credit']"/>
</span> </span>
</strong> </strong>
</th> </th>
</tr> </tr>
<t t-foreach="data[accounts]" <t t-foreach="account_data[account]"
t-as="valuelist" t-as="valuelist"
t-key="valuelist_index"> t-key="valuelist_index">
<tr class="border-bottom"> <tr class="border-bottom">
@ -173,7 +176,7 @@
<th style="width:10%"> <th style="width:10%">
<span> <span>
<t t-if="valuelist[0]['debit']" <t t-if="valuelist[0]['debit']"
t-esc="total[accounts]['currency_id']"/> t-esc="total[account]['currency_id']"/>
<t t-if="valuelist[0]['debit']" <t t-if="valuelist[0]['debit']"
t-esc="valuelist[0]['debit']"/> t-esc="valuelist[0]['debit']"/>
</span> </span>
@ -181,7 +184,7 @@
<th style="width:10%"> <th style="width:10%">
<span> <span>
<t t-if="valuelist[0]['credit']" <t t-if="valuelist[0]['credit']"
t-esc="total[accounts]['currency_id']"/> t-esc="total[account]['currency_id']"/>
<t t-if="valuelist[0]['credit']" <t t-if="valuelist[0]['credit']"
t-esc="valuelist[0]['credit']"/> t-esc="valuelist[0]['credit']"/>
</span> </span>
@ -189,9 +192,10 @@
<th style="width:10%"/> <th style="width:10%"/>
</tr> </tr>
</t> </t>
</t>
</tbody> </tbody>
</table> </table>
</t> <!-- </t>-->
</t> </t>
<table class="table table-sm table-reports"> <table class="table table-sm table-reports">
<tbody> <tbody>
@ -199,15 +203,19 @@
<th style="width:45%;">Total</th> <th style="width:45%;">Total</th>
<th style="width:10%"> <th style="width:10%">
<t t-out="grand_total['currency']"/> <t t-out="grand_total['currency']"/>
<t t-out="grand_total['total_debit']"/> <t t-if="grand_total['total_debit']">
<t t-out="grand_total['total_debit_display']"/>
</t>
</th> </th>
<th style="width:10%"> <th style="width:10%">
<t t-out="grand_total['currency']"/> <t t-out="grand_total['currency']"/>
<t t-out="grand_total['total_credit']"/> <t t-out="grand_total['total_credit_display']"/>
</th> </th>
<th style="width:10%"> <th style="width:10%">
<t t-out="grand_total['currency']"/> <t t-out="grand_total['currency']"/>
<t t-if="grand_total['total_debit'] and grand_total['total_credit']">
<t t-out="float(grand_total['total_debit']) - float(grand_total['total_credit'])"/> <t t-out="float(grand_total['total_debit']) - float(grand_total['total_credit'])"/>
</t>
</th> </th>
</tr> </tr>
</tbody> </tbody>

16
dynamic_accounts_report/report/partner_ledger_templates.xml

@ -118,7 +118,7 @@
<t t-if="total[partner]['total_debit']" <t t-if="total[partner]['total_debit']"
t-esc="total[partner]['currency_id']"/> t-esc="total[partner]['currency_id']"/>
<t t-if="total[partner]['total_debit']" <t t-if="total[partner]['total_debit']"
t-esc="total[partner]['total_debit']"/> t-esc="total[partner]['total_debit_display']"/>
</span> </span>
</strong> </strong>
</th> </th>
@ -128,7 +128,7 @@
<t t-if="total[partner]['total_credit']" <t t-if="total[partner]['total_credit']"
t-esc="total[partner]['currency_id']"/> t-esc="total[partner]['currency_id']"/>
<t t-if="total[partner]['total_credit']" <t t-if="total[partner]['total_credit']"
t-esc="total[partner]['total_credit']"/> t-esc="total[partner]['total_credit_display']"/>
</span> </span>
</strong> </strong>
</th> </th>
@ -228,7 +228,7 @@
<t t-if="valuelist[0]['debit']" <t t-if="valuelist[0]['debit']"
t-esc="total[partner]['currency_id']"/> t-esc="total[partner]['currency_id']"/>
<t t-if="valuelist[0]['debit']" <t t-if="valuelist[0]['debit']"
t-esc="valuelist[0]['debit']"/> t-esc="valuelist[0]['debit_display']"/>
</span> </span>
</th> </th>
<th style="width:10%"> <th style="width:10%">
@ -236,7 +236,7 @@
<t t-if="valuelist[0]['credit']" <t t-if="valuelist[0]['credit']"
t-esc="total[partner]['currency_id']"/> t-esc="total[partner]['currency_id']"/>
<t t-if="valuelist[0]['credit']" <t t-if="valuelist[0]['credit']"
t-esc="valuelist[0]['credit']"/> t-esc="valuelist[0]['credit_display']"/>
</span> </span>
</th> </th>
<th style="width:10%"> <th style="width:10%">
@ -244,7 +244,7 @@
<t t-if="valuelist[0]['amount_currency']" <t t-if="valuelist[0]['amount_currency']"
t-esc="total[partner]['currency_id']"/> t-esc="total[partner]['currency_id']"/>
<t t-if="valuelist[0]['amount_currency']" <t t-if="valuelist[0]['amount_currency']"
t-esc="valuelist[0]['amount_currency']"/> t-esc="valuelist[0]['amount_currency_display']"/>
</span> </span>
</th> </th>
<th style="width:10%"/> <th style="width:10%"/>
@ -260,16 +260,18 @@
<th style="width:60%;">Total</th> <th style="width:60%;">Total</th>
<th style="width:10%"> <th style="width:10%">
<t t-out="grand_total['currency']"/> <t t-out="grand_total['currency']"/>
<t t-out="grand_total['total_debit']"/> <t t-out="grand_total['total_debit_display']"/>
</th> </th>
<th style="width:10%"> <th style="width:10%">
<t t-out="grand_total['currency']"/> <t t-out="grand_total['currency']"/>
<t t-out="grand_total['total_credit']"/> <t t-out="grand_total['total_credit_display']"/>
</th> </th>
<th style="width:10%"/> <th style="width:10%"/>
<th style="width:10%"> <th style="width:10%">
<t t-out="grand_total['currency']"/> <t t-out="grand_total['currency']"/>
<t t-if="grand_total['total_debit'] and grand_total['total_credit']">
<t t-out="grand_total['total_debit'] - grand_total['total_credit']"/> <t t-out="grand_total['total_debit'] - grand_total['total_credit']"/>
</t>
</th> </th>
</tr> </tr>
</tbody> </tbody>

2
dynamic_accounts_report/report/trial_balance.xml

@ -112,7 +112,7 @@
<tbody> <tbody>
<t t-if="data"> <t t-if="data">
<t t-set="i" t-value="0"/> <t t-set="i" t-value="0"/>
<t t-foreach="data" <t t-foreach="data[0]"
t-as="move_line" t-as="move_line"
t-key="move_line_index"> t-key="move_line_index">
<t t-set="i" t-value="i + 1"/> <t t-set="i" t-value="i + 1"/>

BIN
dynamic_accounts_report/static/description/assets/icons/blog-icon.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 841 B

37
dynamic_accounts_report/static/description/assets/icons/copylink.svg

@ -1,37 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="138" height="36" viewBox="0 0 138 36">
<path transform="matrix(1 0 0 1 0 0)" d="M6 0C2.68629 0 0 2.68629 0 6L0 30C0 33.3137 2.68629 36 6 36L116.281 36C119.595 36 122.281 33.3137 122.281 30L122.281 6C122.281 2.68629 119.595 0 116.281 0L6 0Z" fill-rule="nonzero" fill="rgb(127, 40, 155)"/>
<defs>
<clipPath id="clipPath8069831620">
<path transform="matrix(1 0 0 1 16 10)" d="M0 0L16 0L16 16L0 16L0 0Z" fill-rule="nonzero"/>
</clipPath>
</defs>
<g clip-path="url(#clipPath8069831620)">
<defs>
<clipPath id="clipPath0353225982">
<path transform="matrix(1 0 0 1 16 10)" d="M0 0L16 0L16 16L0 16L0 0Z" fill-rule="nonzero"/>
</clipPath>
</defs>
<g clip-path="url(#clipPath0353225982)">
<path transform="matrix(1 0 0 1 20 14)" d="M-0.5 1.78125C-0.5 0.52135 0.52135 -0.5 1.78125 -0.5L8.71875 -0.5C9.97865 -0.5 11 0.52135 11 1.78125L11 8.71875C11 9.97865 9.97865 11 8.71875 11L1.78125 11C0.52135 11 -0.5 9.97865 -0.5 8.71875L-0.5 1.78125ZM1.78125 0.5C1.07364 0.5 0.5 1.07364 0.5 1.78125L0.5 8.71875C0.5 9.42636 1.07364 10 1.78125 10L8.71875 10C9.42636 10 10 9.42636 10 8.71875L10 1.78125C10 1.07364 9.42636 0.5 8.71875 0.5L1.78125 0.5Z" fill-rule="nonzero" fill="rgb(255, 255, 255)"/>
<path transform="matrix(1 0 0 1 17.5 11.5)" d="M9.99998 1.74595L9.98448 2.48959C9.97873 2.76567 10.1979 2.99414 10.474 2.99989C10.75 3.00564 10.9785 2.78649 10.9843 2.51041L11 1.74858Q10.9974 0.818284 10.3395 0.160467Q9.68172 -0.497352 8.75142 -0.499998L2 -0.5Q0.964869 -0.496943 0.233963 0.233963Q-0.496943 0.96487 -0.499998 1.99852L-0.5 8.75Q-0.497352 9.68171 0.160467 10.3395Q0.818284 10.9973 1.74858 11L2.5 11C2.77614 11 3 10.7761 3 10.5C3 10.2239 2.77614 10 2.5 10L1.75142 10Q1.23368 9.99853 0.867574 9.63243Q0.501471 9.26632 0.5 8.75L0.499998 2.00148Q0.501834 1.38031 0.94107 0.94107Q1.38031 0.501834 2 0.5L8.74858 0.499998Q9.26632 0.501471 9.63243 0.867574Q9.99659 1.23174 9.99998 1.74595Z" fill-rule="evenodd" fill="rgb(255, 255, 255)"/>
</g>
</g>
<path transform="matrix(1 0 0 1 40 8)" d="M9.57373 8.12646L8.02539 8.12646Q7.93311 7.63086 7.69043 7.25488Q7.44775 6.87549 7.0957 6.6123Q6.74365 6.34912 6.30615 6.21582Q5.87207 6.08252 5.38672 6.08252Q4.50488 6.08252 3.81104 6.52344Q3.11719 6.96436 2.71387 7.81885Q2.31396 8.67334 2.31396 9.91064Q2.31396 11.1548 2.71729 12.0093Q3.12061 12.8604 3.81445 13.2979Q4.5083 13.7354 5.37988 13.7354Q5.86523 13.7354 6.29932 13.6055Q6.7334 13.4722 7.08545 13.2158Q7.4375 12.9595 7.68359 12.5835Q7.92969 12.2075 8.02539 11.7188L9.57373 11.7222Q9.45068 12.4775 9.09521 13.103Q8.73975 13.7285 8.18604 14.1865Q7.63232 14.6445 6.92139 14.894Q6.21045 15.1401 5.36963 15.1401Q4.04688 15.1401 3.01123 14.5112Q1.979 13.8789 1.38428 12.7065Q0.792969 11.5342 0.792969 9.91064Q0.792969 8.28027 1.3877 7.10791Q1.98584 5.93555 3.01807 5.30664Q4.05371 4.67773 5.36963 4.67773Q6.17969 4.67773 6.88379 4.91016Q7.58789 5.14258 8.14844 5.58691Q8.70898 6.03125 9.07812 6.67041Q9.44727 7.30957 9.57373 8.12646Z" fill-rule="nonzero" fill="rgb(255, 255, 255)"/>
<path transform="matrix(1 0 0 1 40 8)" d="M14.5103 15.1538Q13.4371 15.1538 12.6373 14.6616Q11.8375 14.1694 11.3932 13.2842Q10.9522 12.3989 10.9522 11.2163Q10.9522 10.0269 11.3932 9.13818Q11.8375 8.24951 12.6373 7.75732Q13.4371 7.26514 14.5103 7.26514Q15.587 7.26514 16.3868 7.75732Q17.1866 8.24951 17.6275 9.13818Q18.0719 10.0269 18.0719 11.2163Q18.0719 12.3989 17.6275 13.2842Q17.1866 14.1694 16.3868 14.6616Q15.587 15.1538 14.5103 15.1538ZM14.5172 13.9062Q15.2144 13.9062 15.669 13.5371Q16.127 13.168 16.3492 12.5562Q16.5714 11.9443 16.5714 11.2129Q16.5714 10.4814 16.3492 9.86621Q16.127 9.25098 15.669 8.87842Q15.2144 8.50586 14.5172 8.50586Q13.8131 8.50586 13.3551 8.87842Q12.8971 9.25098 12.6749 9.86621Q12.4527 10.4814 12.4527 11.2129Q12.4527 11.9443 12.6749 12.5562Q12.8971 13.168 13.3551 13.5371Q13.8131 13.9062 14.5172 13.9062Z" fill-rule="nonzero" fill="rgb(255, 255, 255)"/>
<path transform="matrix(1 0 0 1 40 8)" d="M19.7257 17.8643L19.7257 7.36426L21.1783 7.36426L21.1783 8.60156L21.3014 8.60156Q21.4347 8.3623 21.6774 8.05127Q21.92 7.73682 22.3541 7.50098Q22.7882 7.26514 23.4957 7.26514Q24.4186 7.26514 25.1432 7.7334Q25.8712 8.19824 26.2848 9.08008Q26.7018 9.9585 26.7018 11.1992Q26.7018 12.4331 26.2882 13.3184Q25.8781 14.2002 25.1569 14.6753Q24.4357 15.147 23.5094 15.147Q22.8121 15.147 22.3746 14.9146Q21.9371 14.6821 21.6842 14.3711Q21.4347 14.0566 21.3014 13.8105L21.2125 13.8105L21.2125 17.8643L19.7257 17.8643ZM21.1852 11.1821Q21.1852 11.9854 21.4176 12.5938Q21.65 13.2021 22.0944 13.5439Q22.5387 13.8823 23.1779 13.8823Q23.8409 13.8823 24.2887 13.5269Q24.7399 13.1714 24.9689 12.5596Q25.1979 11.9478 25.1979 11.1821Q25.1979 10.4233 24.9723 9.8252Q24.7467 9.22363 24.299 8.87842Q23.8512 8.52979 23.1779 8.52979Q22.5284 8.52979 22.0841 8.86133Q21.6432 9.19287 21.4142 9.79102Q21.1852 10.3857 21.1852 11.1821Z" fill-rule="nonzero" fill="rgb(255, 255, 255)"/>
<path transform="matrix(1 0 0 1 40 8)" d="M29.0357 17.8643Q28.7007 17.8643 28.4273 17.8096Q28.1572 17.7583 28.0205 17.7002L28.3794 16.48Q28.7896 16.5928 29.1074 16.5757Q29.4253 16.5586 29.668 16.333Q29.9141 16.1108 30.1055 15.605L30.2901 15.0991L27.4942 7.36426L29.0869 7.36426L31.0181 13.291L31.1001 13.291L33.0347 7.36426L34.6309 7.36426L31.4795 16.0186Q31.2642 16.6167 30.9258 17.0303Q30.5874 17.4438 30.1192 17.6523Q29.6509 17.8643 29.0357 17.8643Z" fill-rule="nonzero" fill="rgb(255, 255, 255)"/>
<path transform="matrix(1 0 0 1 40 8)" d="M39.8536 15L39.8536 4.81787L41.3917 4.81787L41.3917 13.6807L46.0026 13.6807L46.0026 15L39.8536 15Z" fill-rule="nonzero" fill="rgb(255, 255, 255)"/>
<path transform="matrix(1 0 0 1 40 8)" d="M47.6337 15L47.6337 7.36426L49.1205 7.36426L49.1205 15L47.6337 15ZM48.3857 6.18506Q47.9995 6.18506 47.7226 5.92529Q47.4457 5.66553 47.4457 5.2998Q47.4457 4.93408 47.7226 4.67432Q47.9995 4.41113 48.3857 4.41113Q48.7719 4.41113 49.0488 4.67432Q49.3256 4.93408 49.3256 5.2998Q49.3256 5.66553 49.0488 5.92529Q48.7719 6.18506 48.3857 6.18506Z" fill-rule="nonzero" fill="rgb(255, 255, 255)"/>
<path transform="matrix(1 0 0 1 40 8)" d="M52.6056 10.4644L52.6056 15L51.1188 15L51.1188 7.36426L52.5475 7.36426L52.5475 8.6084L52.6432 8.6084Q52.9064 7.99658 53.4703 7.63086Q54.0343 7.26514 54.8922 7.26514Q55.6749 7.26514 56.2594 7.59326Q56.8473 7.91797 57.172 8.56055Q57.4967 9.19971 57.4933 10.1431L57.4933 15L56.0065 15L56.0065 10.3242Q56.0065 9.49023 55.5758 9.02197Q55.1451 8.55371 54.3898 8.55371Q53.8702 8.55371 53.4669 8.7793Q53.067 9.00146 52.838 9.42871Q52.609 9.85596 52.6056 10.4644Z" fill-rule="nonzero" fill="rgb(255, 255, 255)"/>
<path transform="matrix(1 0 0 1 40 8)" d="M60.848 12.4092L60.8378 10.5977L61.101 10.5977L64.1429 7.36426L65.9203 7.36426L62.451 11.042L62.2186 11.042L60.848 12.4092ZM59.4808 15L59.4808 4.81787L60.9677 4.81787L60.9677 15L59.4808 15ZM64.307 15L61.5692 11.3735L62.5946 10.3311L66.1288 15L64.307 15Z" fill-rule="nonzero" fill="rgb(255, 255, 255)"/>
<defs>
<clipPath id="clipPath7663832060">
<path transform="matrix(1 0 0 1 114 7.5)" d="M0 0L24 0L24 24L0 24L0 0Z" fill-rule="nonzero"/>
</clipPath>
</defs>
<g clip-path="url(#clipPath7663832060)">
<path transform="matrix(1 0 0 1 121.5 13.4378)" d="M0 6.0622L0 0L5.25 3.0311L10.5 6.0622L5.25 9.0933L0 12.1244L0 6.0622Z" fill-rule="nonzero" fill="rgb(127, 40, 155)"/>
<path transform="matrix(1 0 0 1 121.5 13.4378)" d="M-1 6.0622L-1 0Q-1 -0.0984914 -0.980785 -0.19509Q-0.96157 -0.291689 -0.923879 -0.382683Q-0.886188 -0.473678 -0.83147 -0.55557Q-0.776751 -0.637463 -0.707107 -0.707107Q-0.637463 -0.776751 -0.55557 -0.831469Q-0.473678 -0.886188 -0.382683 -0.923879Q-0.291689 -0.961571 -0.19509 -0.980785Q-0.0984914 -1 0 -1Q0.26795 -1 0.500001 -0.866025L5.75 2.16508L11 5.19618Q11.0853 5.24542 11.1593 5.31036Q11.2334 5.3753 11.2934 5.45344Q11.3533 5.53158 11.3969 5.61991Q11.4404 5.70825 11.4659 5.80338Q11.4914 5.89852 11.4979 5.9968Q11.5043 6.09508 11.4914 6.19273Q11.4786 6.29038 11.4469 6.38364Q11.4153 6.4769 11.366 6.5622Q11.232 6.79425 11 6.92822L5.75 9.95932L0.500002 12.9904Q0.414706 13.0397 0.321441 13.0713Q0.228177 13.103 0.130528 13.1158Q0.0328792 13.1287 -0.0654014 13.1223Q-0.163682 13.1158 -0.258817 13.0903Q-0.353953 13.0648 -0.442287 13.0213Q-0.530621 12.9777 -0.60876 12.9178Q-0.686899 12.8578 -0.751839 12.7837Q-0.816779 12.7097 -0.866025 12.6244Q-1 12.3924 -1 12.1244L-1 6.0622ZM1 6.0622L1 12.1244L0 12.1244L-0.500002 11.2584L4.75 8.22727L10 5.19618L10.5 6.0622L10 6.92822L4.75 3.89712L-0.500001 0.866025L0 0L1 0L1 6.0622Z" fill-rule="nonzero" fill="rgb(127, 40, 155)"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 8.4 KiB

14
dynamic_accounts_report/static/description/assets/icons/whatsapp.svg

@ -1,14 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg id="Layer_2" data-name="Layer 2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 23.98 24">
<defs>
<style>
.cls-1 {
fill: #fff;
}
</style>
</defs>
<g id="Layer_1-2" data-name="Layer 1">
<path class="cls-1" d="m20.43,3.49C18.18,1.24,15.18,0,11.99,0c-3.18,0-6.19,1.24-8.46,3.48C1.26,5.73,0,8.72,0,11.89h0c0,1.92.5,3.86,1.46,5.62L.03,24l6.56-1.49c1.66.84,3.52,1.28,5.39,1.28h0c3.18,0,6.19-1.24,8.46-3.48,2.28-2.25,3.53-5.24,3.53-8.41,0-3.15-1.26-6.14-3.54-8.41Zm-8.45,18.43h0c-1.68,0-3.34-.42-4.81-1.22l-.31-.17-4.36.99.95-4.31-.18-.32c-.91-1.57-1.39-3.3-1.39-5,0-5.52,4.54-10.02,10.11-10.02,2.69,0,5.22,1.04,7.12,2.94,1.93,1.92,2.99,4.44,2.99,7.09,0,5.52-4.54,10.02-10.12,10.02Z"/>
<path class="cls-1" d="m8.73,6.65h-.53c-.18,0-.48.07-.73.34-.25.27-.96.93-.96,2.28s.98,2.64,1.12,2.83c.14.18,1.9,3.03,4.68,4.13,2.32.91,2.79.73,3.29.68.5-.05,1.62-.66,1.85-1.3s.23-1.19.16-1.3c-.07-.11-.25-.18-.53-.32-.27-.14-1.62-.81-1.87-.9-.25-.09-.43-.14-.62.14-.18.27-.72.91-.88,1.09-.16.18-.32.21-.59.07-.27-.14-1.15-.43-2.2-1.36-.82-.72-1.38-1.65-1.54-1.92-.16-.27-.02-.42.12-.56.12-.12.29-.29.43-.45.14-.16.18-.27.27-.46.09-.18.05-.34-.02-.48-.07-.14-.59-1.49-.84-2.03h0c-.21-.46-.42-.47-.62-.48Z"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.3 KiB

BIN
dynamic_accounts_report/static/description/assets/icons/youtube-icon.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 619 B

229
dynamic_accounts_report/static/description/index.html

@ -91,41 +91,11 @@
<!-- button tab --> <!-- button tab -->
<!-- --> <!-- -->
<!-- version support --> <!-- version support -->
<div class="row justify-content-between">
<div class="col-4">
</div>
<div class="col-6">
<div class="row" style="margin-top:10px">
<div class="my-3 d-flex align-items-center justify-content-end"> <div class="my-3 d-flex align-items-center justify-content-end">
<span class="me-3"><b>Supports: </b></span>
<div class="text-center" <div class="text-center"
style="background-color:#017E84 !important; font-size:0.8rem !important; color:#fff !important; font-weight:500 !important; padding:4px !important; margin:0 3px !important; border-radius:50px !important; min-width:120px !important"> style="background-color:#017E84 !important; font-size:0.8rem !important; color:#fff !important; font-weight:500 !important; padding:4px !important; margin:0 3px !important; border-radius:50px !important; min-width:120px !important">
Community Community
</div> </div>
<!-- <div class="text-center"-->
<!-- style="background-color:#875A7B !important; color:#fff !important; font-size:0.8rem !important; font-weight:500 !important; padding:4px !important; margin:0 3px !important; border-radius:50px !important; min-width:120px !important">-->
<!-- Enterprise-->
<!-- </div>-->
</div>
</div>
<div class="row" style="margin-top:10px">
<div class="d-flex align-items-center justify-content-end">
<span class="me-3"><b>Availability: </b></span>
<div class="text-center col"
style="font-size:0.8rem !important; color:#5B899E !important; border:1px solid #5B899E; font-weight:500 !important; padding:4px !important; margin:0 3px !important; border-radius:20px !important; min-width:120px !important">
<i class="fa fa-check" style="color:green"></i> On Premise
</div>
<div class="text-center col"
style="border:1px solid #017E84; font-size:0.8rem !important; color:#017E84 !important; font-weight:500 !important; padding:4px !important; margin:0 3px !important; border-radius:20px !important; min-width:120px !important">
<i class="fa fa-times" style="color:red"></i> Odoo Online
</div>
<div class="text-center col"
style="font-size:0.8rem !important; border:1px solid #714b67; color:#714b67 !important; font-weight:500 !important; padding:4px !important; margin:0 3px !important; border-radius:20px !important; min-width:120px !important">
<i class="fa fa-times" style="color:red"></i> Odoo.sh
</div>
</div>
</div>
</div>
</div> </div>
<div class="tab-content" id="myTabContent"> <div class="tab-content" id="myTabContent">
<!-- description --> <!-- description -->
@ -175,10 +145,9 @@
font-family: Montserrat; font-family: Montserrat;
display: inline-block; display: inline-block;
padding: 7px 33px; padding: 7px 33px;
border: 1px solid #7f54b3; border: 1px solid var(--primary-color);
color: #7f54b3; color: var(--primary-color);
text-decoration: none; text-decoration: none;
width: 231px;
" "
class="mx-1 mb-2 deep-1 deep_hover"> class="mx-1 mb-2 deep-1 deep_hover">
<img class="img" <img class="img"
@ -186,7 +155,8 @@
src="./assets/icons/mail.svg"/> src="./assets/icons/mail.svg"/>
<span class="pl-2" <span class="pl-2"
style=" font-size: 16px; vertical-align: middle" style=" font-size: 16px; vertical-align: middle"
>Email Us</span> >Email Us</span
>
</a> </a>
<a href="skype:cybroopenerp?chat" <a href="skype:cybroopenerp?chat"
target="_blank" target="_blank"
@ -198,7 +168,6 @@
border: 1px solid #7f289b; border: 1px solid #7f289b;
border-radius: 35px; border-radius: 35px;
text-decoration: none; text-decoration: none;
width: 231px;
" "
class="mx-1 mb-2 deep-1 deep_hover"> class="mx-1 mb-2 deep-1 deep_hover">
<img <img
@ -209,32 +178,8 @@
<span <span
class="pl-2" class="pl-2"
style="color: #fff; font-size: 16px; vertical-align: middle" style="color: #fff; font-size: 16px; vertical-align: middle"
>Skype Us</span> >Skype Us</span
</a> >
<a href="https://wa.me/9074270811"
target="_blank"
style="
background-color: #25D366;
font-family: Montserrat;
display: inline-block;
color: #7f54b3;
padding: 7px 33px;
border: 1px solid #25D366;
border-radius: 35px;
text-decoration: none;
width: 230px;
"
class="mx-1 mb-2 deep-1 deep_hover">
<img
class="img"
style="width: 24px"
src="./assets/icons/whatsapp.svg"
/>
<span
class="pl-2"
style="color: #fff; font-size: 15px; vertical-align: middle"
>+91 9074270811</span>
</a> </a>
</div> </div>
<div class="d-flex justify-content-center mt-2"> <div class="d-flex justify-content-center mt-2">
@ -243,115 +188,16 @@
style="z-index: 3; height: auto;"> style="z-index: 3; height: auto;">
</div> </div>
</div> </div>
<div class="position-absolute bottom-0" <div class="position-absolute"
style="z-index: 1; width: 100%;"> style="bottom: 0; z-index: 1; width: 100%;">
<img src="./assets/icons/banner-bg.svg" <img src="./assets/icons/banner-bg.svg"
class="img-fluid w-100"> class="img-fluid w-100">
</div> </div>
<div class="position-absolute bottom-0 end-0" <div class="position-absolute"
style=" z-index: 2;"> style="bottom: 0; right: 0; z-index: 2;">
<img src="./assets/icons/patter.svg"> <img src="./assets/icons/patter.svg">
</div> </div>
</div> </div>
<!-- video blog link section -->
<div style="background-color: #ffffff; border: 1px solid #e7e7e7; padding: 40px; border-radius: 12px; text-align: center; color: #000; margin-top: 34px;">
<h1 style="font-size: 32px; font-weight: bold; margin-bottom: 0px;">
Blog and Video Details
</h1>
<div style="margin-top: 30px;display: flex; gap: 20px; justify-content: center; align-items: center;">
<div style="width: 100%;">
<div style="background-color: #F7F3FF; min-height: 289px; border-radius: 12px; padding: 32px; text-align: left;">
<div style="margin-bottom: 24px;">
<img src="./assets/icons/blog-icon.png"
style="padding: 10px; background-color: #E9E4F5;border-radius: 12px;">
</div>
<h3 style="color: #121212; font-size: 24px; font-weight: 700; margin-bottom: 12px;">Read
Blog</h3>
<p style="color: #666666; font-size: 16px; margin-bottom: 24px;">Read Our Detailed
Blog</p>
<div style="display: flex; align-items: center; gap: 12px; background-color: black; padding: 8px; border-radius: 8px;">
<div>
<img src="./assets/icons/copylink.svg">
</div>
<p style="padding-top: 7px; border: none; width: 368px; background: transparent; outline: none; color: #fff;text-overflow: ellipsis !important; margin: 0; overflow: hidden !important; white-space: nowrap;font-weight: bold;">
https://www.cybrosys.com/blog/what-are-the-key-features-and-benefits-of-odoo-18-dynamic-accounting-reports
</p>
</div>
</div>
</div>
<div style="width: 100%;">
<div style="background-color: #FFF5F5; min-height: 289px; border-radius: 12px; padding: 32px; text-align: left;margin-left: 30px;">
<div style="margin-bottom: 24px;">
<img src="./assets/icons/youtube-icon.png"
style="padding: 10px; background-color: #FFDCDC;border-radius: 12px;">
</div>
<h3 style="color: #121212; font-size: 24px; font-weight: 700; margin-bottom: 12px;">
Video Tutorial</h3>
<p style="color: #666666; font-size: 16px; margin-bottom: 28px;">Watch Detailed Demo on
Youtube</p>
<a href="https://youtu.be/bqtqqnGVAD8" target="_blank"
style="display: inline-block; text-decoration: none; background-color: #FF3636; color: white; width: 100%; text-align: center; padding: 13px 32px; border-radius: 8px; font-weight: bold;">Watch
Demo</a>
</div>
</div>
</div>
</div>
<!-- Black Banner section -->
<div class="my-5">
<div class="position-relative"
style=" padding: 5rem 4rem 5rem 4rem; background-color: #0A1425; border-radius: 12px;">
<div class="d-flex flex-column gap-4">
<span class="wrapper-subtitle"
style="font-size: 40px; font-weight: 700; color: #fff;line-height: 60px; text-transform: capitalize; width: 450px; font-family: Montserrat;">Odoo18 Dynamic Accounting Reports</span>
<h3 class="wrapper-details"
style="font-size: 20px; font-weight: 400; color: #fff; line-height: 32px; ">
Are you ready to make your business more
organized?
<br> Improve now!
</h3>
<div class="d-flex gap-3">
<a href="mailto:odoo@cybrosys.com"
class="shop-btn" style="cursor: pointer; border-radius: 16px; display: flex; justify-content: center; align-items: center; gap: 7px;
border: 1px solid #ffffff33;
background-color: #ffffff14;
backdrop-filter: blur(10px); color: #fff; padding: 12px 16px 12px 16px; text-decoration: none;">
<span style="border-radius: 12px;
background-color: #ffffff1a;
backdrop-filter: blur(6px);padding: 12px; ">
<img src="./assets/icons/banner-mail.svg">
</span>
<span style="font-weight: 500;font-family: Montserrat;">odoo@cybrosys.com</span>
</a>
<a href="https://wa.me/9074270811" class="shop-btn" target="_blank"
style="cursor: pointer; border-radius: 16px; display: flex; justify-content: center; align-items: center; gap: 7px;
border: 1px solid #ffffff33;
background-color: #ffffff14;
backdrop-filter: blur(10px); color: #fff; padding: 12px 22px 12px 18px; text-decoration: none;">
<span style="border-radius: 12px;
background-color: #ffffff1a;
backdrop-filter: blur(6px);padding: 12px;">
<img src="./assets/icons/banner-call.svg">
</span>
<span style="font-weight: 500;font-family: Montserrat;">+91 9074270811</span>
</a>
</div>
</div>
<div class="position-absolute bottom-0 end-0">
<img src="./assets/icons/banner-pattern.svg"
style="width: 540px;">
</div>
</div>
</div>
<!-- End of Black Banner -->
<!-- key-highlight --> <!-- key-highlight -->
<div class="" style="border-radius: 16px; <div class="" style="border-radius: 16px;
padding: 60px 40px; padding: 60px 40px;
@ -452,7 +298,56 @@
</div> </div>
</div> </div>
</div> </div>
<!--code -->
<div class="my-5">
<div style=" padding: 5rem 4rem 5rem 4rem; background-color: #0A1425; border-radius: 12px; position: relative;">
<div class="wrapper-info"
style="display: flex; flex-direction: column; gap: 20px;">
<span class="wrapper-subtitle"
style="font-size: 40px; font-weight: 700; color: #fff;line-height: 60px; text-transform: capitalize; width: 450px;">Odoo18 Dynamic Accounting Reports</span>
<h3 class="wrapper-details"
style="font-size: 20px; font-weight: 400; color: #fff; line-height: 32px; ">
Are you ready to make your business more
organized?
<br> Improve now!
</h3>
<div class="d-flex gap-3">
<a href="mailto:odoo@cybrosys.com"
class="shop-btn" style="cursor: pointer; border-radius: 16px; display: flex; justify-content: center; align-items: center; gap: 7px;
border: 1px solid var(--DarkOverlayElement-DO20, rgba(255, 255, 255, 0.20));
background: linear-gradient(93deg, rgba(255, 255, 255, 0.08) 6.01%, rgba(255, 255, 255, 0.17) 90.83%);
backdrop-filter: blur(10px); color: #fff; padding: 12px 16px 12px 16px; text-decoration: none;">
<span style="border-radius: 12px;
background: var(--DarkOverlayElement-DO10, rgba(255, 255, 255, 0.10));
backdrop-filter: blur(6px);padding: 12px;">
<img src="./assets/icons/banner-mail.svg">
</span>
<span style="font-weight: 500;">odoo@cybrosys.com</span>
</a>
<a href="https://wa.me/919074270811"
target="_blank" class="shop-btn"
style="cursor: pointer; border-radius: 16px; display: flex; justify-content: center; align-items: center; gap: 7px;
border: 1px solid var(--DarkOverlayElement-DO20, rgba(255, 255, 255, 0.20));
background: linear-gradient(93deg, rgba(255, 255, 255, 0.08) 6.01%, rgba(255, 255, 255, 0.17) 90.83%);
backdrop-filter: blur(10px); color: #fff; padding: 12px 22px 12px 18px; text-decoration: none;">
<span style="border-radius: 12px;
background: var(--DarkOverlayElement-DO10, rgba(255, 255, 255, 0.10));
backdrop-filter: blur(6px);padding: 12px;">
<img src="./assets/icons/banner-call.svg">
</span>
<span style="font-weight: 500;">+91 9074270811</span>
</a>
</div>
</div>
<div class=""
style="position: absolute; bottom: 0; right: 0;">
<img src="./assets/icons/banner-pattern.svg"
style="width: 540px;">
</div>
</div>
</div>
<!-- end-code -->
<!-- -->
<!-- screenshot and other --> <!-- screenshot and other -->
<div class="mb-4 bg-white" <div class="mb-4 bg-white"
@ -1349,6 +1244,7 @@
<p style="font-weight:400; font-size:16px; line-height:150%; text-align:center; color:var(--text-color-light)"> <p style="font-weight:400; font-size:16px; line-height:150%; text-align:center; color:var(--text-color-light)">
</p> </p>
</div> </div>
<div class="col-md-12 text-center"> <div class="col-md-12 text-center">
@ -1859,8 +1755,7 @@
aria-controls="collapseFAQOne" aria-controls="collapseFAQOne"
style="cursor: pointer; background-color:#f8f8f8; border:none; border-top-right-radius:10px; border-top-left-radius:10px; padding: 12px 24px;"> style="cursor: pointer; background-color:#f8f8f8; border:none; border-top-right-radius:10px; border-top-left-radius:10px; padding: 12px 24px;">
<a class="card-title text-decoration-none" <a class="card-title text-decoration-none"
style=" font-size:18px; line-height:30px; font-weight:500; color:#040f3a">Is style=" font-size:18px; line-height:30px; font-weight:500; color:#040f3a">Is it possible to apply filters to the reports?
it possible to apply filters to the reports?
<img alt="" <img alt=""
class="float-end" class="float-end"
src="//apps.odoocdn.com/apps/assets/16.0/index_test_odoo/assets/icons/down.svg?6ef7fd7" src="//apps.odoocdn.com/apps/assets/16.0/index_test_odoo/assets/icons/down.svg?6ef7fd7"

45
dynamic_accounts_report/static/src/js/aged_receivable_report.js

@ -5,6 +5,7 @@ import { useService } from "@web/core/utils/hooks";
import { useRef, useState } from "@odoo/owl"; import { useRef, useState } from "@odoo/owl";
import { BlockUI } from "@web/core/ui/block_ui"; import { BlockUI } from "@web/core/ui/block_ui";
import { download } from "@web/core/network/download"; import { download } from "@web/core/network/download";
import { formatFloat } from "@web/core/utils/numbers";
const actionRegistry = registry.category("actions"); const actionRegistry = registry.category("actions");
const today = luxon.DateTime.now(); const today = luxon.DateTime.now();
@ -38,8 +39,8 @@ class AgedReceivable extends owl.Component {
/** /**
* Loads the data for the bank book report. * Loads the data for the bank book report.
*/ */
let move_line_list = [] let move_line_list = [];
let move_lines_total = '' let move_lines_total = '';
let diff0Sum = 0; let diff0Sum = 0;
let diff1Sum = 0; let diff1Sum = 0;
let diff2Sum = 0; let diff2Sum = 0;
@ -51,7 +52,6 @@ class AgedReceivable extends owl.Component {
var self = this; var self = this;
var action_title = self.props.action.display_name; var action_title = self.props.action.display_name;
try { try {
var self = this;
self.state.data = await self.orm.call("age.receivable.report", "view_report", []); self.state.data = await self.orm.call("age.receivable.report", "view_report", []);
for (const index in self.state.data) { for (const index in self.state.data) {
const value = self.state.data[index]; const value = self.state.data[index];
@ -61,6 +61,7 @@ class AgedReceivable extends owl.Component {
move_lines_total = value; move_lines_total = value;
for (const moveLine of Object.values(move_lines_total)) { for (const moveLine of Object.values(move_lines_total)) {
currency = moveLine.currency_id; currency = moveLine.currency_id;
// Use raw values for summation
diff0Sum += moveLine.diff0_sum || 0; diff0Sum += moveLine.diff0_sum || 0;
diff1Sum += moveLine.diff1_sum || 0; diff1Sum += moveLine.diff1_sum || 0;
diff2Sum += moveLine.diff2_sum || 0; diff2Sum += moveLine.diff2_sum || 0;
@ -71,18 +72,25 @@ class AgedReceivable extends owl.Component {
} }
} }
} }
self.state.move_line = move_line_list self.state.move_line = move_line_list;
self.state.total = move_lines_total self.state.total = move_lines_total;
self.state.currency = currency self.state.currency = currency;
self.state.total_debit = TotalDebit self.state.total_debit = TotalDebit;
self.state.diff0_sum = diff0Sum self.state.diff0_sum = diff0Sum;
self.state.diff1_sum = diff1Sum self.state.diff1_sum = diff1Sum;
self.state.diff2_sum = diff2Sum self.state.diff2_sum = diff2Sum;
self.state.diff3_sum = diff3Sum self.state.diff3_sum = diff3Sum;
self.state.diff4_sum = diff4Sum self.state.diff4_sum = diff4Sum;
self.state.diff5_sum = diff5Sum self.state.diff5_sum = diff5Sum;
} // Format totals for display
catch (el) { self.state.total_debit_display = formatFloat(TotalDebit, { digits: [0, 2] });
self.state.diff0_sum_display = formatFloat(diff0Sum, { digits: [0, 2] });
self.state.diff1_sum_display = formatFloat(diff1Sum, { digits: [0, 2] });
self.state.diff2_sum_display = formatFloat(diff2Sum, { digits: [0, 2] });
self.state.diff3_sum_display = formatFloat(diff3Sum, { digits: [0, 2] });
self.state.diff4_sum_display = formatFloat(diff4Sum, { digits: [0, 2] });
self.state.diff5_sum_display = formatFloat(diff5Sum, { digits: [0, 2] });
} catch (el) {
window.location.href; window.location.href;
} }
} }
@ -163,12 +171,19 @@ class AgedReceivable extends owl.Component {
var action_title = self.props.action.display_name; var action_title = self.props.action.display_name;
let totals = { let totals = {
'diff0_sum':this.state.diff0_sum, 'diff0_sum':this.state.diff0_sum,
'diff0_sum_display':this.state.diff0_sum_display,
'diff1_sum':this.state.diff1_sum, 'diff1_sum':this.state.diff1_sum,
'diff1_sum_display':this.state.diff1_sum_display,
'diff2_sum':this.state.diff2_sum, 'diff2_sum':this.state.diff2_sum,
'diff2_sum_display':this.state.diff2_sum_display,
'diff3_sum':this.state.diff3_sum, 'diff3_sum':this.state.diff3_sum,
'diff3_sum_display':this.state.diff3_sum_display,
'diff4_sum':this.state.diff4_sum, 'diff4_sum':this.state.diff4_sum,
'diff4_sum_display':this.state.diff4_sum_display,
'diff5_sum':this.state.diff5_sum, 'diff5_sum':this.state.diff5_sum,
'diff5_sum_display':this.state.diff5_sum_display,
'total_debit':this.state.total_debit, 'total_debit':this.state.total_debit,
'total_debit_display':this.state.total_debit_display,
'currency':this.state.currency, 'currency':this.state.currency,
} }
return self.action.doAction({ return self.action.doAction({

40
dynamic_accounts_report/static/src/js/bank_flow.js

@ -28,13 +28,25 @@ class BankBook extends owl.Component {
options: null, options: null,
selected_account_list: [], selected_account_list: [],
total_debit: null, total_debit: null,
total_debit_display: null,
total_credit: null, total_credit: null,
total_credit_display: null,
currency: null, currency: null,
message_list : [], message_list : [],
}); });
this.load_data(self.initial_render = true); 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() { async load_data() {
/** /**
* Loads the data for the bank book report. * Loads the data for the bank book report.
@ -50,6 +62,8 @@ class BankBook extends owl.Component {
try { try {
var self = this; var self = this;
self.state.data = await self.orm.call("bank.book.report", "view_report", []); self.state.data = await self.orm.call("bank.book.report", "view_report", []);
for (const index in self.state.data) { for (const index in self.state.data) {
const value = self.state.data[index]; const value = self.state.data[index];
if (index !== 'move_lines_total' && index !== 'accounts') { if (index !== 'move_lines_total' && index !== 'accounts') {
@ -62,14 +76,36 @@ class BankBook extends owl.Component {
currency = moveLine.currency_id; currency = moveLine.currency_id;
totalDebitSum += moveLine.total_debit || 0; totalDebitSum += moveLine.total_debit || 0;
totalCreditSum += moveLine.total_credit || 0; totalCreditSum += moveLine.total_credit || 0;
moveLine.total_debit_display = this.formatNumberWithSeparators(moveLine.total_debit || 0);
moveLine.total_credit_display = this.formatNumberWithSeparators(moveLine.total_credit || 0);
moveLine.balance = this.formatNumberWithSeparators(moveLine.total_debit - moveLine.total_credit || 0);
} }
} }
} }
self.state.move_line = move_line_list self.state.move_line = move_line_list
for (const key of move_line_list) {
for (const line of self.state.data[key]) {
if (line.debit !== undefined) {
line.debit_display = this.formatNumberWithSeparators(line.debit || 0);
}
if (line.credit !== undefined) {
line.credit_display = this.formatNumberWithSeparators(line.credit || 0);
}
if (line.balance !== undefined) {
line.balance_display = this.formatNumberWithSeparators(line.balance || 0);
}
}
}
self.state.total = move_lines_total self.state.total = move_lines_total
self.state.currency = currency self.state.currency = currency
self.state.total_debit = totalDebitSum.toFixed(2) 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 = totalCreditSum.toFixed(2)
self.state.total_credit_display = this.formatNumberWithSeparators(self.state.total_credit)
} }
catch (el) { catch (el) {
window.location.href; window.location.href;
@ -104,7 +140,9 @@ class BankBook extends owl.Component {
var self = this; var self = this;
let totals = { let totals = {
'total_debit':this.state.total_debit, 'total_debit':this.state.total_debit,
'total_debit_display':this.state.total_debit_display,
'total_credit':this.state.total_credit, 'total_credit':this.state.total_credit,
'total_credit_display':this.state.total_credit_display,
'currency':this.state.currency, 'currency':this.state.currency,
} }
var action_title = self.props.action.display_name; var action_title = self.props.action.display_name;
@ -196,7 +234,9 @@ class BankBook extends owl.Component {
var action_title = self.props.action.display_name; var action_title = self.props.action.display_name;
let totals = { let totals = {
'total_debit':this.state.total_debit, 'total_debit':this.state.total_debit,
'total_debit_display':this.state.total_debit_display,
'total_credit':this.state.total_credit, 'total_credit':this.state.total_credit,
'total_credit_display':this.state.total_credit_display,
'currency':this.state.currency, 'currency':this.state.currency,
} }
var datas = { var datas = {

2
dynamic_accounts_report/static/src/js/cash_flow.js

@ -103,7 +103,7 @@ class CashBook extends owl.Component {
let totals = { let totals = {
'total_debit':this.state.total_debit, 'total_debit':this.state.total_debit,
'total_credit':this.state.total_credit, 'total_credit':this.state.total_credit,
'currency':this.state.currency, 'currency':this.state.currency || false,
} }
return self.action.doAction({ return self.action.doAction({
'type': 'ir.actions.report', 'type': 'ir.actions.report',

34
dynamic_accounts_report/static/src/js/general_ledger.js

@ -21,6 +21,8 @@ class GeneralLedger extends owl.Component {
account_data_list: null, account_data_list: null,
account_total: null, account_total: null,
total_debit: null, total_debit: null,
total_debit_display : null,
total_credit_display : null,
total_credit: null, total_credit: null,
currency: null, currency: null,
journals: null, journals: null,
@ -39,6 +41,16 @@ class GeneralLedger extends owl.Component {
}); });
this.load_data(self.initial_render = true); 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() { async load_data() {
let account_list = [] let account_list = []
let account_totals = '' let account_totals = ''
@ -54,7 +66,7 @@ class GeneralLedger extends owl.Component {
self.state.analytics = filtered_data['analytic_ids'] self.state.analytics = filtered_data['analytic_ids']
account_totals = filtered_data['account_totals'] account_totals = filtered_data['account_totals']
self.state.account_data = await self.orm.call("account.general.ledger", "view_report", [self.wizard_id, action_title,]); self.state.account_data = await self.orm.call("account.general.ledger", "view_report", [self.wizard_id, action_title,]);
$.each(self.state.account_data, function (index, value) { for (const [index, value] of Object.entries(self.state.account_data)){
if (index !== 'account_totals' && index !== 'journal_ids' && index !== 'analytic_ids') { if (index !== 'account_totals' && index !== 'journal_ids' && index !== 'analytic_ids') {
account_list.push(index) account_list.push(index)
} else if (index == 'journal_ids') { } else if (index == 'journal_ids') {
@ -68,10 +80,14 @@ class GeneralLedger extends owl.Component {
Object.values(account_totals).forEach(account_list => { Object.values(account_totals).forEach(account_list => {
currency = account_list.currency_id currency = account_list.currency_id
totalDebitSum += account_list.total_debit || 0; totalDebitSum += account_list.total_debit || 0;
account_list.total_debit_display = this.formatNumberWithSeparators(account_list.total_debit || 0);
totalCreditSum += account_list.total_credit || 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 = account_list
self.state.account_list = account_list self.state.account_list = account_list
self.state.account_data_list = self.state.account_data 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.account_total = account_totals
self.state.currency = currency self.state.currency = currency
self.state.total_debit = totalDebitSum.toFixed(2) 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 = totalCreditSum.toFixed(2)
self.state.total_credit_display = this.formatNumberWithSeparators(self.state.total_credit)
self.state.title = action_title self.state.title = action_title
} }
catch (el) { catch (el) {
@ -90,9 +108,11 @@ class GeneralLedger extends owl.Component {
ev.preventDefault(); ev.preventDefault();
var self = this; var self = this;
let totals = { let totals = {
'total_debit':this.state.total_debit, 'total_debit':this.state.total_debit || false,
'total_credit':this.state.total_credit, 'total_debit_display':this.state.total_debit_display || false,
'currency':this.state.currency, '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; var action_title = self.props.action.display_name;
return self.action.doAction({ return self.action.doAction({
@ -102,7 +122,7 @@ class GeneralLedger extends owl.Component {
'report_file': 'dynamic_accounts_report.general_ledger', 'report_file': 'dynamic_accounts_report.general_ledger',
'data': { 'data': {
'account': self.state.account, 'account': self.state.account,
'data': self.state.account_data, 'account_data': self.state.account_data,
'total': self.state.account_total, 'total': self.state.account_total,
'title': action_title, 'title': action_title,
'filters': this.filter(), 'filters': this.filter(),
@ -116,7 +136,9 @@ class GeneralLedger extends owl.Component {
var self = this; var self = this;
let totals = { let totals = {
'total_debit':this.state.total_debit, 'total_debit':this.state.total_debit,
'total_debit_display':this.state.total_debit_display || false,
'total_credit':this.state.total_credit, 'total_credit':this.state.total_credit,
'total_credit_display':this.state.total_credit_display || false,
'currency':this.state.currency, 'currency':this.state.currency,
} }
var action_title = self.props.action.display_name; var action_title = self.props.action.display_name;

46
dynamic_accounts_report/static/src/js/partner_ledger.js

@ -26,6 +26,7 @@ class PartnerLedger extends owl.Component {
selected_partner: [], selected_partner: [],
selected_partner_rec: [], selected_partner_rec: [],
total_debit: null, total_debit: null,
total_debit_display:null,
total_credit: null, total_credit: null,
partner_list: null, partner_list: null,
total_list: null, total_list: null,
@ -35,8 +36,19 @@ class PartnerLedger extends owl.Component {
message_list : [], message_list : [],
}); });
this.load_data(self.initial_render = true); 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() { async load_data() {
/** /**
* Loads the data for the partner ledger report. * Loads the data for the partner ledger report.
@ -51,27 +63,35 @@ class PartnerLedger extends owl.Component {
try { try {
var self = this; var self = this;
self.state.data = await self.orm.call("account.partner.ledger", "view_report", [[this.wizard_id], action_title,]); self.state.data = await self.orm.call("account.partner.ledger", "view_report", [[this.wizard_id], action_title,]);
// Extract partner information from the data const dataArray = self.state.data;
$.each(self.state.data, function (index, value) { Object.entries(dataArray).forEach(([key, value]) => {
if (index !== 'partner_totals') { if (key !== 'partner_totals') {
partner_list.push(index) partner_list.push(key);
} value.forEach(entry => {
else { entry[0].debit_display = this.formatNumberWithSeparators(entry[0].debit || 0);
partner_totals = value entry[0].credit_display = this.formatNumberWithSeparators(entry[0].credit || 0);
Object.values(partner_totals).forEach(partner_list => { entry[0].amount_currency_display = this.formatNumberWithSeparators(entry[0].amount_currency || 0);
currency = partner_list.currency_id
totalDebitSum += partner_list.total_debit || 0;
totalCreditSum += partner_list.total_credit || 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.partners = partner_list
self.state.partner_list = partner_list self.state.partner_list = partner_list
self.state.total_list = partner_totals self.state.total_list = partner_totals
self.state.total = partner_totals self.state.total = partner_totals
self.state.currency = currency self.state.currency = currency
self.state.total_debit = totalDebitSum 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 = totalCreditSum
self.state.total_credit_display = this.formatNumberWithSeparators(self.state.total_credit || 0)
self.state.title = action_title self.state.title = action_title
} }
catch (el) { catch (el) {
@ -91,7 +111,9 @@ class PartnerLedger extends owl.Component {
let partner_totals = '' let partner_totals = ''
let totals = { let totals = {
'total_debit':this.state.total_debit, 'total_debit':this.state.total_debit,
'total_debit_display':this.state.total_debit_display,
'total_credit':this.state.total_credit, 'total_credit':this.state.total_credit,
'total_credit_display':this.state.total_credit_display,
'currency':this.state.currency, 'currency':this.state.currency,
} }
var action_title = this.props.action.display_name; var action_title = this.props.action.display_name;

49
dynamic_accounts_report/static/src/js/trial_balance.js

@ -26,6 +26,7 @@ class TrialBalance extends owl.Component {
data: null, data: null,
total: null, total: null,
journals: null, journals: null,
accounts: null,
selected_analytic: [], selected_analytic: [],
analytic_account: null, analytic_account: null,
selected_journal_list: [], 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.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.date_viewed.push(monthNamesShort[today.getMonth()] + ' ' + today.getFullYear())
self.state.journals = self.state.data[1]['journal_ids'] self.state.journals = self.state.data[1]['journal_ids']
self.state.accounts = self.state.data[0]
$.each(self.state.data, function (index, value) { $.each(self.state.data, function (index, value) {
self.state.journals = value.journal_ids 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,]); 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 = [] var date_viewed = []
this.state.data.forEach((value, index) => { // this.state.data.forEach((value, index) => {
if (index == 'journal_ids') { // console.log(index)
this.state.journals = value // if (index == 'journal_ids') {
} // this.state.journals = value
if (value.dynamic_date_num) { // console.log(this.state.journals)
let iterable = Array.isArray(value.dynamic_date_num) ? value.dynamic_date_num // }
: Object.values(value.dynamic_date_num); // if (value.dynamic_date_num) {
for (const date_num of iterable) { // let iterable = Array.isArray(value.dynamic_date_num) ? value.dynamic_date_num
if (!date_viewed.includes(date_num)) { // : Object.values(value.dynamic_date_num);
date_viewed.push(date_num); // for (const date_num of iterable) {
} // if (!date_viewed.includes(date_num)) {
} // date_viewed.push(date_num);
} // }
}) // }
// }
// })
if (date_viewed.length !== 0) { if (date_viewed.length !== 0) {
this.state.date_viewed = date_viewed.reverse() this.state.date_viewed = date_viewed.reverse()
} }
@ -307,14 +311,15 @@ class TrialBalance extends owl.Component {
this.applyFilter(null, ev) this.applyFilter(null, ev)
} }
sumByKey(data, key) { sumByKey(data, key) {
/** if (!Array.isArray(data)) return 0;
* Calculates the sum of values in an array of objects by a specified key. return data.reduce((acc, item) => {
* let raw = item[key];
* @param {Array} data - Array of objects containing numeric values. if (typeof raw === 'string') {
* @param {string} key - The key to access the numeric value in each object. raw = raw.replace(/,/g, ''); // remove commas
* @returns {number} The sum of the numeric values. }
*/ const val = parseFloat(raw);
return data.reduce((acc, item) => acc + (item[key] || 0), 0); return acc + (isNaN(val) ? 0 : val);
}, 0);
} }
get comparison_number_range() { get comparison_number_range() {
/** /**

35
dynamic_accounts_report/static/src/xml/aged_receivable_report_views.xml

@ -191,7 +191,7 @@
<t t-if="state.total[move_line]['diff0_sum']" <t t-if="state.total[move_line]['diff0_sum']"
t-esc="state.total[move_line]['currency_id']"/> t-esc="state.total[move_line]['currency_id']"/>
<t t-if="state.total[move_line]['diff0_sum']" <t t-if="state.total[move_line]['diff0_sum']"
t-esc="state.total[move_line]['diff0_sum']"/> t-esc="state.total[move_line]['diff0_sum_display']"/>
</span> </span>
</th> </th>
<th> <th>
@ -199,7 +199,7 @@
<t t-if="state.total[move_line]['diff1_sum']" <t t-if="state.total[move_line]['diff1_sum']"
t-esc="state.total[move_line]['currency_id']"/> t-esc="state.total[move_line]['currency_id']"/>
<t t-if="state.total[move_line]['diff1_sum']" <t t-if="state.total[move_line]['diff1_sum']"
t-esc="state.total[move_line]['diff1_sum']"/> t-esc="state.total[move_line]['diff1_sum_display']"/>
</span> </span>
</th> </th>
<th> <th>
@ -207,7 +207,7 @@
<t t-if="state.total[move_line]['diff2_sum']" <t t-if="state.total[move_line]['diff2_sum']"
t-esc="state.total[move_line]['currency_id']"/> t-esc="state.total[move_line]['currency_id']"/>
<t t-if="state.total[move_line]['diff2_sum']" <t t-if="state.total[move_line]['diff2_sum']"
t-esc="state.total[move_line]['diff2_sum']"/> t-esc="state.total[move_line]['diff2_sum_display']"/>
</span> </span>
</th> </th>
<th> <th>
@ -215,7 +215,7 @@
<t t-if="state.total[move_line]['diff3_sum']" <t t-if="state.total[move_line]['diff3_sum']"
t-esc="state.total[move_line]['currency_id']"/> t-esc="state.total[move_line]['currency_id']"/>
<t t-if="state.total[move_line]['diff3_sum']" <t t-if="state.total[move_line]['diff3_sum']"
t-esc="state.total[move_line]['diff3_sum']"/> t-esc="state.total[move_line]['diff3_sum_display']"/>
</span> </span>
</th> </th>
<th> <th>
@ -223,7 +223,7 @@
<t t-if="state.total[move_line]['diff4_sum']" <t t-if="state.total[move_line]['diff4_sum']"
t-esc="state.total[move_line]['currency_id']"/> t-esc="state.total[move_line]['currency_id']"/>
<t t-if="state.total[move_line]['diff4_sum']" <t t-if="state.total[move_line]['diff4_sum']"
t-esc="state.total[move_line]['diff4_sum']"/> t-esc="state.total[move_line]['diff4_sum_display']"/>
</span> </span>
</th> </th>
<th> <th>
@ -231,7 +231,7 @@
<t t-if="state.total[move_line]['diff5_sum']" <t t-if="state.total[move_line]['diff5_sum']"
t-esc="state.total[move_line]['currency_id']"/> t-esc="state.total[move_line]['currency_id']"/>
<t t-if="state.total[move_line]['diff5_sum']" <t t-if="state.total[move_line]['diff5_sum']"
t-esc="state.total[move_line]['diff5_sum']"/> t-esc="state.total[move_line]['diff5_sum_display']"/>
</span> </span>
</th> </th>
<th> <th>
@ -239,7 +239,7 @@
<t t-if="state.total[move_line]['debit_sum']" <t t-if="state.total[move_line]['debit_sum']"
t-esc="state.total[move_line]['currency_id']"/> t-esc="state.total[move_line]['currency_id']"/>
<t t-if="state.total[move_line]['debit_sum']" <t t-if="state.total[move_line]['debit_sum']"
t-esc="state.total[move_line]['debit_sum']"/> t-esc="state.total[move_line]['debit_sum_display']"/>
</span> </span>
</th> </th>
</tr> </tr>
@ -250,8 +250,13 @@
t-attf-id="move_line-{{i}}"> t-attf-id="move_line-{{i}}">
<th colspan="6"> <th colspan="6">
<span style="gap: 12px;display: flex;"> <span style="gap: 12px;display: flex;">
<t t-if="valuelist['move_name']">
<t t-esc="valuelist['move_name']"/> <t t-esc="valuelist['move_name']"/>
<t t-esc="valuelist['name']"/> </t>
<!-- <t t-if="valuelist['name']">-->
<!-- <t t-esc="valuelist['name']"/>-->
<!-- </t>-->
<a type="button" <a type="button"
class="dropdown-toggle" class="dropdown-toggle"
data-bs-toggle="dropdown"> data-bs-toggle="dropdown">
@ -359,31 +364,31 @@
</th> </th>
<th class="o_heading"> <th class="o_heading">
<t t-esc="state.currency"/> <t t-esc="state.currency"/>
<t t-out="state.diff0_sum"/> <t t-out="state.diff0_sum_display"/>
</th> </th>
<th class="o_heading"> <th class="o_heading">
<t t-esc="state.currency"/> <t t-esc="state.currency"/>
<t t-out="state.diff1_sum"/> <t t-out="state.diff1_sum_display"/>
</th> </th>
<th class="o_heading"> <th class="o_heading">
<t t-esc="state.currency"/> <t t-esc="state.currency"/>
<t t-out="state.diff2_sum"/> <t t-out="state.diff2_sum_display"/>
</th> </th>
<th class="o_heading"> <th class="o_heading">
<t t-esc="state.currency"/> <t t-esc="state.currency"/>
<t t-out="state.diff3_sum"/> <t t-out="state.diff3_sum_display"/>
</th> </th>
<th class="o_heading"> <th class="o_heading">
<t t-esc="state.currency"/> <t t-esc="state.currency"/>
<t t-out="state.diff4_sum"/> <t t-out="state.diff4_sum_display"/>
</th> </th>
<th class="o_heading"> <th class="o_heading">
<t t-esc="state.currency"/> <t t-esc="state.currency"/>
<t t-out="state.diff5_sum"/> <t t-out="state.diff5_sum_display"/>
</th> </th>
<th class="o_heading"> <th class="o_heading">
<t t-esc="state.currency"/> <t t-esc="state.currency"/>
<t t-out="state.total_debit"/> <t t-out="state.total_debit_display"/>
</th> </th>
</tr> </tr>
</tbody> </tbody>

14
dynamic_accounts_report/static/src/xml/bank_flow_templates.xml

@ -238,7 +238,7 @@
<t t-if="state.total[move_line]['total_debit']" <t t-if="state.total[move_line]['total_debit']"
t-esc="state.total[move_line]['currency_id']"/> t-esc="state.total[move_line]['currency_id']"/>
<t t-if="state.total[move_line]['total_debit']" <t t-if="state.total[move_line]['total_debit']"
t-esc="state.total[move_line]['total_debit']"/> t-esc="state.total[move_line]['total_debit_display']"/>
</span> </span>
</th> </th>
<th> <th>
@ -246,13 +246,13 @@
<t t-if="state.total[move_line]['total_credit']" <t t-if="state.total[move_line]['total_credit']"
t-esc="state.total[move_line]['currency_id']"/> t-esc="state.total[move_line]['currency_id']"/>
<t t-if="state.total[move_line]['total_credit']" <t t-if="state.total[move_line]['total_credit']"
t-esc="state.total[move_line]['total_credit']"/> t-esc="state.total[move_line]['total_credit_display']"/>
</span> </span>
</th> </th>
<th> <th>
<span class="fw-bolder"> <span class="fw-bolder">
<t t-esc="state.total[move_line]['currency_id']"/> <t t-esc="state.total[move_line]['currency_id']"/>
<t t-esc="(state.total[move_line]['total_debit'] - state.total[move_line]['total_credit']).toFixed(2)"/> <t t-esc="state.total[move_line]['balance']"/>
</span> </span>
</th> </th>
</tr> </tr>
@ -320,7 +320,7 @@
<t t-if="valuelist['debit']" <t t-if="valuelist['debit']"
t-esc="state.total[move_line]['currency_id']"/> t-esc="state.total[move_line]['currency_id']"/>
<t t-if="valuelist['debit']" <t t-if="valuelist['debit']"
t-esc="valuelist['debit']"/> t-esc="valuelist['debit_display']"/>
</span> </span>
</th> </th>
<th> <th>
@ -328,7 +328,7 @@
<t t-if="valuelist['credit']" <t t-if="valuelist['credit']"
t-esc="state.total[move_line]['currency_id']"/> t-esc="state.total[move_line]['currency_id']"/>
<t t-if="valuelist['credit']" <t t-if="valuelist['credit']"
t-esc="valuelist['credit']"/> t-esc="valuelist['credit_display']"/>
</span> </span>
</th> </th>
</tr> </tr>
@ -342,11 +342,11 @@
</th> </th>
<th class="o_heading"> <th class="o_heading">
<t t-esc="state.currency"/> <t t-esc="state.currency"/>
<t t-out="state.total_debit"/> <t t-out="state.total_debit_display"/>
</th> </th>
<th class="o_heading"> <th class="o_heading">
<t t-esc="state.currency"/> <t t-esc="state.currency"/>
<t t-out="state.total_credit"/> <t t-out="state.total_credit_display"/>
</th> </th>
<th class="o_heading"> <th class="o_heading">
<t t-esc="state.currency"/> <t t-esc="state.currency"/>

1
dynamic_accounts_report/static/src/xml/cash_flow_templates.xml

@ -131,7 +131,6 @@
<div class="dropdown-menu" role="menu"> <div class="dropdown-menu" role="menu">
<div class="list-group"> <div class="list-group">
<t t-if="state.accounts"> <t t-if="state.accounts">
<t t-log="state.accounts"/>
<t t-foreach="state.accounts" <t t-foreach="state.accounts"
t-as="account" t-as="account"
t-key="account.id"> t-key="account.id">

37
dynamic_accounts_report/static/src/xml/general_ledger_view.xml

@ -264,9 +264,11 @@
</tr> </tr>
</thead> </thead>
<tbody t-ref="tbody"> <tbody t-ref="tbody">
<t t-if="state.account">
<t t-if="state.account_data">
<t t-set="i" t-value="0"/> <t t-set="i" t-value="0"/>
<t t-foreach="state.account" <t t-foreach="state.account_data.account_totals"
t-as="account" t-as="account"
t-key="account_index"> t-key="account_index">
<t t-set="i" t-value="i + 1"/> <t t-set="i" t-value="i + 1"/>
@ -293,7 +295,7 @@
</div> </div>
</th> </th>
<th colspan="5"> <th colspan="5">
<button t-att-data-id="state.account_total[account]['account_id']" <button t-att-data-id="state.account_data.account_totals[account]['account_id']"
class="btn bg-secondary" class="btn bg-secondary"
style="margin-left: 3px" style="margin-left: 3px"
t-on-click="gotoJournalItem"> t-on-click="gotoJournalItem">
@ -306,27 +308,28 @@
<th/> <th/>
<th> <th>
<span> <span>
<t t-if="state.account_total[account]['total_debit']" <t t-if="state.account_data.account_totals[account]['total_debit']"
t-esc="state.account_total[account]['currency_id']"/> t-esc="state.account_data.account_totals[account]['currency_id']"/>
<t t-if="state.account_total[account]['total_debit']" <t t-if="state.account_data.account_totals[account]['total_debit']"
t-esc="state.account_total[account]['total_debit']"/> t-esc="state.account_data.account_totals[account]['total_debit_display']"/>
</span> </span>
</th> </th>
<th> <th>
<span> <span>
<t t-if="state.account_total[account]['total_credit']" <t t-if="state.account_data.account_totals[account]['total_credit']"
t-esc="state.account_total[account]['currency_id']"/> t-esc="state.account_data.account_totals[account]['currency_id']"/>
<t t-if="state.account_total[account]['total_credit']" <t t-if="state.account_data.account_totals[account]['total_credit']"
t-esc="state.account_total[account]['total_credit']"/> t-esc="state.account_data.account_totals[account]['total_credit_display']"/>
</span> </span>
</th> </th>
<th> <th>
<span class="fw-bolder"> <span class="fw-bolder">
<t t-esc="state.account_total[account]['currency_id']"/> <t t-esc="state.account_data.account_totals[account]['currency_id']"/>
<t t-esc="(state.account_total[account]['total_debit'] - state.account_total[account]['total_credit']).toFixed(2)"/> <t t-esc="state.account_data.account_totals[account]['balance_display']"/>
</span> </span>
</th> </th>
</tr> </tr>
<t t-foreach="state.account_data[account]" <t t-foreach="state.account_data[account]"
t-as="valuelist" t-as="valuelist"
t-key="valuelist_index"> t-key="valuelist_index">
@ -375,7 +378,7 @@
<th> <th>
<span> <span>
<t t-if="valuelist[0]['debit']" <t t-if="valuelist[0]['debit']"
t-esc="state.account_total[account]['currency_id']"/> t-esc="state.account_data.account_totals[account]['currency_id']"/>
<t t-if="valuelist[0]['debit']" <t t-if="valuelist[0]['debit']"
t-esc="valuelist[0]['debit']"/> t-esc="valuelist[0]['debit']"/>
</span> </span>
@ -383,7 +386,7 @@
<th> <th>
<span> <span>
<t t-if="valuelist[0]['credit']" <t t-if="valuelist[0]['credit']"
t-esc="state.account_total[account]['currency_id']"/> t-esc="state.account_data.account_totals[account]['currency_id']"/>
<t t-if="valuelist[0]['credit']" <t t-if="valuelist[0]['credit']"
t-esc="valuelist[0]['credit']"/> t-esc="valuelist[0]['credit']"/>
</span> </span>
@ -400,11 +403,11 @@
</th> </th>
<th class="o_heading"> <th class="o_heading">
<t t-esc="state.currency"/> <t t-esc="state.currency"/>
<t t-out="state.total_debit"/> <t t-out="state.total_debit_display"/>
</th> </th>
<th class="o_heading"> <th class="o_heading">
<t t-esc="state.currency"/> <t t-esc="state.currency"/>
<t t-out="state.total_credit"/> <t t-out="state.total_credit_display"/>
</th> </th>
<th class="o_heading"> <th class="o_heading">
<t t-esc="state.currency"/> <t t-esc="state.currency"/>

14
dynamic_accounts_report/static/src/xml/partner_ledger_view.xml

@ -284,7 +284,7 @@
<t t-if="state.total[partner]['total_debit']" <t t-if="state.total[partner]['total_debit']"
t-esc="state.total[partner]['currency_id']"/> t-esc="state.total[partner]['currency_id']"/>
<t t-if="state.total[partner]['total_debit']" <t t-if="state.total[partner]['total_debit']"
t-esc="state.total[partner]['total_debit']"/> t-esc="state.total[partner]['total_debit_display']"/>
</span> </span>
</th> </th>
<th> <th>
@ -292,7 +292,7 @@
<t t-if="state.total[partner]['total_credit']" <t t-if="state.total[partner]['total_credit']"
t-esc="state.total[partner]['currency_id']"/> t-esc="state.total[partner]['currency_id']"/>
<t t-if="state.total[partner]['total_credit']" <t t-if="state.total[partner]['total_credit']"
t-esc="state.total[partner]['total_credit']"/> t-esc="state.total[partner]['total_credit_display']"/>
</span> </span>
</th> </th>
<th/> <th/>
@ -412,7 +412,7 @@
<t t-if="valuelist[0]['debit']" <t t-if="valuelist[0]['debit']"
t-esc="state.total[partner]['currency_id']"/> t-esc="state.total[partner]['currency_id']"/>
<t t-if="valuelist[0]['debit']" <t t-if="valuelist[0]['debit']"
t-esc="valuelist[0]['debit']"/> t-esc="valuelist[0]['debit_display']"/>
</span> </span>
</th> </th>
<th> <th>
@ -420,7 +420,7 @@
<t t-if="valuelist[0]['credit']" <t t-if="valuelist[0]['credit']"
t-esc="state.total[partner]['currency_id']"/> t-esc="state.total[partner]['currency_id']"/>
<t t-if="valuelist[0]['credit']" <t t-if="valuelist[0]['credit']"
t-esc="valuelist[0]['credit']"/> t-esc="valuelist[0]['credit_display']"/>
</span> </span>
</th> </th>
<th> <th>
@ -428,7 +428,7 @@
<t t-if="valuelist[0]['amount_currency']" <t t-if="valuelist[0]['amount_currency']"
t-esc="state.total[partner]['currency_id']"/> t-esc="state.total[partner]['currency_id']"/>
<t t-if="valuelist[0]['amount_currency']" <t t-if="valuelist[0]['amount_currency']"
t-esc="valuelist[0]['amount_currency']"/> t-esc="valuelist[0]['amount_currency_display']"/>
</span> </span>
</th> </th>
</tr> </tr>
@ -442,11 +442,11 @@
</th> </th>
<th class="o_heading"> <th class="o_heading">
<t t-esc="state.currency"/> <t t-esc="state.currency"/>
<t t-out="state.total_debit"/> <t t-out="state.total_debit_display"/>
</th> </th>
<th class="o_heading"> <th class="o_heading">
<t t-esc="state.currency"/> <t t-esc="state.currency"/>
<t t-out="state.total_credit"/> <t t-out="state.total_credit_display"/>
</th> </th>
<th/> <th/>
<th class="o_heading"> <th class="o_heading">

26
dynamic_accounts_report/static/src/xml/trial_balance_view.xml

@ -312,7 +312,7 @@
<tbody t-ref="tbody"> <tbody t-ref="tbody">
<t t-if="state.data"> <t t-if="state.data">
<t t-set="i" t-value="0"/> <t t-set="i" t-value="0"/>
<t t-foreach="state.data" <t t-foreach="state.accounts"
t-as="move_line" t-as="move_line"
t-key="move_line_index"> t-key="move_line_index">
<t t-set="i" t-value="i + 1"/> <t t-set="i" t-value="i + 1"/>
@ -369,19 +369,19 @@
</t> </t>
<th style="text-align:center;"> <th style="text-align:center;">
<t t-if="move_line['total_debit']" <t t-if="move_line['total_debit']"
t-esc="move_line['total_debit'].toFixed(2)"/> t-esc="move_line['total_debit']"/>
</th> </th>
<th style="text-align:center;"> <th style="text-align:center;">
<t t-if="move_line['total_credit']" <t t-if="move_line['total_credit']"
t-esc="move_line['total_credit'].toFixed(2)"/> t-esc="move_line['total_credit']"/>
</th> </th>
<th style="text-align:center;"> <th style="text-align:center;">
<t t-if="move_line['end_total_debit']" <t t-if="move_line['end_total_debit']"
t-esc="move_line['end_total_debit'].toFixed(2)"/> t-esc="move_line['end_total_debit']"/>
</th> </th>
<th style="text-align:center;"> <th style="text-align:center;">
<t t-if="move_line['end_total_credit']" <t t-if="move_line['end_total_credit']"
t-esc="move_line['end_total_credit'].toFixed(2)"/> t-esc="move_line['end_total_credit']"/>
</th> </th>
</tr> </tr>
</t> </t>
@ -389,10 +389,10 @@
style="border-spacing: 0 10px;color:#000"> style="border-spacing: 0 10px;color:#000">
<th colspan="6">Total</th> <th colspan="6">Total</th>
<th style="text-align:center;"> <th style="text-align:center;">
<t t-esc="sumByKey(state.data, 'initial_total_debit').toFixed(2)"/> <t t-esc="sumByKey(state.accounts, 'initial_total_debit')"/>
</th> </th>
<th style="text-align:center;"> <th style="text-align:center;">
<t t-esc="sumByKey(state.data, 'initial_total_credit').toFixed(2)"/> <t t-esc="sumByKey(state.accounts, 'initial_total_credit')"/>
</th> </th>
<t t-if="state.apply_comparison == true"> <t t-if="state.apply_comparison == true">
<t t-set="number_of_periods" <t t-set="number_of_periods"
@ -400,24 +400,24 @@
<t t-foreach="number_of_periods" <t t-foreach="number_of_periods"
t-as="nb" t-key="nb"> t-as="nb" t-key="nb">
<th style="text-align:center;"> <th style="text-align:center;">
<t t-esc="sumByKey(state.data, 'dynamic_total_debit_' + nb).toFixed(2)"/> <t t-esc="sumByKey(state.accounts, 'dynamic_total_debit_' + nb)"/>
</th> </th>
<th style="text-align:center;"> <th style="text-align:center;">
<t t-esc="sumByKey(state.data, 'dynamic_total_credit_' + nb).toFixed(2)"/> <t t-esc="sumByKey(state.accounts, 'dynamic_total_credit_' + nb)"/>
</th> </th>
</t> </t>
</t> </t>
<th style="text-align:center;"> <th style="text-align:center;">
<t t-esc="sumByKey(state.data, 'total_debit').toFixed(2)"/> <t t-esc="sumByKey(state.accounts, 'total_debit')"/>
</th> </th>
<th style="text-align:center;"> <th style="text-align:center;">
<t t-esc="sumByKey(state.data, 'total_credit').toFixed(2)"/> <t t-esc="sumByKey(state.accounts, 'total_credit')"/>
</th> </th>
<th style="text-align:center;"> <th style="text-align:center;">
<t t-esc="sumByKey(state.data, 'end_total_debit').toFixed(2)"/> <t t-esc="sumByKey(state.accounts, 'end_total_debit')"/>
</th> </th>
<th style="text-align:center;"> <th style="text-align:center;">
<t t-esc="sumByKey(state.data, 'end_total_credit').toFixed(2)"/> <t t-esc="sumByKey(state.accounts, 'end_total_credit')"/>
</th> </th>
</tr> </tr>
</t> </t>

Loading…
Cancel
Save