Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion crm/fcrm/doctype/crm_deal/crm_deal.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,12 @@ def share_with_agent(self, agent):
flags={"ignore_share_permission": True},
)
elif user != agent:
frappe.share.remove(self.doctype, self.name, user)
frappe.share.remove(
self.doctype,
self.name,
user,
flags={"ignore_share_permission": True, "ignore_permissions": True},
)

def set_sla(self):
"""
Expand Down
9 changes: 7 additions & 2 deletions crm/fcrm/doctype/crm_lead/crm_lead.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def assign_agent(self, agent):
# the agent is already set as an assignee
return

assign({"assign_to": [agent], "doctype": "CRM Lead", "name": self.name})
assign({"assign_to": [agent], "doctype": "CRM Lead", "name": self.name}, ignore_permissions=True)

def share_with_agent(self, agent):
if not agent:
Expand All @@ -168,7 +168,12 @@ def share_with_agent(self, agent):
flags={"ignore_share_permission": True},
)
elif user != agent:
frappe.share.remove(self.doctype, self.name, user)
frappe.share.remove(
self.doctype,
self.name,
user,
flags={"ignore_share_permission": True, "ignore_permissions": True},
)

def create_contact(self, existing_contact=None, throw=True):
if not self.lead_name:
Expand Down
Loading