many2oneeditor

class camelot.view.controls.editors.many2oneeditor.Many2OneEditor(admin=None, parent=None, editable=True, field_name='manytoone', actions=[<camelot.admin.action.field_action.ClearObject object at 0x10f483410>, <camelot.admin.action.field_action.SelectObject object at 0x10f483590>, <camelot.admin.action.field_action.NewObject object at 0x10f4837d0>, <camelot.admin.action.field_action.OpenObject object at 0x10f483d90>], **kwargs)[source]

Widget for editing many 2 one relations

get_value()[source]
Returns:a function that returns the selected entity or ValueLoading

or None

search_completions(text)[source]

Search for object that match text, to fill the list of completions

Returns:a list of tuples of (dict_of_object_representation, object)
set_instance_representation(representation_and_propagate)[source]

Update the gui

set_value(value)[source]
Parameters:value – either ValueLoading, or a function that returns None

or the entity to be shown in the editor