mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-26 08:24:47 +00:00
Merge pull request #46488 from aerele/validate-address-contact-permission
refactor: replace get_list with get_all for dynamic link child access
This commit is contained in:
@@ -465,7 +465,7 @@ class AccountsController(TransactionBase):
|
|||||||
|
|
||||||
def validate_party_address(self, party, party_type, billing_address, shipping_address=None):
|
def validate_party_address(self, party, party_type, billing_address, shipping_address=None):
|
||||||
if billing_address or shipping_address:
|
if billing_address or shipping_address:
|
||||||
party_address = frappe.get_list(
|
party_address = frappe.get_all(
|
||||||
"Dynamic Link",
|
"Dynamic Link",
|
||||||
{"link_doctype": party_type, "link_name": party, "parenttype": "Address"},
|
{"link_doctype": party_type, "link_name": party, "parenttype": "Address"},
|
||||||
pluck="parent",
|
pluck="parent",
|
||||||
@@ -477,7 +477,7 @@ class AccountsController(TransactionBase):
|
|||||||
|
|
||||||
def validate_party_contact(self, party, party_type):
|
def validate_party_contact(self, party, party_type):
|
||||||
if self.get("contact_person"):
|
if self.get("contact_person"):
|
||||||
contact = frappe.get_list(
|
contact = frappe.get_all(
|
||||||
"Dynamic Link",
|
"Dynamic Link",
|
||||||
{"link_doctype": party_type, "link_name": party, "parenttype": "Contact"},
|
{"link_doctype": party_type, "link_name": party, "parenttype": "Contact"},
|
||||||
pluck="parent",
|
pluck="parent",
|
||||||
|
|||||||
Reference in New Issue
Block a user