mirror of
https://github.com/NaN-tic/trytond-galatea_blog-old.git
synced 2023-12-14 02:03:04 +01:00
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')
|
comments = fields.One2Many('galatea.blog.comment', 'post', 'Comments')
|
||||||
total_comments = fields.Function(fields.Integer("Total Comments"),
|
total_comments = fields.Function(fields.Integer("Total Comments"),
|
||||||
'get_totalcomments')
|
'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'),
|
thumb = fields.Function(fields.Binary('Thumb', filename='thumb_filename'),
|
||||||
'get_thumb', setter='set_thumb')
|
'get_thumb', setter='set_thumb')
|
||||||
thumb_filename = fields.Char('File Name',
|
thumb_filename = fields.Char('File Name',
|
||||||
|
|
Loading…
Reference in a new issue