mirror of
https://github.com/bringout/odoomates.git
synced 2026-04-18 03:32:03 +02:00
Fix date formatting in Partner Ledger report to use locale settings
The _lines() method fetched the language date_format but never applied
it (line was a no-op: r['date'] = r['date']). Now formats dates using
strftime with the user's locale format (e.g. dd.mm.yyyy for bs_BA).
Also added widget='date' to header date_from/date_to fields.
🤖 assisted by claude
This commit is contained in:
parent
6be693d7af
commit
652a582f8d
3 changed files with 4 additions and 4 deletions
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
{
|
||||
'name': 'Odoo 16 Accounting Financial Reports',
|
||||
'version': '16.0.2.0.5',
|
||||
'version': '16.0.2.0.6',
|
||||
'category': 'Invoicing Management',
|
||||
'description': 'Accounting Reports For Odoo 16, Accounting Financial Reports, '
|
||||
'Odoo 16 Financial Reports',
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ class ReportPartnerLedger(models.AbstractModel):
|
|||
lang_id = lang._lang_get(lang_code)
|
||||
date_format = lang_id.date_format
|
||||
for r in res:
|
||||
r['date'] = r['date']
|
||||
r['date'] = r['date'].strftime(date_format)
|
||||
r['displayed_name'] = '-'.join(
|
||||
r[field_name] for field_name in ('move_name', 'ref', 'name')
|
||||
if r[field_name] not in (None, '', '/')
|
||||
|
|
|
|||
|
|
@ -17,12 +17,12 @@
|
|||
<div class="col-3">
|
||||
<t t-if="data['form']['date_from']">
|
||||
<strong>Date from :</strong>
|
||||
<span t-esc="data['form']['date_from']"/>
|
||||
<span t-esc="data['form']['date_from']" t-options="{'widget': 'date'}"/>
|
||||
<br/>
|
||||
</t>
|
||||
<t t-if="data['form']['date_to']">
|
||||
<strong>Date to :</strong>
|
||||
<span t-esc="data['form']['date_to']"/>
|
||||
<span t-esc="data['form']['date_to']" t-options="{'widget': 'date'}"/>
|
||||
</t>
|
||||
</div>
|
||||
<div class="col-3">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue