diff --git a/frappe/custom/doctype/customize_form/customize_form.js b/frappe/custom/doctype/customize_form/customize_form.js index 8198f545da..227c6de1ee 100644 --- a/frappe/custom/doctype/customize_form/customize_form.js +++ b/frappe/custom/doctype/customize_form/customize_form.js @@ -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); } } diff --git a/frappe/custom/doctype/customize_form/customize_form.py b/frappe/custom/doctype/customize_form/customize_form.py index ad583b77c6..f3eede9397 100644 --- a/frappe/custom/doctype/customize_form/customize_form.py +++ b/frappe/custom/doctype/customize_form/customize_form.py @@ -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()