add onchange(type) in compute method
This commit is contained in:
parent
2d73dcc8ba
commit
f64266b67e
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue