[reports] Date format should not rely on the locale of the OpenERP server (e.g for month names)
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:/
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
- Vo Minh Thu: Pending requested
- Olivier Dony (Odoo): Pending requested
-
Diff: 214 lines (+64/-31)4 files modifiedopenerp/osv/orm.py (+2/-2)
openerp/report/printscreen/ps_list.py (+3/-9)
openerp/report/report_sxw.py (+17/-17)
openerp/tools/misc.py (+42/-3)
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 |
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