[fix] upload for customize form (#4397)
This commit is contained in:
parent
33644ebfb2
commit
4fa7730845
2 changed files with 3 additions and 5 deletions
|
|
@ -176,6 +176,7 @@ frappe.customize_form.confirm = function(msg, frm) {
|
|||
frappe.msgprint(r.exc);
|
||||
} else {
|
||||
d.hide();
|
||||
frappe.show_alert({message:__('Customizations Reset'), indicator:'green'});
|
||||
frappe.customize_form.clear_locals_and_refresh(frm);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -163,16 +163,13 @@ class CustomizeForm(Document):
|
|||
property_type=doctype_properties[property])
|
||||
|
||||
for df in self.get("fields"):
|
||||
if df.get("__islocal"):
|
||||
continue
|
||||
|
||||
meta_df = meta.get("fields", {"fieldname": df.fieldname})
|
||||
|
||||
if not meta_df or meta_df[0].get("is_custom_field"):
|
||||
continue
|
||||
|
||||
for property in docfield_properties:
|
||||
if property != "idx" and df.get(property) != meta_df[0].get(property):
|
||||
if property != "idx" and (df.get(property) or '') != (meta_df[0].get(property) or ''):
|
||||
if property == "fieldtype":
|
||||
self.validate_fieldtype_change(df, meta_df[0].get(property), df.get(property))
|
||||
|
||||
|
|
@ -329,6 +326,6 @@ class CustomizeForm(Document):
|
|||
return
|
||||
|
||||
frappe.db.sql("""delete from `tabProperty Setter` where doc_type=%s
|
||||
and ifnull(field_name, '')!='naming_series'""", self.doc_type)
|
||||
and !(`field_name`='naming_series' and `property`='options')""", self.doc_type)
|
||||
frappe.clear_cache(doctype=self.doc_type)
|
||||
self.fetch_to_customize()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue