Browse Source

Jul 12 [UPDT] Updated 'dynamic_accounts_report'

pull/331/head
AjmalCybro 1 year ago
parent
commit
adfc455922
  1. 2
      dynamic_accounts_report/__manifest__.py
  2. 4
      dynamic_accounts_report/doc/RELEASE_NOTES.md
  3. 129
      dynamic_accounts_report/models/account_partner_ledger.py
  4. 44
      dynamic_accounts_report/report/partner_ledger_templates.xml
  5. 353
      dynamic_accounts_report/static/src/xml/partner_ledger_view.xml

2
dynamic_accounts_report/__manifest__.py

@ -21,7 +21,7 @@
################################################################################ ################################################################################
{ {
'name': 'Odoo17 Dynamic Accounting Reports', 'name': 'Odoo17 Dynamic Accounting Reports',
'version': '17.0.1.0.1', 'version': '17.0.1.1.1',
'category': 'Accounting', 'category': 'Accounting',
'summary': "Odoo 17 Accounting Financial Reports,Dynamic Accounting Reports, Dynamic Financial Reports,Dynamic Report Odoo17, Odoo17,Financial Reports, Odoo17 Accounting,Accounting, Odoo Apps", 'summary': "Odoo 17 Accounting Financial Reports,Dynamic Accounting Reports, Dynamic Financial Reports,Dynamic Report Odoo17, Odoo17,Financial Reports, Odoo17 Accounting,Accounting, Odoo Apps",
'description': "This module creates dynamic Accounting General Ledger, Trial" 'description': "This module creates dynamic Accounting General Ledger, Trial"

4
dynamic_accounts_report/doc/RELEASE_NOTES.md

@ -10,3 +10,7 @@
##### BUG FIX ##### BUG FIX
- Updated the Dynamic Balance sheet Reporting - Updated the Dynamic Balance sheet Reporting
#### 10.07.2024
#### Version 17.0.1.1.1
##### BUG FIX
- Added the initial balance in partner ledger (xlsx and PDF)

129
dynamic_accounts_report/models/account_partner_ledger.py

@ -47,6 +47,9 @@ class AccountPartnerLedger(models.TransientModel):
:return: A dictionary containing the partner data for the report. :return: A dictionary containing the partner data for the report.
:rtype: dict :rtype: dict
""" """
fiscal_year = self.env['res.company'].search([]).mapped('account_opening_date')[0].strftime('%Y-%m-%d')
fiscal_year_start = datetime.strptime(fiscal_year,
'%Y-%m-%d').date()
partner_dict = {} partner_dict = {}
partner_totals = {} partner_totals = {}
move_line_ids = self.env['account.move.line'].search( move_line_ids = self.env['account.move.line'].search(
@ -55,10 +58,18 @@ class AccountPartnerLedger(models.TransientModel):
('parent_state', '=', 'posted')]) ('parent_state', '=', 'posted')])
partner_ids = move_line_ids.mapped('partner_id') partner_ids = move_line_ids.mapped('partner_id')
for partner in partner_ids: for partner in partner_ids:
total_debit_balance = 0
total_credit_balance = 0
balance = 0
move_line_id = move_line_ids.filtered( move_line_id = move_line_ids.filtered(
lambda x: x.partner_id == partner) lambda x: x.partner_id == partner)
move_line_list = [] move_line_list = []
for move_line in move_line_id: for move_line in move_line_id:
if move_line.invoice_date:
if move_line.invoice_date < fiscal_year_start:
total_debit_balance += move_line.debit
total_credit_balance += move_line.credit
balance = total_debit_balance - total_credit_balance
move_line_data = move_line.read( move_line_data = move_line.read(
['date', 'move_name', 'account_type', 'debit', 'credit', ['date', 'move_name', 'account_type', 'debit', 'credit',
'date_maturity', 'account_id', 'journal_id', 'move_id', 'date_maturity', 'account_id', 'journal_id', 'move_id',
@ -77,7 +88,12 @@ class AccountPartnerLedger(models.TransientModel):
'total_debit': round(sum(move_line_id.mapped('debit')), 2), 'total_debit': round(sum(move_line_id.mapped('debit')), 2),
'total_credit': round(sum(move_line_id.mapped('credit')), 2), 'total_credit': round(sum(move_line_id.mapped('credit')), 2),
'currency_id': currency_id, 'currency_id': currency_id,
'partner_id': partner.id} 'initial_balance': balance,
'partner_id': partner.id,
'move_name': 'Initial Balance',
'initial_debit': total_debit_balance,
'initial_credit': total_credit_balance,
}
partner_dict['partner_totals'] = partner_totals partner_dict['partner_totals'] = partner_totals
return partner_dict return partner_dict
@ -139,6 +155,14 @@ class AccountPartnerLedger(models.TransientModel):
account_type_domain), account_type_domain),
('parent_state', 'in', option_domain)]).filtered( ('parent_state', 'in', option_domain)]).filtered(
lambda x: x.date.month == fields.Date.today().month) lambda x: x.date.month == fields.Date.today().month)
date_start = fields.Date.today().replace(day=1)
balance_move_line_ids = self.env[
'account.move.line'].search(
[('partner_id', '=', partners), (
'account_type', 'in',
account_type_domain),
('parent_state', 'in', option_domain),
('invoice_date', '<', date_start)])
elif data_range == 'year': elif data_range == 'year':
move_line_ids = self.env['account.move.line'].search( move_line_ids = self.env['account.move.line'].search(
[('partner_id', '=', partners), ( [('partner_id', '=', partners), (
@ -146,6 +170,14 @@ class AccountPartnerLedger(models.TransientModel):
account_type_domain), account_type_domain),
('parent_state', 'in', option_domain)]).filtered( ('parent_state', 'in', option_domain)]).filtered(
lambda x: x.date.year == fields.Date.today().year) lambda x: x.date.year == fields.Date.today().year)
date_start = fields.Date.today().replace(month=1, day=1)
balance_move_line_ids = self.env[
'account.move.line'].search(
[('partner_id', '=', partners), (
'account_type', 'in',
account_type_domain),
('parent_state', 'in', option_domain),
('invoice_date', '<', date_start)])
elif data_range == 'quarter': elif data_range == 'quarter':
move_line_ids = self.env['account.move.line'].search( move_line_ids = self.env['account.move.line'].search(
[('partner_id', '=', partners), ( [('partner_id', '=', partners), (
@ -154,6 +186,14 @@ class AccountPartnerLedger(models.TransientModel):
('date', '>=', quarter_start), ('date', '>=', quarter_start),
('date', '<=', quarter_end), ('date', '<=', quarter_end),
('parent_state', 'in', option_domain)]) ('parent_state', 'in', option_domain)])
date_start = quarter_start
balance_move_line_ids = self.env[
'account.move.line'].search(
[('partner_id', '=', partners), (
'account_type', 'in',
account_type_domain),
('parent_state', 'in', option_domain),
('invoice_date', '<', date_start)])
elif data_range == 'last-month': elif data_range == 'last-month':
move_line_ids = self.env['account.move.line'].search( move_line_ids = self.env['account.move.line'].search(
[('partner_id', '=', partners), ( [('partner_id', '=', partners), (
@ -161,6 +201,14 @@ class AccountPartnerLedger(models.TransientModel):
account_type_domain), account_type_domain),
('parent_state', 'in', option_domain)]).filtered( ('parent_state', 'in', option_domain)]).filtered(
lambda x: x.date.month == fields.Date.today().month - 1) lambda x: x.date.month == fields.Date.today().month - 1)
date_start = fields.Date.today().replace(day=1,month=fields.Date.today().month - 1)
balance_move_line_ids = self.env[
'account.move.line'].search(
[('partner_id', '=', partners), (
'account_type', 'in',
account_type_domain),
('parent_state', 'in', option_domain),
('invoice_date', '<', date_start)])
elif data_range == 'last-year': elif data_range == 'last-year':
move_line_ids = self.env['account.move.line'].search( move_line_ids = self.env['account.move.line'].search(
[('partner_id', '=', partners), ( [('partner_id', '=', partners), (
@ -168,6 +216,14 @@ class AccountPartnerLedger(models.TransientModel):
account_type_domain), account_type_domain),
('parent_state', 'in', option_domain)]).filtered( ('parent_state', 'in', option_domain)]).filtered(
lambda x: x.date.year == fields.Date.today().year - 1) lambda x: x.date.year == fields.Date.today().year - 1)
date_start = fields.Date.today().replace(day=1,month=1,)
balance_move_line_ids = self.env[
'account.move.line'].search(
[('partner_id', '=', partners), (
'account_type', 'in',
account_type_domain),
('parent_state', 'in', option_domain),
('invoice_date', '<', date_start)])
elif data_range == 'last-quarter': elif data_range == 'last-quarter':
move_line_ids = self.env['account.move.line'].search( move_line_ids = self.env['account.move.line'].search(
[('partner_id', '=', partners), ( [('partner_id', '=', partners), (
@ -176,6 +232,14 @@ class AccountPartnerLedger(models.TransientModel):
('date', '>=', previous_quarter_start), ('date', '>=', previous_quarter_start),
('date', '<=', previous_quarter_end), ('date', '<=', previous_quarter_end),
('parent_state', 'in', option_domain)]) ('parent_state', 'in', option_domain)])
date_start = previous_quarter_start
balance_move_line_ids = self.env[
'account.move.line'].search(
[('partner_id', '=', partners), (
'account_type', 'in',
account_type_domain),
('parent_state', 'in', option_domain),
('invoice_date', '<', date_start)])
elif 'start_date' in data_range and 'end_date' in data_range: elif 'start_date' in data_range and 'end_date' in data_range:
start_date = datetime.strptime(data_range['start_date'], start_date = datetime.strptime(data_range['start_date'],
'%Y-%m-%d').date() '%Y-%m-%d').date()
@ -188,6 +252,14 @@ class AccountPartnerLedger(models.TransientModel):
('date', '>=', start_date), ('date', '>=', start_date),
('date', '<=', end_date), ('date', '<=', end_date),
('parent_state', 'in', option_domain)]) ('parent_state', 'in', option_domain)])
date_start = start_date
balance_move_line_ids = self.env[
'account.move.line'].search(
[('partner_id', '=', partners), (
'account_type', 'in',
account_type_domain),
('parent_state', 'in', option_domain),
('invoice_date', '<', date_start)])
elif 'start_date' in data_range: elif 'start_date' in data_range:
start_date = datetime.strptime(data_range['start_date'], start_date = datetime.strptime(data_range['start_date'],
'%Y-%m-%d').date() '%Y-%m-%d').date()
@ -197,6 +269,14 @@ class AccountPartnerLedger(models.TransientModel):
account_type_domain), account_type_domain),
('date', '>=', start_date), ('date', '>=', start_date),
('parent_state', 'in', option_domain)]) ('parent_state', 'in', option_domain)])
date_start = start_date
balance_move_line_ids = self.env[
'account.move.line'].search(
[('partner_id', '=', partners), (
'account_type', 'in',
account_type_domain),
('parent_state', 'in', option_domain),
('invoice_date', '<', date_start)])
elif 'end_date' in data_range: elif 'end_date' in data_range:
end_date = datetime.strptime(data_range['end_date'], end_date = datetime.strptime(data_range['end_date'],
'%Y-%m-%d').date() '%Y-%m-%d').date()
@ -206,12 +286,26 @@ class AccountPartnerLedger(models.TransientModel):
account_type_domain), account_type_domain),
('date', '<=', end_date), ('date', '<=', end_date),
('parent_state', 'in', option_domain)]) ('parent_state', 'in', option_domain)])
fiscal_year = self.env['res.company'].search([]).mapped(
'account_opening_date')[0].strftime('%Y-%m-%d')
date_start = datetime.strptime(fiscal_year,
'%Y-%m-%d').date()
balance_move_line_ids = self.env[
'account.move.line'].search(
[('partner_id', '=', partners), (
'account_type', 'in',
account_type_domain),
('parent_state', 'in', option_domain),
('invoice_date', '<', date_start)])
else: else:
move_line_ids = self.env['account.move.line'].search( move_line_ids = self.env['account.move.line'].search(
[('partner_id', '=', partners), ( [('partner_id', '=', partners), (
'account_type', 'in', 'account_type', 'in',
account_type_domain), account_type_domain),
('parent_state', 'in', option_domain)]) ('parent_state', 'in', option_domain)])
total_debit_balance = 0
total_credit_balance = 0
balance = 0
move_line_list = [] move_line_list = []
for move_line in move_line_ids: for move_line in move_line_ids:
move_line_data = move_line.read( move_line_data = move_line.read(
@ -226,13 +320,24 @@ class AccountPartnerLedger(models.TransientModel):
move_line_data[0]['jrnl'] = journal_code move_line_data[0]['jrnl'] = journal_code
move_line_data[0]['code'] = account_code move_line_data[0]['code'] = account_code
move_line_list.append(move_line_data) move_line_list.append(move_line_data)
for remaining_move in balance_move_line_ids:
if remaining_move.invoice_date:
if remaining_move.invoice_date < date_start:
total_debit_balance += remaining_move.debit
total_credit_balance += remaining_move.credit
balance = total_debit_balance - total_credit_balance
partner_dict[partner] = move_line_list partner_dict[partner] = move_line_list
currency_id = self.env.company.currency_id.symbol currency_id = self.env.company.currency_id.symbol
partner_totals[partner] = { partner_totals[partner] = {
'total_debit': round(sum(move_line_ids.mapped('debit')), 2), 'total_debit': round(sum(move_line_ids.mapped('debit')), 2),
'total_credit': round(sum(move_line_ids.mapped('credit')), 2), 'total_credit': round(sum(move_line_ids.mapped('credit')), 2),
'currency_id': currency_id, 'currency_id': currency_id,
'partner_id': partners} 'partner_id': partners,
'initial_balance': balance,
'move_name': 'Initial Balance',
'initial_debit': total_debit_balance,
'initial_credit': total_credit_balance,
}
partner_dict['partner_totals'] = partner_totals partner_dict['partner_totals'] = partner_totals
return partner_dict return partner_dict
@ -262,6 +367,8 @@ class AccountPartnerLedger(models.TransientModel):
sheet = workbook.add_worksheet() sheet = workbook.add_worksheet()
head = workbook.add_format( head = workbook.add_format(
{'font_size': 15, 'align': 'center', 'bold': True}) {'font_size': 15, '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',
@ -335,6 +442,24 @@ class AccountPartnerLedger(models.TransientModel):
data['total'][partner]['total_debit'] - data['total'][partner]['total_debit'] -
data['total'][partner]['total_credit'], data['total'][partner]['total_credit'],
txt_name) txt_name)
if data['total'][partner]['initial_balance'] != 0:
row += 1
sheet.write(row, col, '', txt_name)
sheet.write(row, col + 1, ' ', txt_name)
sheet.write(row, col + 2, ' ', txt_name)
sheet.merge_range(row, col + 3, row, col + 4, 'Initial Balance ',
head_highlight)
sheet.merge_range(row, col + 5, row, col + 6, ' ',
txt_name)
sheet.merge_range(row, col + 7, row, col + 8,
data['total'][partner]['initial_debit'],
txt_name)
sheet.merge_range(row, col + 9, row, col + 10,
data['total'][partner]['initial_credit'],
txt_name)
sheet.merge_range(row, col + 11, row, col + 12,
data['total'][partner]['initial_balance'],
txt_name)
for rec in data['data'][partner]: 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)

44
dynamic_accounts_report/report/partner_ledger_templates.xml

@ -142,6 +142,50 @@
</strong> </strong>
</th> </th>
</tr> </tr>
<!-- Iterate over partner's initial balance -->
<t t-set="j" t-value="0"/>
<t t-foreach="partners"
t-as="partner_initial"
t-key="partner_initial_index">
<t t-set="j" t-value="j + 1"/>
<t t-if="j == 1 and total[partner]['initial_balance'] != 0">
<th colspan="6">
<span style="gap: 12px;display: flex;">
</span>
</th>
<th>
</th>
<th>
</th>
<th>
<span>
<t t-esc="total[partner]['move_name']"/>
</span>
</th>
<th>
</th>
<th>
</th>
<th>
<span>
<t t-esc="total[partner]['initial_debit']"/>
</span>
</th>
<th>
<span>
<t t-esc="total[partner]['initial_credit']"/>
</span>
</th>
<th/>
<th>
<span>
<t t-esc="total[partner]['initial_balance']"/>
</span>
</th>
</t>
</t>
<!-- Iterate over partner's value list -->
<t t-foreach="data[partner]" <t t-foreach="data[partner]"
t-as="valuelist" t-as="valuelist"
t-key="valuelist_index"> t-key="valuelist_index">

353
dynamic_accounts_report/static/src/xml/partner_ledger_view.xml

@ -218,190 +218,237 @@
</thead> </thead>
<!-- Table Body --> <!-- Table Body -->
<tbody t-ref="tbody"> <tbody t-ref="tbody">
<!-- Iterate over partners --> <!-- Iterate over partners -->
<t t-if="state.partners"> <t t-if="state.partners">
<t t-set="i" t-value="0"/> <t t-set="i" t-value="0"/>
<t t-foreach="state.partners" <t t-foreach="state.partners"
t-as="partner" t-as="partner"
t-key="partner_index"> t-key="partner_index">
<t t-set="i" t-value="i + 1"/> <t t-set="i" t-value="i + 1"/>
<tr class="border-bottom border-dark border-gainsboro"> <tr class="border-bottom border-dark border-gainsboro">
<th> <th>
<div data-bs-toggle="collapse" <div data-bs-toggle="collapse"
t-attf-href="#partner-{{i}}" t-attf-href="#partner-{{i}}"
aria-expanded="false" aria-expanded="false"
t-attf-aria-controls="partner-{{i}}" t-attf-aria-controls="partner-{{i}}"
class="ms-3 collapsed"> class="ms-3 collapsed">
<a class="btn header o_heading"> <a class="btn header o_heading">
<span class="toggle-icon"> <span class="toggle-icon">
<i class="fa fa-caret-down"/> <i class="fa fa-caret-down"/>
</span>
<t t-if="partner != 'false'">
<t t-esc="partner"/>
</t>
<t t-else="">
<span>
Unknown
Partner
</span> </span>
<t t-if="partner != 'false'"> </t>
<t t-esc="partner"/> </a>
</t> </div>
<t t-else=""> </th>
<span> <th colspan="5">
Unknown <!-- Open Partner Button -->
Partner <button t-att-data-id="state.total[partner]['partner_id']"
</span> class="o_journal"
</t> t-on-click="openPartner">
</a> <i class="fa fa-arrow-right"/>
</div> Open
</th> </button>
<th colspan="5"> <!-- Journal Items Button -->
<!-- Open Partner Button --> <button t-att-data-id="state.total[partner]['partner_id']"
<button t-att-data-id="state.total[partner]['partner_id']" class="o_journal"
class="o_journal" t-on-click="gotoJournalItem">
t-on-click="openPartner"> <i class="fa fa-arrow-right"/>
<i class="fa fa-arrow-right"/> Journal Items
Open </button>
</button> </th>
<!-- Journal Items Button --> <th/>
<button t-att-data-id="state.total[partner]['partner_id']" <th/>
class="o_journal" <th/>
t-on-click="gotoJournalItem"> <th/>
<i class="fa fa-arrow-right"/> <th/>
Journal Items <th>
</button> <span>
</th> <t t-if="state.total[partner]['total_debit']"
<th/> t-esc="state.total[partner]['currency_id']"/>
<th/> <t t-if="state.total[partner]['total_debit']"
<th/> t-esc="state.total[partner]['total_debit']"/>
<th/> </span>
<th/> </th>
<th> <th>
<span> <span>
<t t-if="state.total[partner]['total_debit']" <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_debit']" <t t-if="state.total[partner]['total_credit']"
t-esc="state.total[partner]['total_debit']"/> t-esc="state.total[partner]['total_credit']"/>
</span> </span>
</th> </th>
<th> <th/>
<span> <th>
<t t-if="state.total[partner]['total_credit']" <span class="fw-bolder">
t-esc="state.total[partner]['currency_id']"/> <t t-esc="state.total[partner]['currency_id']"/>
<t t-if="state.total[partner]['total_credit']" <t t-esc="(state.total[partner]['total_debit'] - state.total[partner]['total_credit']).toFixed(2)"/>
t-esc="state.total[partner]['total_credit']"/> </span>
</span> </th>
</th> </tr>
<th/> <!-- Iterate over partner's initial balance -->
<th> <t t-set="j" t-value="0"/>
<span class="fw-bolder"> <t t-foreach="state.partners"
<t t-esc="state.total[partner]['currency_id']"/> t-as="partner_initial"
<t t-esc="(state.total[partner]['total_debit'] - state.total[partner]['total_credit']).toFixed(2)"/> t-key="partner_initial_index">
</span> <t t-set="j" t-value="j + 1"/>
</th> <t t-if="j == 1 and state.total[partner]['initial_balance'] != 0">
</tr> <th colspan="6">
<!-- Iterate over partner's value list -->
<t t-foreach="state.data[partner]"
t-as="valuelist"
t-key="valuelist_index">
<t t-log="valuelist"/>
<tr class="border-bottom border-gainsboro collapse"
t-attf-id="partner-{{i}}"
t-att-data-id="valuelist[0]['move_id'][0]">
<th colspan="6">
<span style="gap: 12px;display: flex;"> <span style="gap: 12px;display: flex;">
<t t-esc="valuelist[0]['date']"/>
<a type="button"
class="dropdown-toggle"
data-bs-toggle="dropdown">
</a>
<div class="dropdown-menu journals">
<button t-att-data-id="valuelist[0]['move_id'][0]"
type="button"
t-on-click="gotoJournalEntry"
style="border: none;
background-color: inherit;
padding: 4px 8px;
font-size: 16px;
cursor: pointer;
display: inline-block;">
View
Journal
Entry
</button>
<div role="separator"
class="dropdown-divider"/>
</div>
</span> </span>
</th> </th>
<th> <th>
<span>
<t t-esc="valuelist[0]['jrnl']"/>
</span>
</th> </th>
<th> <th>
<span>
<t t-esc="valuelist[0]['code']"/>
</span>
</th> </th>
<th> <th>
<span> <span>
<t t-if="valuelist[0]['move_name']" <t t-esc="state.total[partner]['move_name']"/>
t-esc="valuelist[0]['move_name']"/>
</span> </span>
</th> </th>
<th> <th>
<span>
<t t-if="valuelist[0]['date_maturity']"
t-esc="valuelist[0]['date_maturity']"/>
</span>
</th> </th>
<th> <th>
<span>
<t t-if="valuelist[0]['matching_number']"
t-esc="valuelist[0]['matching_number']"/>
</span>
</th> </th>
<th> <th>
<span> <span>
<t t-if="valuelist[0]['debit']" <t t-esc="state.total[partner]['initial_debit'].toFixed(2)"/>
t-esc="state.total[partner]['currency_id']"/>
<t t-if="valuelist[0]['debit']"
t-esc="valuelist[0]['debit']"/>
</span> </span>
</th> </th>
<th> <th>
<span> <span>
<t t-if="valuelist[0]['credit']" <t t-esc="state.total[partner]['initial_credit'].toFixed(2)"/>
t-esc="state.total[partner]['currency_id']"/>
<t t-if="valuelist[0]['credit']"
t-esc="valuelist[0]['credit']"/>
</span> </span>
</th> </th>
<th/>
<th> <th>
<span> <span>
<t t-if="valuelist[0]['amount_currency']" <t t-esc="state.total[partner]['initial_balance'].toFixed(2)"/>
t-esc="state.total[partner]['currency_id']"/>
<t t-if="valuelist[0]['amount_currency']"
t-esc="valuelist[0]['amount_currency']"/>
</span> </span>
</th> </th>
</tr> </t>
</t> </t>
<!-- Iterate over partner's value list -->
<t t-foreach="state.data[partner]"
t-as="valuelist"
t-key="valuelist_index">
<t t-log="valuelist"/>
<tr class="border-bottom border-gainsboro collapse"
t-attf-id="partner-{{i}}"
t-att-data-id="valuelist[0]['move_id'][0]">
<th colspan="6">
<span style="gap: 12px;display: flex;">
<t t-esc="valuelist[0]['date']"/>
<a type="button"
class="dropdown-toggle"
data-bs-toggle="dropdown">
</a>
<div class="dropdown-menu journals">
<button t-att-data-id="valuelist[0]['move_id'][0]"
type="button"
t-on-click="gotoJournalEntry"
style="border: none;
background-color: inherit;
padding: 4px 8px;
font-size: 16px;
cursor: pointer;
display: inline-block;">
View
Journal
Entry
</button>
<div role="separator"
class="dropdown-divider"/>
</div>
</span>
</th>
<th>
<span>
<t t-esc="valuelist[0]['jrnl']"/>
</span>
</th>
<th>
<span>
<t t-esc="valuelist[0]['code']"/>
</span>
</th>
<th>
<span>
<t t-if="valuelist[0]['move_name']"
t-esc="valuelist[0]['move_id']"/>
</span>
</th>
<th>
<span>
<t t-if="valuelist[0]['date_maturity']"
t-esc="valuelist[0]['date_maturity']"/>
</span>
</th>
<th>
<span>
<t t-if="valuelist[0]['matching_number']"
t-esc="valuelist[0]['matching_number']"/>
</span>
</th>
<th>
<span>
<t t-if="valuelist[0]['debit']"
t-esc="state.total[partner]['currency_id']"/>
<t t-if="valuelist[0]['debit']"
t-esc="valuelist[0]['debit']"/>
</span>
</th>
<th>
<span>
<t t-if="valuelist[0]['credit']"
t-esc="state.total[partner]['currency_id']"/>
<t t-if="valuelist[0]['credit']"
t-esc="valuelist[0]['credit']"/>
</span>
</th>
<th>
<span>
<t t-if="valuelist[0]['amount_currency']"
t-esc="state.total[partner]['currency_id']"/>
<t t-if="valuelist[0]['amount_currency']"
t-esc="valuelist[0]['amount_currency']"/>
</span>
</th>
</tr>
</t> </t>
</t> </t>
<tr> </t>
<th/> <tr>
<th colspan="10" class="o_heading"> <th/>
Total <th colspan="10" class="o_heading">
</th> Total
<th class="o_heading"> </th>
<t t-esc="state.currency"/> <th class="o_heading">
<t t-out="state.total_debit"/> <t t-esc="state.currency"/>
</th> <t t-out="state.total_debit"/>
<th class="o_heading"> </th>
<t t-esc="state.currency"/> <th class="o_heading">
<t t-out="state.total_credit"/> <t t-esc="state.currency"/>
</th> <t t-out="state.total_credit"/>
<th/> </th>
<th class="o_heading"> <th/>
<t t-esc="state.currency"/> <th class="o_heading">
<t t-out="(state.total_debit - state.total_credit).toFixed(2)"/> <t t-esc="state.currency"/>
</th> <t t-out="(state.total_debit - state.total_credit).toFixed(2)"/>
</tr> </th>
<!-- <th class="o_heading">-->
<!-- <t t-esc="state.currency"/>-->
<!-- <t t-out="(state.total_debit - state.total_credit).toFixed(2)"/>-->
<!-- </th>-->
</tr>
</tbody> </tbody>
</table> </table>
</div> </div>

Loading…
Cancel
Save