Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
Gaurav Naik committed Dec 10, 2016
2 parents d088226 + cd7e2ec commit 08bde25
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion awfis_erpnext/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from __future__ import unicode_literals

__version__ = '1.5.0'
__version__ = '1.5.1'
5 changes: 2 additions & 3 deletions awfis_erpnext/awfis_erpnext/awf.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ def validate_agent(agent_number):
if not agent_number_processed:
return ""

agents = frappe.get_all("User", fields=['name'], filters={"role": "Sales User", "phone": agent_number_processed})
agents = frappe.get_all("User", fields=['name'], filters={"role": "Awfis Ops User", "phone": agent_number_processed})

if len(agents) > 0:
return agents[0]["name"] #Return the name of the first agent.
Expand Down Expand Up @@ -337,5 +337,4 @@ def awf_lead_has_permission(doc, user):
roles = [ur.role for ur in u.user_roles]

if ("Sales User" in roles) or ("Sales Manager" in roles) or ("Awfis Ops User" in roles) or ("Awfis Ops Manager" in roles):
return True

return True
1 change: 1 addition & 0 deletions awfis_erpnext/hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
#
has_permission = {
"Lead": "awfis_erpnext.awfis_erpnext.awf.awf_lead_has_permission",
"Awfis Centre": "awfis_erpnext.awfis_erpnext.awf.awf_lead_has_permission"
}

# Document Events
Expand Down

0 comments on commit 08bde25

Please sign in to comment.