Add ignore permissions for opportunity
diff --git a/erpnext/crm/doctype/appointment/appointment.py b/erpnext/crm/doctype/appointment/appointment.py
index 18f47c9..bc2c838 100644
--- a/erpnext/crm/doctype/appointment/appointment.py
+++ b/erpnext/crm/doctype/appointment/appointment.py
@@ -140,11 +140,11 @@
filters={
'party_name': self.lead,
},
+ ignore_permissions=True,
order_by='creation desc')
if not opporutnities:
return None
- latest_opportunity = frappe.get_doc(
- 'Opportunity', opporutnities[0].name)
+ latest_opportunity = frappe.get_doc('Opportunity', opporutnities[0].name )
assignee = latest_opportunity._assign
if not assignee:
return None