def get_visible_columns(data, table_meta, df):
 columns = []
 doc = (data[0] or frappe.new_doc(df.options))
 def add_column(col_df):
  return (is_visible(col_df, doc) and column_has_value(data, col_df.get(u'fieldname')))
 if df.get(u'visible_columns'):
  for col_df in df.get(u'visible_columns'):
   docfield = table_meta.get_field(col_df.get(u'fieldname'))
   if (not docfield):
    continue
   newdf = docfield.as_dict().copy()
   newdf.update(col_df)
   if add_column(newdf):
    columns.append(newdf)
 else:
  for col_df in table_meta.fields:
   if add_column(col_df):
    columns.append(col_df)
 return columns

def get_visible_columns ( data , table_meta , df ) : columns = [ ] doc = ( data [ 0 ] or frappe . new_doc ( df . options ) ) def add_column ( col_df ) : return ( is_visible ( col_df , doc ) and column_has_value ( data , col_df . get ( u'fieldname' ) ) ) if df . get ( u'visible_columns' ) : for col_df in df . get ( u'visible_columns' ) : docfield = table_meta . get_field ( col_df . get ( u'fieldname' ) ) if ( not docfield ) : continue newdf = docfield . as_dict ( ) . copy ( ) newdf . update ( col_df ) if add_column ( newdf ) : columns . append ( newdf ) else : for col_df in table_meta . fields : if add_column ( col_df ) : columns . append ( col_df ) return columns
returns list of visible columns based on print_hide and if all columns have value .