Merge pull request #19586 from ruchamahabal/fix-fetch-if-empty
This commit is contained in:
commit
cd8049e569
1 changed files with 6 additions and 1 deletions
|
|
@ -213,7 +213,12 @@ frappe.ui.form.ScriptManager = class ScriptManager {
|
|||
df.read_only == 1 ||
|
||||
df.is_virtual == 1;
|
||||
|
||||
if (is_read_only_field && df.fetch_from && df.fetch_from.indexOf(".") != -1) {
|
||||
if (
|
||||
is_read_only_field &&
|
||||
df.fetch_from &&
|
||||
(!df.fetch_if_empty || (df.fetch_if_empty && !me.frm.doc[df.fieldname])) &&
|
||||
df.fetch_from.indexOf(".") != -1
|
||||
) {
|
||||
var parts = df.fetch_from.split(".");
|
||||
me.frm.add_fetch(parts[0], parts[1], df.fieldname, df.parent);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue