add onchange(type) in compute method

This commit is contained in:
Pawan Kumar 2020-12-25 18:24:34 +05:30
parent 2d73dcc8ba
commit f64266b67e
1 changed files with 2 additions and 1 deletions

View File

@ -31,8 +31,9 @@ class Lead(models.Model):
('phone_uniq', 'unique(phone)', "Phone No already exists !"),
('email_from_uniq', 'unique(email_from)', "Email ID already exists !"),
]
@api.onchange('type')
def get_admin_login(self):
print('11111111111', self.env.context.get('uid'))
group_list = self.env.ref('base.group_erp_manager')
if (self.env.context.get('uid') in group_list.users.ids):
self.admin_user = True