#NEWLINE# def uses_simple_values( holder , fld ) : #NEWLINE# #INDENT# 'used by :class:`lino.core.store`' #NEWLINE# from lino.core.gfks import is_foreignkey #NEWLINE# if is_foreignkey ( fld ) : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# if ( holder is not None ) : #NEWLINE# #INDENT# ch = holder . get_chooser_for_field ( fld . name ) #NEWLINE# if ( ch is not None ) : #NEWLINE# #INDENT# return ch . simple_values #NEWLINE# #UNINDENT# #UNINDENT# choices = list ( fld . choices ) #NEWLINE# if ( len ( choices ) == 0 ) : #NEWLINE# #INDENT# return True #NEWLINE# #UNINDENT# if ( type ( ch [ 0 ] ) in ( list , tuple ) ) : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# return True