Hi all.
I have a problem with the display of a date value in the web client.
The date is 1899/12/30.
Imported from legacy data as datetime.date value.
So the date value is correct (no Python or ORM error).
Any workaround, how to enable the web client to display this value?
Thanks in advance
Best regards
Thomas
----------------------------------------------------------
Odoo 11.0-20180808 (Community Edition)
----------------------------------------------------------
class Licence(models.Model):
_name = 'licencetool.licence'
name = fields.Char(string='Licence')
...
validto = fields.Date(string='Valid to')
...
----------------------------------------------------------
>>> lm=env['licencetool.licence']
>>> l=lm.search([('name','like','JK-Ho%')])
>>> l
licencetool.licence(275,)
>>> l.validto
'1899-12-30'
>>>
So it's correct in the database.
1899-12-30 is a correct date and is used as indicator for endless.
----------------------------------------------------------
Error in web client (generated default view):
Error:
Error: '1899-12-30' is not a correct date
http://localhost:8069/web/content/581-e322031/web.assets_backend.js:992
Traceback:
parseDate@http://localhost:8069/web/content/581-e322031/web.assets_backend.js:992:7
_parseServerValue@http://localhost:8069/web/content/581-e322031/web.assets_backend.js:1091:576
_parseServerData/<@http://localhost:8069/web/content/581-e322031/web.assets_backend.js:1248:672
_.forEach@http://localhost:8069/web/content/451-d280cdb/web.assets_common.js:12:558
_parseServerData@http://localhost:8069/web/content/581-e322031/web.assets_backend.js:1248:288
_fetchRecord/<@http://localhost:8069/web/content/581-e322031/web.assets_backend.js:1189:81
then/</</<@http://localhost:8069/web/content/451-d280cdb/web.assets_common.js:802:678
fire@http://localhost:8069/web/content/451-d280cdb/web.assets_common.js:796:281
fireWith@http://localhost:8069/web/content/451-d280cdb/web.assets_common.js:801:198
then/</</<@http://localhost:8069/web/content/451-d280cdb/web.assets_common.js:802:849
fire@http://localhost:8069/web/content/451-d280cdb/web.assets_common.js:796:281
fireWith@http://localhost:8069/web/content/451-d280cdb/web.assets_common.js:801:198
Deferred/</deferred[tuple[0]]@http://localhost:8069/web/content/451-d280cdb/web.assets_common.js:803:31
rpc/</<@http://localhost:8069/web/content/451-d280cdb/web.assets_common.js:3869:346
then/</</<@http://localhost:8069/web/content/451-d280cdb/web.assets_common.js:802:678
fire@http://localhost:8069/web/content/451-d280cdb/web.assets_common.js:796:281
fireWith@http://localhost:8069/web/content/451-d280cdb/web.assets_common.js:801:198
Deferred/</deferred[tuple[0]]@http://localhost:8069/web/content/451-d280cdb/web.assets_common.js:803:31
fire@http://localhost:8069/web/content/451-d280cdb/web.assets_common.js:796:281
fireWith@http://localhost:8069/web/content/451-d280cdb/web.assets_common.js:801:198
then/</</<@http://localhost:8069/web/content/451-d280cdb/web.assets_common.js:802:849
fire@http://localhost:8069/web/content/451-d280cdb/web.assets_common.js:796:281
fireWith@http://localhost:8069/web/content/451-d280cdb/web.assets_common.js:801:198
then/</</<@http://localhost:8069/web/content/451-d280cdb/web.assets_common.js:802:849
fire@http://localhost:8069/web/content/451-d280cdb/web.assets_common.js:796:281
fireWith@http://localhost:8069/web/content/451-d280cdb/web.assets_common.js:801:198
done@http://localhost:8069/web/content/451-d280cdb/web.assets_common.js:1192:86
callback@http://localhost:8069/web/content/451-d280cdb/web.assets_common.js:1212:15