From c32b4ce31c95452aa3bc717ebc54dbdb0ad42acf Mon Sep 17 00:00:00 2001 From: sinergia Date: Mon, 4 Sep 2023 17:39:20 -0500 Subject: [PATCH] =?UTF-8?q?Fix:=20Se=20a=C3=B1ade=20dominio=20en=20seguiem?= =?UTF-8?q?iento=20de=20prospectos=20por=20rol?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- user.py | 17 +++++++++++++++++ view/user_form.xml | 9 +++++++++ 2 files changed, 26 insertions(+) create mode 100644 user.py create mode 100644 view/user_form.xml 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 @@ + + + + + +