formatLang will not format string date like 2009-01-01 even if date=True
Bug #497423 reported by
Nicolas Bessi - Camptocamp
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Server (MOVED TO GITHUB) |
Fix Released
|
Undecided
|
OpenERP Core Team | ||
Bug Description
formatLang will not formate string date like '2009-01-01' even if date=True
The formatLang of sxw_report will not work on date string simply because the case is not handled right in the test and it will systematically return the value.
By the way this function is quite messy and should be (partially) rewritten.
There is a lot of odd lines
Things likes :
type(value) == type('')
isinstance(value, (str, unicode))
That should be more like isinstance(obj, basestring)
or
if (not date_time):
Regards
Nicolas
Related branches
Changed in openobject-server: | |
status: | Invalid → New |
Changed in openobject-server: | |
status: | New → Confirmed |
To post a comment you must log in.
If you agree I will propose a cleaning of this version ASAP