|
|
@@ -8,19 +8,21 @@ import frappe |
|
|
|
# For example Journal Entry should be validated before GL Entry (which is an internal doctype) |
|
|
|
|
|
|
|
dynamic_link_queries = [ |
|
|
|
"""select parent, |
|
|
|
(select read_only from `tabDocType` where name=tabDocField.parent) as read_only, |
|
|
|
fieldname, options |
|
|
|
from tabDocField |
|
|
|
where fieldtype='Dynamic Link' |
|
|
|
order by read_only""", |
|
|
|
|
|
|
|
"""select dt as parent, |
|
|
|
(select read_only from `tabDocType` where name=`tabCustom Field`.dt) as read_only, |
|
|
|
fieldname, options |
|
|
|
from `tabCustom Field` |
|
|
|
where fieldtype='Dynamic Link' |
|
|
|
order by read_only""", |
|
|
|
"""select tabDocField.parent, |
|
|
|
`tabDocType`.read_only, `tabDocType`.in_create, |
|
|
|
tabDocField.fieldname, tabDocField.options |
|
|
|
from tabDocField, `tabDocType` |
|
|
|
where `tabDocField`.fieldtype='Dynamic Link' and |
|
|
|
`tabDocType`.name=`tabDocField`.parent |
|
|
|
order by `tabDocType`.read_only, `tabDocType`.in_create""", |
|
|
|
|
|
|
|
"""select `tabCustom Field`.dt as parent, |
|
|
|
`tabDocType`.read_only, `tabDocType`.in_create, |
|
|
|
`tabCustom Field`.fieldname, `tabCustom Field`.options |
|
|
|
from `tabCustom Field`, `tabDocType` |
|
|
|
where `tabCustom Field`.fieldtype='Dynamic Link' and |
|
|
|
`tabDocType`.name=`tabCustom Field`.dt |
|
|
|
order by `tabDocType`.read_only, `tabDocType`.in_create""", |
|
|
|
] |
|
|
|
|
|
|
|
def get_dynamic_link_map(for_delete=False): |
|
|
|