From 652a582f8d9c014c7bee1834577cda633485da8a Mon Sep 17 00:00:00 2001 From: Ernad Husremovic Date: Mon, 9 Feb 2026 09:24:08 +0100 Subject: [PATCH] Fix date formatting in Partner Ledger report to use locale settings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- .../accounting_pdf_reports/__manifest__.py | 2 +- .../accounting_pdf_reports/report/report_partner_ledger.py | 2 +- .../accounting_pdf_reports/report/report_partner_ledger.xml | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/odoo-bringout-odoomates-accounting_pdf_reports/accounting_pdf_reports/__manifest__.py b/odoo-bringout-odoomates-accounting_pdf_reports/accounting_pdf_reports/__manifest__.py index 2932053..7a59261 100644 --- a/odoo-bringout-odoomates-accounting_pdf_reports/accounting_pdf_reports/__manifest__.py +++ b/odoo-bringout-odoomates-accounting_pdf_reports/accounting_pdf_reports/__manifest__.py @@ -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', diff --git a/odoo-bringout-odoomates-accounting_pdf_reports/accounting_pdf_reports/report/report_partner_ledger.py b/odoo-bringout-odoomates-accounting_pdf_reports/accounting_pdf_reports/report/report_partner_ledger.py index 5f5c093..6b3a444 100644 --- a/odoo-bringout-odoomates-accounting_pdf_reports/accounting_pdf_reports/report/report_partner_ledger.py +++ b/odoo-bringout-odoomates-accounting_pdf_reports/accounting_pdf_reports/report/report_partner_ledger.py @@ -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, '', '/') diff --git a/odoo-bringout-odoomates-accounting_pdf_reports/accounting_pdf_reports/report/report_partner_ledger.xml b/odoo-bringout-odoomates-accounting_pdf_reports/accounting_pdf_reports/report/report_partner_ledger.xml index 03cb2c1..fd347a1 100644 --- a/odoo-bringout-odoomates-accounting_pdf_reports/accounting_pdf_reports/report/report_partner_ledger.xml +++ b/odoo-bringout-odoomates-accounting_pdf_reports/accounting_pdf_reports/report/report_partner_ledger.xml @@ -17,12 +17,12 @@
Date from : - +
Date to : - +