From 7c0c3e80014d7c7f37245544d74a699838e5ae99 Mon Sep 17 00:00:00 2001 From: Gaurav Naik Date: Sat, 10 Dec 2016 14:18:29 +0530 Subject: [PATCH 1/2] Popup: Changed role filter to Awfis Ops User --- awfis_erpnext/awfis_erpnext/awf.py | 5 ++--- awfis_erpnext/hooks.py | 1 + 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/awfis_erpnext/awfis_erpnext/awf.py b/awfis_erpnext/awfis_erpnext/awf.py index cb8ebc1..9911333 100644 --- a/awfis_erpnext/awfis_erpnext/awf.py +++ b/awfis_erpnext/awfis_erpnext/awf.py @@ -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. @@ -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 diff --git a/awfis_erpnext/hooks.py b/awfis_erpnext/hooks.py index 2923457..f0c9308 100644 --- a/awfis_erpnext/hooks.py +++ b/awfis_erpnext/hooks.py @@ -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 From cd7e2eceb4d610fe5b449c9dd1e3921456925c07 Mon Sep 17 00:00:00 2001 From: Gaurav Naik Date: Sat, 10 Dec 2016 14:49:57 +0600 Subject: [PATCH 2/2] bumped to version 1.5.1 --- awfis_erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awfis_erpnext/__init__.py b/awfis_erpnext/__init__.py index 2b8d5e7..5f2b332 100644 --- a/awfis_erpnext/__init__.py +++ b/awfis_erpnext/__init__.py @@ -1,3 +1,3 @@ from __future__ import unicode_literals -__version__ = '1.5.0' +__version__ = '1.5.1'