change in salesperson code

This commit is contained in:
Pawan Kumar 2020-12-23 17:19:48 +05:30
parent 81454e4494
commit d33d8f14c6
4 changed files with 4 additions and 6 deletions

BIN
cor_custom/models/__pycache__/__init__.cpython-36.pyc Executable file → Normal file

Binary file not shown.

BIN
cor_custom/models/__pycache__/analytic.cpython-36.pyc Executable file → Normal file

Binary file not shown.

BIN
cor_custom/models/__pycache__/crm_lead.cpython-36.pyc Executable file → Normal file

Binary file not shown.

View File

@ -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'))