Wrong representation of dates.

Bug #718040 reported by Igor Jogla
22
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Invalid
Undecided
Unassigned
6.0
Invalid
Undecided
Unassigned
Odoo GTK Client (MOVED TO GITHUB)
Fix Released
Medium
OpenERP sa GTK client R&D
6.0
Fix Committed
Medium
OpenERP Publisher's Warranty Team
Odoo Web Client
Won't Fix
Undecided
Unassigned
6.0
Won't Fix
Undecided
Unassigned
Trunk
Won't Fix
Undecided
Unassigned

Bug Description

I have changed the date format in English en_US language to %d-%b-%Y.
We have to do this as our tax department requires to show month name in date format to avoid misunderstanding.

But in this case PDF reports in English en_US like order, Invoice and etc shows date like 12-ôåâ-2011 instead of 12-Feb-2011.

Related branches

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

I think, I have similar issue. I hope I am not polluting this bug report.

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 !

If you create a new invoice the default value for the date field is : '%B __, ____'.

Month name should come from the OpenERP language resource.
Also it should be great to have 2 dates format 1 for data entry, one for reporting.

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

One more thing when you see the '%B __, ____'. If you use the calendar widget to put a date, the indicated value is 'February 13' so the year is gone !

Revision history for this message
xrg (xrg) wrote : Re: [Bug 718040] Re: Wrong representation of dates with month's name

