Changing en_US Date Format does not change format in GUI

Bug #674079 reported by mvhman
54
This bug affects 8 people
Affects Status Importance Assigned to Milestone
Odoo GTK Client (MOVED TO GITHUB)
Fix Released
Medium
OpenERP sa GTK client R&D
Odoo Web Client
Fix Released
Medium
OpenERP R&D Web Team

Bug Description

Created new company on trunk rc60
Changed Translations->Language->en_US date format to d/m/y
restarted client and webclient.
New login.
Date format still m/d/y in Webclient and GTK client - incorrect.
Printing a report renders d/m/y - correct

I think it has to do with legacy code for en_US as a default language.

affects: openobject-server → openobject-client
Changed in openobject-client:
assignee: nobody → OpenERP sa GTK client R&D (openerp-dev-gtk)
status: New → Confirmed
Changed in openobject-client-web:
status: New → Confirmed
assignee: nobody → OpenERP SA's Web Client R&D (openerp-dev-web)
Changed in openobject-client:
importance: Undecided → Wishlist
Changed in openobject-client-web:
importance: Undecided → Wishlist
summary: - Changing en_US Date Format does change format in GUI
+ Changing en_US Date Format does not change format in GUI
Changed in openobject-client:
importance: Wishlist → Medium
Changed in openobject-client-web:
importance: Wishlist → Medium
tfr (Openerp) (tfr)
Changed in openobject-client:
milestone: none → 6.0-rc2
Revision history for this message
tfr (Openerp) (tfr) wrote :

If you switch language in french the date format still in US format.
=> real problem

Revision history for this message
mvhman (michael-openrevolution) wrote :

This bug persists in both the Client and web client.
With todays revision.
Also when running a translation terms update error occured: (this is with a new company)

[2010-12-06 09:13:25,944][v6_test_language] INFO:i18n:loading translation file for language en_US
/home/michael/openerp60/server/bin/tools/misc.py:754: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
  keys_to_del = [key for key, _ in self._generate_keys(dbname, kwargs2) if key in self.cache.keys()]

Changed in openobject-client:
status: Confirmed → In Progress
Revision history for this message
Jeroen Vet (jeroen-vet) wrote :

This could be a workaround (it worked for me) if you want international date format ISO 8601 YYYY-MM-DD in the Linux GTK client:
- Add a new language. Call it English Custom or something like that. Choose as language code en_DK. (this has international date format %Y-%m-%d)
- Change the date format to %Y-%m-%d so that printed reports also get this format.
- If you make the language translatable and synchronize terms you have the added advantage that you can use some of your own English terms in the interface.
- Change the language of the users to English Custom for those that want an English interface.
- Restart the server and presto! you should now see all dates in international format in the views. But unfortunately only in the Linux GTK client, not the web client nor the windows client.

Revision history for this message
Jeroen Vet (jeroen-vet) wrote :

OK Babel does not support en_DK so for the web client (for international format) you need to set the language code to for example zh_TW (I was already using zh_CN as a 'real' language). This fixes the web client problem and it seems also the windows client problem.

Revision history for this message
Jeroen Vet (jeroen-vet) wrote :

If you think it is scary to use a zh_TW as language code you can also use en_CA.

Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote :

Hello

Indeed, currently the gtk client supports only the user's set locale format and will not consider the modifications made
from administration/Translations/Languages.

We're planning to improve this in the future (after v6.0) we will do something like:

Read the user lang from the context and get the formats from the server

    For Example: if the user has 'en_US' set as his locale and 'en_US' has date format as '%m/%d/%Y'
    but he changes the date format to '%d/%m/%Y' from the menu specified above. Then the new modified format will
    be considered by the gtk client.

I'm marking this bug as "Wishlist" to keep it in the queue for improvement after v6.0.

Thanks for reporting!

Changed in openobject-client:
status: In Progress → Confirmed
importance: Medium → Wishlist
Revision history for this message
Olivier Dony (Odoo) (odo-openerp) wrote :

Naresh, I understand that there are technical problems to support all the locale parameters in all GTK widgets, but I think the date format is something that we can at least directly support, and it is probably much more important than the others parameters (an incorrect date format can make dates impossible to read directly).

So we should fix both clients in v6 to properly support it at least the date format specified in the res.lang record, and defer the support of the other locale parameters for after v6.0, if they are too complicated.

Date format is very important and deserves it (BTW this bug report was only about date formats)

Changed in openobject-client:
importance: Wishlist → Medium
Changed in openobject-client-web:
milestone: none → 6.0-rc2
milestone: 6.0-rc2 → 6.0
Changed in openobject-client:
milestone: 6.0-rc2 → 6.0
Revision history for this message
Olivier Dony (Odoo) (odo-openerp) wrote :

In comment #7, "support it at least" should be "support at least" of course.

I have created bug 697625 for the rest of the locale parameters, this one a wishlist for after v6.0 indeed.

Revision history for this message
Xavier (Open ERP) (xmo-deactivatedaccount) wrote :

Should be fixed on the web client as of revision 4251 (<email address hidden>), mvhman could you check? Or Jeroen Vet?

Changed in openobject-client-web:
status: Confirmed → Fix Released
Revision history for this message
Bubble (gpperez) wrote :

I'm using language ES_AR wich uses this date format %d/%m/%Y for all my users but im still viewing dates in format %m/d%/%Y. This problem is in the server? or in the GTK client? if the problem is in client I think that we're still in problems because if the error will be fixed, we'll need a new compiled windows openerp executable client. I mean I have my server in Linux platform but the clients use windows.
I think that this problem with dates is very important, i think that maybe simple to correct but critical

Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote :

Hello,

It has been improved @https://code.launchpad.net/~openerp-commiter/openobject-client/client_locale_to_user_defined_locale
and will be merged soon to the trunk client.

Thanks,

Changed in openobject-client:
status: Confirmed → Fix Released
Revision history for this message
mvhman (michael-openrevolution) wrote :

Checked it out.
GTK is working perfectly.
Printing a report. eg. sales order. Date has not changed, when default EN_US adjusted to d/m/y
Web- My web client broken on this revision, will update and let you know.

Thanks,

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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