Add an existing object to a list if it is not yet in the list
Add a new object to a collection. Depending on the ‘create_inline’ field attribute, a new form is opened or not
Call a method on all objects in a selection, and flush the session.
Parameters: |
|
---|
This action can be used either within list_actions or within form_actions.
Duplicate the selected rows in a table
A base class for an action that will modify the model, it will be disabled when the field_attributes for the relation field are set to not-editable.
Export all rows in a table to a spreadsheet
Import a csv file in the current table
The context for an Action on a table view. On top of the attributes of the camelot.admin.action.application_action.ApplicationActionGuiContext, this context contains :
the QtGui.QAbstractItemView class that relates to the table view on which the widget will be placed.
a camelot.view.controls.view.AbstractView class that represents the view in which the action is triggered.
a dictionary with the field attributes of the list. This dictionary will be filled in case if the list displayed is related to a field on another object. For example, the list of addresses of Person will have the field attributes of the Person.addresses field when displayed on the Person form.
alias of ListActionModelContext
On top of the attributes of the camelot.admin.action.application_action.ApplicationActionModelContext, this context contains :
the number of selected rows.
the number of rows in the list.
an ordered list with tuples of selected row ranges. the range is inclusive.
the current row in the list
The session to which the objects in the list belong.
The field attributes of the field to which the list relates, for example the attributes of Person.addresses if the list is the list of addresses of the Person.
The collection_count and selection_count attributes allow the model_run() to quickly evaluate the size of the collection or the selection without calling the potentially time consuming methods get_collection() and get_selection().
An base class for actions that should only be enabled if the gui_context is a ListActionModelContext
Open a form view for the current row of a list.
Opens a new view of an Entity related to a table view.
Remove the selected objects from a list without deleting them