diff --git a/frappe/model/dynamic_links.py b/frappe/model/dynamic_links.py index a054406c2d..de6b9b0f33 100644 --- a/frappe/model/dynamic_links.py +++ b/frappe/model/dynamic_links.py @@ -13,7 +13,7 @@ dynamic_link_queries = [ `tabDocField`.fieldname, `tabDocField`.options from `tabDocField`, `tabDocType` where `tabDocField`.fieldtype='Dynamic Link' and - `tabDocType`.`name`=`tabDocField`.parent and `tabDocType`.is_virtual = 0 + `tabDocType`.`name`=`tabDocField`.parent and `tabDocType`.is_virtual = 0 and `tabDocField`.is_virtual = 0 order by `tabDocType`.read_only, `tabDocType`.in_create""", """select `tabCustom Field`.dt as parent, `tabDocType`.read_only, `tabDocType`.in_create,