mirror of
https://github.com/NaN-tic/trytond-galatea_tutorial.git
synced 2023-12-14 02:32:55 +01:00
Visibility
This commit is contained in:
parent
64baa1a6a7
commit
4985ad1b9e
3 changed files with 12 additions and 0 deletions
|
@ -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')
|
||||
|
|
|
@ -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"/>
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue