fix: reset read-only on fetch-from fields

This commit is contained in:
Aditya Patil 2026-02-04 17:07:44 +05:30
parent f6b7b5537b
commit ac4f040228
2 changed files with 6 additions and 0 deletions

View file

@ -244,6 +244,7 @@ frappe.ui.form.Control = class BaseControl {
}
me.set_invalid && me.set_invalid();
},
() => me?.after_set_value?.(),
]);
}
value = this.validate(value);

View file

@ -852,6 +852,11 @@ frappe.ui.form.ControlLink = class ControlLink extends frappe.ui.form.ControlDat
return this.validate_link_and_fetch(value);
}
after_set_value() {
for (const target_field of Object.keys(this.fetch_map)) {
this.frm.refresh_field(target_field);
}
}
validate_link_and_fetch(value) {
const args = this.get_search_args(value);
if (!args) return;