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
1=== modified file 'bin/tools/datetime_util.py'
2--- bin/tools/datetime_util.py 2010-12-23 06:12:37 +0000
3+++ bin/tools/datetime_util.py 2011-02-23 12:06:19 +0000
4@@ -56,8 +56,21 @@
5 '%m': ('__', '[_0-1][_0-9]'),
6 '%d': ('__', '[_0-3][_0-9]'),
7 '%H': ('__', '[_0-2][_0-9]'),
8- '%M': ('__', '[_0-6][_0-9]'),
9- '%S': ('__', '[_0-6][_0-9]'),
10+ '%M': ('__', '[_0-5][_0-9]'),
11+ '%S': ('__', '[_0-5][_0-9]'),
12+ '%b': ('___', '[_A-Z][_a-z][_a-z]'),
13+ '%a': ('___', '[_A-Z][_a-z][_a-z]'),
14+ '%B': ('_________', '[_A-Z][_a-z]*'),
15+ '%A': ('_________', '[_A-Z][_a-z]*'),
16+ '%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]'),
17+ '%I': ('__', '[_01][_0-9]'),
18+ '%p': ('__','[_AP][_M]'),
19+ '%U': ('__','[_0-5][_0-9]'),
20+ '%W': ('__','[_0-5][_0-9]'),
21+ '%j': ('___','[_0-3][_0-6][_0-9]'),
22+ '%w': ('_','[0-6]'),
23+ '%x': ('__/__/____','[_0-3][_0-9]/[_0-1][_0-9]/[_1-9][_0-9][_0-9][_0-9]'),
24+ '%X': ('__:__:__ __','[_01][_0-9]:[_0-5][_0-9]:[_0-5][_0-9] [_AP][_M]')
25 }
26
27 # RATIONALE BEHIND TIMESTAMP CALCULATIONS AND TIMEZONE MANAGEMENT: