Add filter to show attachments that has allow galatea
This commit is contained in:
parent
5062d9e336
commit
e10c5486df
5
blog.py
5
blog.py
|
@ -55,7 +55,10 @@ class Post(ModelSQL, ModelView):
|
|||
comments = fields.One2Many('galatea.blog.comment', 'post', 'Comments')
|
||||
total_comments = fields.Function(fields.Integer("Total Comments"),
|
||||
'get_totalcomments')
|
||||
attachments = fields.One2Many('ir.attachment', 'resource', 'Attachments')
|
||||
attachments = fields.One2Many('ir.attachment', 'resource', 'Attachments',
|
||||
filter=[
|
||||
('allow_galatea', '=', True),
|
||||
])
|
||||
thumb = fields.Function(fields.Binary('Thumb', filename='thumb_filename'),
|
||||
'get_thumb', setter='set_thumb')
|
||||
thumb_filename = fields.Char('File Name',
|
||||
|
|
Loading…
Reference in New Issue