chore: remove reload listener from form
This commit is contained in:
parent
b21f9a5b26
commit
3dc376cd5c
1 changed files with 0 additions and 15 deletions
|
|
@ -397,8 +397,6 @@ frappe.ui.form.Form = class FrappeForm {
|
|||
// set the doc
|
||||
this.doc = frappe.get_doc(this.doctype, this.docname);
|
||||
|
||||
if (!this.doc.__islocal) this.setup_reload_listener();
|
||||
|
||||
// check permissions
|
||||
this.fetch_permissions();
|
||||
if (!this.has_read_permission()) {
|
||||
|
|
@ -1979,19 +1977,6 @@ frappe.ui.form.Form = class FrappeForm {
|
|||
});
|
||||
}
|
||||
|
||||
setup_reload_listener() {
|
||||
let doctype = this.doctype;
|
||||
let docname = this.docname;
|
||||
let listener_name = `reload_doc_${doctype}_${docname}`;
|
||||
|
||||
frappe.realtime.off(listener_name);
|
||||
frappe.realtime.on(listener_name, () => {
|
||||
if (frappe.get_route_str() === `Form/${doctype}/${docname}`) {
|
||||
this.reload_doc();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Filters fields from the reference doctype and sets them as options for a Select field
|
||||
set_fields_as_options(
|
||||
fieldname,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue