[reports] Date format should not rely on the locale of the OpenERP server (e.g for month names)

Bug #729690 reported by Christophe Hanon (www.adins.be)
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Server (MOVED TO GITHUB)
Fix Committed
Low
OpenERP's Framework R&D

Bug Description

I changed the en_US default date to get the Month name : %B %d, %Y in
order to get February 13, 2011. I

First surprise: the month name seems to be taken from the locale of the
server - On ubuntu I realized this because my desktop was in French: so
I got février 2011 !

The same of course when you change the french date format you get the month name in english

I already documented this in https://bugs.launchpad.net/openobject-addons/+bug/718040

And they fixed the 'easy' part of it. It remains that the server locale is used and we cannot print all date formats correctly. :

This was a comment from xrg

>>Sadly, this is a library issue, a bit hard to workaround:
>>the underlying glibc and python libraries that format these strings do NOT
>>take a language argument, but instead rely on the per-process environment
>>setting of LC_TIME or LANGUAGE.

>>This means that we might change the global setting of date format for all the
>> OpenERP server, but cannot specify per-report or per-client locale for dates.
>> So changing it there cannot be enough :(

But anyway this need to be cleaned. Thanks!

Related branches

Revision history for this message
Christophe Hanon (www.adins.be) (chanon) wrote :

The provided fixed unlock the interface. But the issue of the locale for the textual name of the month remains. So I opened https://bugs.launchpad.net/openobject-addons/+bug/729690

affects: openobject-addons → openobject-server
Changed in openobject-server:
assignee: nobody → OpenERP's Framework R&D (openerp-dev-framework)
status: New → Triaged
summary: - Date format should not rely on the locale of the OpenERP server
+ [reports] Date format should not rely on the locale of the OpenERP
+ server (e.g for month names)
Changed in openobject-server:
importance: Undecided → Low
status: Triaged → Confirmed
Changed in openobject-server:
status: Confirmed → In Progress
Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote :

Hello,

Thanks for reporting !

It has been improved at lp:~openerp-dev/openobject-server/trunk-bug-729690-nch and will be merged soon to the trunk server.

Thanks,

Changed in openobject-server:
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.