Merge lp:~openerp-commiter/openobject-client/ach-6.0-opw-lp718040 into lp:openobject-client/6.0

Proposed by Anup(SerpentCS)
Status: Needs review
Proposed branch: lp:~openerp-commiter/openobject-client/ach-6.0-opw-lp718040
Merge into: lp:openobject-client/6.0
Diff against target: 27 lines (+15/-2)
1 file modified
bin/tools/datetime_util.py (+15/-2)
To merge this branch: bzr merge lp:~openerp-commiter/openobject-client/ach-6.0-opw-lp718040
Reviewer Review Type Date Requested Status
Naresh(OpenERP) (community) Needs Fixing
Jay Vora (Serpent Consulting Services) (community) Needs Fixing
Olivier Dony (Odoo) Pending
Review via email: mp+50906@code.launchpad.net

Description of the change

Hello,

     Representation of Date in GTK client has been fixed by this. The representations like %b %B %a %A %c etc were not being displayed in proper way.

Thanks.

To post a comment you must log in.
Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Anup,

Thanks for such a good fix,but there seems a problem with the length of characters which can be accomodated within date widget.

Thanks.

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

Hello Anup,

It needs improvement. one case I found is when I manually try to enter date in the date field. I have my user language as 'de_DE' selected which has date format as %A %d %B %Y .

Traceback (most recent call last):
  File "/home/naresh/workspace/OpenERP2011/stable6.0/client/bin/widget/view/form_gtk/date_widget.py", line 117, in _focus_out
    self.date_get()
  File "/home/naresh/workspace/OpenERP2011/stable6.0/client/bin/widget/view/form_gtk/date_widget.py", line 141, in date_get
    if self.initial_value[a] == tc[a]:
IndexError: string index out of range

review: Needs Fixing
Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Do we have any updates Anup?

Unmerged revisions

1813. By Anup(OpenERP) <email address hidden>

[FIX] date_utils : Representation of date in Format fixed.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'bin/tools/datetime_util.py'
--- bin/tools/datetime_util.py 2010-12-23 06:12:37 +0000
+++ bin/tools/datetime_util.py 2011-02-23 12:06:19 +0000
@@ -56,8 +56,21 @@
56 '%m': ('__', '[_0-1][_0-9]'),56 '%m': ('__', '[_0-1][_0-9]'),
57 '%d': ('__', '[_0-3][_0-9]'),57 '%d': ('__', '[_0-3][_0-9]'),
58 '%H': ('__', '[_0-2][_0-9]'),58 '%H': ('__', '[_0-2][_0-9]'),
59 '%M': ('__', '[_0-6][_0-9]'),59 '%M': ('__', '[_0-5][_0-9]'),
60 '%S': ('__', '[_0-6][_0-9]'),60 '%S': ('__', '[_0-5][_0-9]'),
61 '%b': ('___', '[_A-Z][_a-z][_a-z]'),
62 '%a': ('___', '[_A-Z][_a-z][_a-z]'),
63 '%B': ('_________', '[_A-Z][_a-z]*'),
64 '%A': ('_________', '[_A-Z][_a-z]*'),
65 '%c': ('___ __ ___ ____ __:__:__ __','[_A-Z][_a-z][_a-z] [_0-3][_0-9] [_A-Z][_a-z][_a-z] [_1-9][_0-9][_0-9][_0-9] [_0-1][_0-9]:[_0-5][_0-9]:[_0-5][_0-9] [_AP][_M]'),
66 '%I': ('__', '[_01][_0-9]'),
67 '%p': ('__','[_AP][_M]'),
68 '%U': ('__','[_0-5][_0-9]'),
69 '%W': ('__','[_0-5][_0-9]'),
70 '%j': ('___','[_0-3][_0-6][_0-9]'),
71 '%w': ('_','[0-6]'),
72 '%x': ('__/__/____','[_0-3][_0-9]/[_0-1][_0-9]/[_1-9][_0-9][_0-9][_0-9]'),
73 '%X': ('__:__:__ __','[_01][_0-9]:[_0-5][_0-9]:[_0-5][_0-9] [_AP][_M]')
61}74}
6275
63# RATIONALE BEHIND TIMESTAMP CALCULATIONS AND TIMEZONE MANAGEMENT:76# RATIONALE BEHIND TIMESTAMP CALCULATIONS AND TIMEZONE MANAGEMENT: