Improve Partner Ledger currency columns formatting

- Fixed-width (120px) currency columns for consistent alignment
- Currency symbol shown only in headers: Debit (KM), Credit (KM), Saldo (KM)
- Line values show only numbers with locale formatting (e.g. 10,00)

🤖 assisted by claude
This commit is contained in:
Ernad Husremovic 2026-02-09 09:28:57 +01:00
parent e687bf6453
commit 889cc6a278
2 changed files with 27 additions and 19 deletions

View file

@ -2,7 +2,7 @@
{ {
'name': 'Odoo 16 Accounting Financial Reports', 'name': 'Odoo 16 Accounting Financial Reports',
'version': '16.0.2.0.7', 'version': '16.0.2.0.8',
'category': 'Invoicing Management', 'category': 'Invoicing Management',
'description': 'Accounting Reports For Odoo 16, Accounting Financial Reports, ' 'description': 'Accounting Reports For Odoo 16, Accounting Financial Reports, '
'Odoo 16 Financial Reports', 'Odoo 16 Financial Reports',

View file

@ -8,6 +8,13 @@
<t t-set="data_report_header_spacing" t-value="9"/> <t t-set="data_report_header_spacing" t-value="9"/>
<t t-set="data_report_dpi" t-value="110"/> <t t-set="data_report_dpi" t-value="110"/>
<div class="page"> <div class="page">
<style>
.col-amount {
width: 120px;
min-width: 120px;
text-align: right;
}
</style>
<h2>Partner Ledger</h2> <h2>Partner Ledger</h2>
<div class="row"> <div class="row">
<div class="col-3"> <div class="col-3">
@ -32,6 +39,7 @@
</div> </div>
</div> </div>
<t t-set="currency_symbol" t-value="res_company.currency_id.symbol"/>
<table class="table table-sm table-reports"> <table class="table table-sm table-reports">
<thead> <thead>
<tr> <tr>
@ -39,10 +47,10 @@
<th>JRNL</th> <th>JRNL</th>
<th>Account</th> <th>Account</th>
<th>Ref</th> <th>Ref</th>
<th>Debit</th> <th class="col-amount">Debit (<t t-esc="currency_symbol"/>)</th>
<th>Credit</th> <th class="col-amount">Credit (<t t-esc="currency_symbol"/>)</th>
<th>Balance</th> <th class="col-amount">Balance (<t t-esc="currency_symbol"/>)</th>
<th t-if="data['form']['amount_currency']">Currency</th> <th class="col-amount" t-if="data['form']['amount_currency']">Currency</th>
</tr> </tr>
</thead> </thead>
<t t-foreach="docs" t-as="o"> <t t-foreach="docs" t-as="o">
@ -53,17 +61,17 @@
- -
<strong t-esc="o.name"/> <strong t-esc="o.name"/>
</td> </td>
<td class="text-end"> <td class="col-amount">
<strong t-esc="sum_partner(data, o, 'debit')" <strong t-esc="sum_partner(data, o, 'debit')"
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/> t-options="{'widget': 'float', 'precision': 2}"/>
</td> </td>
<td class="text-end"> <td class="col-amount">
<strong t-esc="sum_partner(data, o, 'credit')" <strong t-esc="sum_partner(data, o, 'credit')"
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/> t-options="{'widget': 'float', 'precision': 2}"/>
</td> </td>
<td class="text-end"> <td class="col-amount">
<strong t-esc="sum_partner(data, o, 'debit - credit')" <strong t-esc="sum_partner(data, o, 'debit - credit')"
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/> t-options="{'widget': 'float', 'precision': 2}"/>
</td> </td>
</tr> </tr>
<tr t-foreach="lines(data, o)" t-as="line"> <tr t-foreach="lines(data, o)" t-as="line">
@ -79,22 +87,22 @@
<td> <td>
<span t-esc="line['displayed_name']"/> <span t-esc="line['displayed_name']"/>
</td> </td>
<td class="text-end"> <td class="col-amount">
<span t-esc="line['debit']" <span t-esc="line['debit']"
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/> t-options="{'widget': 'float', 'precision': 2}"/>
</td> </td>
<td class="text-end"> <td class="col-amount">
<span t-esc="line['credit']" <span t-esc="line['credit']"
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/> t-options="{'widget': 'float', 'precision': 2}"/>
</td> </td>
<td class="text-end"> <td class="col-amount">
<span t-esc="line['progress']" <span t-esc="line['progress']"
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/> t-options="{'widget': 'float', 'precision': 2}"/>
</td> </td>
<td class="text-end" t-if="data['form']['amount_currency']"> <td class="col-amount" t-if="data['form']['amount_currency']">
<t t-if="line['currency_id']"> <t t-if="line['currency_id']">
<span t-esc="line['amount_currency']" <span t-esc="line['amount_currency']"
t-options="{'widget': 'monetary', 'display_currency': line['currency_id']}"/> t-options="{'widget': 'float', 'precision': 2}"/>
</t> </t>
</td> </td>
</tr> </tr>