2014-11-07 14:23:55 +01:00
|
|
|
# This file is part galatea_blog module for Tryton.
|
|
|
|
# The COPYRIGHT file at the top level of this repository contains
|
|
|
|
# the full copyright notices and license terms.
|
2014-05-27 12:17:33 +02:00
|
|
|
from trytond.pool import PoolMeta
|
|
|
|
from trytond.model import fields
|
|
|
|
from trytond.pyson import Eval
|
|
|
|
|
|
|
|
__all__ = ['GalateaWebSite']
|
|
|
|
|
|
|
|
|
|
|
|
class GalateaWebSite:
|
2016-03-29 12:00:24 +02:00
|
|
|
__metaclass__ = PoolMeta
|
2014-05-27 12:17:33 +02:00
|
|
|
__name__ = "galatea.website"
|
|
|
|
blog_comment = fields.Boolean('Blog comments',
|
|
|
|
help='Active blog comments.')
|
2014-12-15 09:38:32 +01:00
|
|
|
blog_anonymous = fields.Boolean('Blog Anonymous',
|
|
|
|
help='Active user anonymous to publish comments.')
|
|
|
|
blog_anonymous_user = fields.Many2One('galatea.user', 'Blog Anonymous User',
|
2014-05-27 12:17:33 +02:00
|
|
|
states={
|
|
|
|
'required': Eval('blog_anonymous', True),
|
|
|
|
})
|