diff --git a/user.py b/user.py new file mode 100644 index 0000000..d5d3201 --- /dev/null +++ b/user.py @@ -0,0 +1,17 @@ + +# This file is part of Tryton. The COPYRIGHT file at the top level of +# this repository contains the full copyright notices and license terms. +from trytond.model import fields +from trytond.pool import PoolMeta + + +class User(metaclass=PoolMeta): + "User" + __name__ = 'res.user' + + user_admin = fields.Boolean('Is Admin') + + @classmethod + def __setup__(cls): + super(User, cls).__setup__() + cls._context_fields.insert(0, 'user_admin') diff --git a/view/user_form.xml b/view/user_form.xml new file mode 100644 index 0000000..78c20c5 --- /dev/null +++ b/view/user_form.xml @@ -0,0 +1,9 @@ + + + + + +