Add support of timestamp field on client
issue6463 review50521002
This commit is contained in:
1 parent
3158279cb3
commit
c3d2be19f5
2 files changed
+2
-1
No files matched your search
@@ -99,6 +99,7 @@ class Timestamp(Field):
|
||||
'''
|
||||
_type = 'timestamp'
|
||||
_sql_type = 'TIMESTAMP'
|
||||
format = '%H:%M:%S.%f'
|
||||
|
||||
def sql_format(self, value):
|
||||
if value is None:
|
||||
|
||||
@@ -322,7 +322,7 @@ class Model(WarningErrorMixin, URLMixin, PoolBase, metaclass=ModelMeta):
|
||||
# Set relation_field only if there is no ambiguity
|
||||
if len(relation_fields) == 1:
|
||||
res[field]['relation_field'], = relation_fields
|
||||
if res[field]['type'] in ('datetime', 'time'):
|
||||
if res[field]['type'] in ('datetime', 'time', 'timestamp'):
|
||||
res[field]['format'] = copy.copy(cls._fields[field].format)
|
||||
if res[field]['type'] == 'selection':
|
||||
res[field]['context'] = copy.copy(cls._fields[field].context)
|
||||
|
||||
Reference in new issue
Block a user