Order Comments

This commit is contained in:
resteve 2014-07-29 13:11:03 +02:00
parent eaefb2e210
commit 4c25840bd4

View file

@ -164,6 +164,12 @@ class Comment(ModelSQL, ModelView):
comment_create_date = fields.Function(fields.Char('Create Date'),
'get_comment_create_date')
@classmethod
def __setup__(cls):
super(Comment, cls).__setup__()
cls._order.insert(0, ('create_date', 'DESC'))
cls._order.insert(1, ('id', 'DESC'))
@staticmethod
def default_active():
return True