Visibility

This commit is contained in:
resteve 2015-01-10 21:42:25 +01:00
parent 64baa1a6a7
commit 4985ad1b9e
3 changed files with 12 additions and 0 deletions

View file

@ -31,6 +31,11 @@ class GalateaTutorial(ModelSQL, ModelView):
metatitle = fields.Char('Meta Title', translate=True)
active = fields.Boolean('Active',
help='Dissable to not show content tutorial.')
visibility = fields.Selection([
('public','Public'),
('register','Register'),
('manager','Manager'),
], 'Visibility', required=True)
user = fields.Many2One('galatea.user', 'User', required=True)
websites = fields.Many2Many('galatea.tutorial-galatea.website',
'tutorial', 'website', 'Websites',
@ -45,6 +50,10 @@ class GalateaTutorial(ModelSQL, ModelView):
def default_active():
return True
@staticmethod
def default_visibility():
return 'public'
@staticmethod
def default_websites():
Website = Pool().get('galatea.website')

View file

@ -25,6 +25,8 @@ this repository contains the full copyright notices and license terms. -->
<field name="metatitle"/><newline/>
</page>
<page string="Extra" id="extra">
<label name="visibility"/>
<field name="visibility"/>
<label name="gallery"/>
<field name="gallery"/>
<label name="comment"/>

View file

@ -5,6 +5,7 @@ this repository contains the full copyright notices and license terms. -->
<field name="name"/>
<field name="slug"/>
<field name="user"/>
<field name="visibility"/>
<field name="websites" tree_invisible="1"/>
<field name="active" tree_invisible="1"/>
</tree>