def is_visible(df, doc):
 if (df.fieldtype in (u'Section Break', u'Column Break', u'Button')):
  return False
 if hasattr(doc, u'hide_in_print_layout'):
  if (df.fieldname in doc.hide_in_print_layout):
   return False
 if ((df.permlevel > 0) and (not doc.has_permlevel_access_to(df.fieldname, df))):
  return False
 return (not doc.is_print_hide(df.fieldname, df))

def is_visible ( df , doc ) : if ( df . fieldtype in ( u'Section Break' , u'Column Break' , u'Button' ) ) : return False if hasattr ( doc , u'hide_in_print_layout' ) : if ( df . fieldname in doc . hide_in_print_layout ) : return False if ( ( df . permlevel > 0 ) and ( not doc . has_permlevel_access_to ( df . fieldname , df ) ) ) : return False return ( not doc . is_print_hide ( df . fieldname , df ) )
true if sr is visible to regular users .