From 039b9749fb45dca7edcfaea834374aacc7bc622b Mon Sep 17 00:00:00 2001 From: barredterra <14891507+barredterra@users.noreply.github.com> Date: Mon, 23 Sep 2024 16:20:54 +0200 Subject: [PATCH] fix: require write access for records linked in Address or Contact (LAN-858) --- landa/address_and_contact.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/landa/address_and_contact.py b/landa/address_and_contact.py index 39cd34ea..fce486fa 100644 --- a/landa/address_and_contact.py +++ b/landa/address_and_contact.py @@ -32,6 +32,8 @@ def validate(doc, event): doc.organization = None for link in doc.links: + frappe.has_permission("write", link.link_doctype, link.link_name, throw=True) + if link.link_doctype == "Customer": doc.organization = link.link_name