Change on_change argument field to depends decorator

This commit is contained in:
resteve 2016-01-19 15:51:27 +01:00
parent 06c23c7afd
commit 5e7e44c1a2

View file

@ -18,8 +18,7 @@ __all__ = ['GalateaTutorial', 'GalateaTutorialWebSite', 'GalateaTutorialComment'
class GalateaTutorial(ModelSQL, ModelView):
"Galatea Tutorial"
__name__ = 'galatea.tutorial'
name = fields.Char('Name', required=True, translate=True,
on_change=['name', 'slug'])
name = fields.Char('Name', required=True, translate=True)
slug = fields.Char('slug', required=True, translate=True,
help='Cannonical uri.')
slug_langs = fields.Function(fields.Dict(None, 'Slug Langs'), 'get_slug_langs')