On Sunday 13 February 2011, you wrote:
> I think, I have similar issue. I hope I am not polluting this bug
> report.
>
> 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 !

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 :(

Revision history for this message
DBR (OpenERP) (dbr-openerp) wrote : Re: Wrong representation of dates with month's name
Revision history for this message
DBR (OpenERP) (dbr-openerp) wrote :

Hello Igor Jogla,

I have tested your scenario at my end.
But all are working as expected.
I have attached a screenshot for your reference.
Please check again and notify me where you face the problem.

Thanks.

Changed in openobject-addons:
status: New → Incomplete
Revision history for this message
DBR (OpenERP) (dbr-openerp) wrote :

Hello,

Please,See the attached screenshot. [stable_client.png]
I am Confirming this bug on the basis of comment # 1.[Stable-6]

Thanks.

Changed in openobject-client:
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
Igor Jogla (igor-3dp) wrote : Re: [Bug 718040] Re: Wrong representation of dates with month's name

Hello,

I still have this issue.
Please see attached picture. As you can see the problem appears only in PDF
file.

Regards
Igor

2011/2/18 Devishree Brahmbhatt (OpenERP) <email address hidden>

> ** Attachment added: "invoice_date.png"
>
> https://bugs.launchpad.net/openobject-addons/+bug/718040/+attachment/1857293/+files/invoice_date.png
>
> --
> You received this bug notification because you are a direct subscriber
> of the bug.
> https://bugs.launchpad.net/bugs/718040
>
> Title:
> Wrong representation of dates with month's name
>
> Status in OpenERP Modules (addons):
> Incomplete
> Status in OpenERP Addons 6.0 series:
> New
> Status in OpenERP GTK Client:
> New
>
> Bug description:
> I have changed the date format in English en_US language to %d-%b-%Y.
> We have to do this as our tax department requires to show month name in
> date format to avoid misunderstanding.
>
> But in this case PDF reports in English en_US like order, Invoice and
> etc shows date like 12-ôåâ-2011 instead of 12-Feb-2011.
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/openobject-addons/+bug/718040/+subscribe
>

summary: - Wrong representation of dates with month's name
+ Wrong representation of dates.
Changed in openobject-client:
importance: Low → Medium
assignee: nobody → OpenERP sa GTK client R&D (openerp-dev-gtk)
Changed in openobject-addons:
status: Incomplete → Invalid
Revision history for this message
Anup(SerpentCS) (anup-serpent) wrote :

Hello Everyone,

      In web-client, the representations %x,%X and %c are not working with date format. To check follow the given steps.

1. Go to Administration/Translations/Languages.
2. Open the language form.
3. Change the representation of date to %c,%x or %X and Save.
4. Go to any form containing date for e.g. Invoice. Select date and it will display %c,%x or %X not the value in that format.

Thanks.

Revision history for this message
Anup(SerpentCS) (anup-serpent) wrote :

Hello,

   It has been fixed in Stable-6.0 by revision 1813 <email address hidden>

Thanks.

Revision history for this message
Anup(SerpentCS) (anup-serpent) wrote :

Hello Guys,

     It has also been fixed in trunk by revision 1827 <email address hidden>.

Thanks.

Changed in openobject-client:
status: Confirmed → Fix Released
Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote :

Hello Anup,

Your merge proposal for stable https://code.launchpad.net/~openerp-commiter/openobject-client/ach-6.0-opw-lp718040 needs fixing even your merge proposal for trunk https://code.launchpad.net/~openerp-commiter/openobject-client/ach-trunk-opw-718040 needs to be resubmitted.

Then why the bug is converted to fix released ?

The bug should not be converted to fix released until and unless it has been merged to the respective branches.

you can either convert it to fix commited state

Thanks

Changed in openobject-client:
status: Fix Released → Fix Committed
Changed in openobject-client:
status: Fix Committed → Confirmed
Revision history for this message
Christophe Hanon (www.adins.be) (chanon) wrote :

I tried the fix. Now display is k. But you cannot enter a date in the text box.

Revision history for this message
Igor Jogla (igor-3dp) wrote :
Revision history for this message
Igor Jogla (igor-3dp) wrote :

Probably there is one more related bug.
Dates with months name are shown only in English even for non English locales.
Please see the attached picture in my previous post.
Such dates also appears in English in PDF reports prepared in different languages.
I have tried German, Russian and Latvian.

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

Hello Igor jogla,

Probably you are right , and the reason behind this is the locale settings. Say you loaded German locale via OpenERP so at the time of loading the required translations for German, OpenERP also tries to set your system locale to german
if it fails then it issues a warning on the terminal saying "unable to set XXXX locale" and sets back to default locale i.e English. The reason for failure may be if that language is not available in the local settings of the operating system (i.e. if it is not an available locale).. Try to generate the locale or see if there is a valid entry available in your system locale in the path /var/lib/locales/supported.d/ .

That's the reason you see the formats in German and the Text in English for the dates.

Thanks,

Revision history for this message
Igor Jogla (igor-3dp) wrote :

Hello Naresh,

Thank you for your message. I have checked /var/lib/locales/supported.d/local and lv_LV.UTF-8 UTF-8 is listed but date anyway shown in English in Latvian locale.

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

Same point has Igor Jogla. On my system the english locale was installed but it used the locale of the current process /desktop of the server process.

Revision history for this message
tfr (Openerp) (tfr) wrote :

Date field has been change, now they display full date with any format correctly and while editing the format use only number.

This feature is merged in the trunk, try if it solve the problem.

Changed in openobject-client:
status: Confirmed → Fix Released
status: Fix Released → Fix Committed
tfr (Openerp) (tfr)
Changed in openobject-client:
status: Fix Committed → Fix Released
Revision history for this message
Vinay Rana (OpenERP) (vra-openerp) wrote :

This bug is being closed as Won't Fix in the OpenERP Web Client project, as it is not going to be developed further after the 6.0 series. It will be replaced in 6.1 by a newer and better web frontend known as the OpenERP Web project[1], so further R&D efforts on the 6.0 project would be wasted.
Bugs affecting customers in production of course continue to be handled via the OpenERP Enterprise (OPW) maintenance service.
You can find more details about this in the Bug Management FAQ[2].

Revision history for this message
Vinay Rana (OpenERP) (vra-openerp) wrote :
Changed in openobject-client-web:
assignee: OpenERP R&D Web Team (openerp-dev-web) → nobody
status: Confirmed → Won't Fix
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.