← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 703899] Re: Error with date type field

 

Hi,

I am facing the same problem, with users whose Preferences Language is
not English.

For example, for a French User, the date format is "%d/%m/%Y %H:%M:%S".
When submitting a form with such formatted datetimes, I always get a "Invalid date format" message.

The Web client tries to eval (Pythonic eval) my datetime field value ("31/01/2011 15:11:31") somewhere arround /usr/local/openerp/6.0/web-client/addons/openerp/utils/utils.py(250) and does not take the Locale date format into account :
248  	        self.data = {}
249  	        for k, v in kwargs.items():
250  ->	            if '_terp_' not in k:
251  	                try:
252  	                    v = eval(v)
253  	                except:
254  	                    pass
255  	                self.data['_terp_form/' + k] = v

IMHO, this is a *HUGE* for all non-English users !

Alexandre

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/703899

Title:
  Error with date type field

Status in OpenERP Web Client:
  Incomplete

Bug description:
  Hello,
  Error occurs in the field of type date, even filled in correctly.

  Thanks





References