From ee8f349344174c646a77f7d7fb9ca86d9c2ac0b5 Mon Sep 17 00:00:00 2001 From: Gavin D'souza Date: Mon, 24 May 2021 12:57:18 +0530 Subject: [PATCH] fix: Skip field name conflict validation for No value fields --- frappe/core/doctype/doctype/doctype.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/frappe/core/doctype/doctype/doctype.py b/frappe/core/doctype/doctype/doctype.py index b40b36cc55..f9dbeb0907 100644 --- a/frappe/core/doctype/doctype/doctype.py +++ b/frappe/core/doctype/doctype/doctype.py @@ -122,10 +122,12 @@ class DocType(Document): } for docfield in self.get("fields") or []: + if docfield.fieldtype in no_value_fields: + continue + conflict_type = None field = docfield.fieldname field_label = docfield.label or docfield.fieldname - conflict_should_exist = docfield.fieldtype == "Button" if docfield.fieldname in method_set: conflict_type = "controller method" @@ -133,12 +135,6 @@ class DocType(Document): conflict_type = "class property" if conflict_type: - if conflict_should_exist: - frappe.msgprint( - _("Button '{0}' should have corresponding method with the name '{1}' in the {2}'s controller") - .format(field_label, field, self.name) - ) - frappe.throw( _("Fieldname '{0}' conflicting with a {1} of the name {2} in {3}") .format(field_label, conflict_type, field, self.name)