v6rc2 - do you want to save the record? prompts for no reason

Bug #697833 reported by Vadim - Enapps LTD
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo GTK Client (MOVED TO GITHUB)
Fix Released
Medium
OpenERP sa GTK client R&D

Bug Description

This applies to windows RC2 client. it was fine in RC1

On most objects (invoices, projects, tasks etc) even if you dont make any changes to an entry (simply navigating through) will prompt:

'The record has been modified
do you want to save it?'

My user uses en_GB and I though this maybe somehow relates to the other bug I just reported - https://bugs.launchpad.net/openobject-client/+bug/697829

Related branches

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

Hello,

This was actually a regression which was introduced for the fix lp:503624 . I had reopend the bug and reverted the fix @ 1756
<email address hidden> for the same also we have started for the better solution here:https://code.launchpad.net/~openerp-commiter/openobject-client/client_locale_to_user_defined_locale. which will completely allow user to even change his locale settings.

please update the gtk client to the latest revision./ for windows installer you need to wait until next installer

sorry for the inconvenience,

Thanks,

Changed in openobject-client:
importance: Undecided → Medium
assignee: nobody → OpenERP sa GTK client R&D (openerp-dev-gtk)
status: New → Fix Released
Revision history for this message
Vadim - Enapps LTD (vadim-enapps) wrote :

thanks nch, I downloaded the 'client_locale_to_user_defined_locale' client and run in under ubuntu. Unfortunatelly, now you have another few problems there:

1) the time is getting trimmed to hours only (example needed with minutes - attendance, tasks etc) when you click on do not save, the time becomes %T

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

Hello Vadim,

Thanks, Yes en_GB locale has time format as %T so now it will take it as %T.

Try this on your localhost on python prompt

import locale
>>> locale.setlocale(locale.LC_ALL,'en_GB.utf8')
'en_GB.utf8'

>>> locale.nl_langinfo(locale.T_FMT)
'%T'

>>> locale.nl_langinfo(locale.D_FMT)
'%d/%m/%y'

but what python2.6 is raising valueError:

>>> dt = '06/01/2011 06'
>>> from datetime import datetime
>>> datetime.strptime(dt,'%d/%m/%y %T')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.6/_strptime.py", line 317, in _strptime
    (bad_directive, format))
ValueError: 'T' is a bad directive in format '%d/%m/%y %T'

Thanks,

Revision history for this message
Vadim - Enapps LTD (vadim-enapps) wrote :

Sorry nch, I am not clear what you like me to do? I did run the:

import locale
>>> locale.setlocale(locale.LC_ALL,'en_GB.utf8')
'en_GB.utf8'

>>> locale.nl_langinfo(locale.T_FMT)
'%T'

>>> locale.nl_langinfo(locale.D_FMT)
'%d/%m/%y'

and yes i have python 2.6

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

hello vadim,

What I want you to notice is the python's datetime does not support %T directive.

try changing the time format to %H:%M:%S for en_gb and relogin everything will be ok. but surely we need to find a way for that.

thanks

Revision history for this message
Vadim - Enapps LTD (vadim-enapps) wrote :

I did what you suggest and still I get this:

Traceback (most recent call last):
  File "/home/vadim/bzr/new_client/bin/widget/view/form_gtk/date_widget.py", line 117, in _focus_out
    self.date_get()
  File "/home/vadim/bzr/new_client/bin/widget/view/form_gtk/date_widget.py", line 149, in date_get
    return tools.datetime_util.strptime(tc, self.format)
  File "/usr/lib/python2.6/_strptime.py", line 317, in _strptime
    (bad_directive, format))
ValueError: 'T' is a bad directive in format '%d/%m/%Y %T'

Changed in openobject-client:
milestone: none → 6.0
Revision history for this message
Vadim - Enapps LTD (vadim-enapps) wrote :

> try changing the time format to %H:%M:%S for en_gb and relogin everything will be ok.

got it - done - all is well, thanks

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

Other bug subscribers

Remote bug watches

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