diff --git a/cor_custom/models/__pycache__/__init__.cpython-36.pyc b/cor_custom/models/__pycache__/__init__.cpython-36.pyc old mode 100755 new mode 100644 index 4111b84..63c8121 Binary files a/cor_custom/models/__pycache__/__init__.cpython-36.pyc and b/cor_custom/models/__pycache__/__init__.cpython-36.pyc differ diff --git a/cor_custom/models/__pycache__/analytic.cpython-36.pyc b/cor_custom/models/__pycache__/analytic.cpython-36.pyc old mode 100755 new mode 100644 index 6823899..ce5839a Binary files a/cor_custom/models/__pycache__/analytic.cpython-36.pyc and b/cor_custom/models/__pycache__/analytic.cpython-36.pyc differ diff --git a/cor_custom/models/__pycache__/crm_lead.cpython-36.pyc b/cor_custom/models/__pycache__/crm_lead.cpython-36.pyc old mode 100755 new mode 100644 index a063020..7d5b464 Binary files a/cor_custom/models/__pycache__/crm_lead.cpython-36.pyc and b/cor_custom/models/__pycache__/crm_lead.cpython-36.pyc differ diff --git a/cor_custom/models/crm_lead.py b/cor_custom/models/crm_lead.py index 5976855..1e925b9 100755 --- a/cor_custom/models/crm_lead.py +++ b/cor_custom/models/crm_lead.py @@ -33,13 +33,11 @@ class Lead(models.Model): ] def get_admin_login(self): - self_login = self.search([('id', '=', self.id)]) group_list = self.env.ref('base.group_erp_manager') - for record in self_login: - if (self.env.context.get('uid') in group_list.users.ids): - record.admin_user = True - else: - record.admin_user = False + if (self.env.context.get('uid') in group_list.users.ids): + self.admin_user = True + else: + self.admin_user = False """def _domain_check_user_group(self): print(self.user_has_groups('sales_team.group_sale_salesman'), self.user_has_groups('sales_team.group_sale_salesman_all_leads'), self.user_has_groups('group_sale_manager'))