mirror of
https://github.com/NaN-tic/trytond-galatea_blog-old.git
synced 2023-12-14 02:03:04 +01:00
Order Comments
This commit is contained in:
parent
eaefb2e210
commit
4c25840bd4
6
blog.py
6
blog.py
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue