endi.views.status package¶
Submodules¶
endi.views.status.rest_api module¶
- class endi.views.status.rest_api.StatusLogEntryRestView(context, request=None)¶
Bases :
BaseRestViewFor StatusLogEntry (Mémo) with a parent model inheriting Node.
We expect context to hold a statuses attr with all status log entries.
- after_flush(entry, edit, attributes)¶
Allows to modify datas after the main entry was flushed
HTTP POST and PUT calls
- collection_get()¶
- dbsession: DBSESSION¶
- get_node_url(node)¶
Build the url to access the given node from the notification
- get_schema(submitted)¶
Build the colander schema to be used
- Paramètres:
submitted – Data submitted to the api endpoint
- Renvoie:
A form schema used to validate the submitted data
- notify_on_status_log_entry(entry: StatusLogEntry, edit: bool, attributes: dict)¶
Notify users when a mémo is added on a node
recipients are selected when adding the memo (StatusLogEntry)
- post_format(entry: StatusLogEntry, edit: bool, attributes)¶
Allows to apply post formatting to the model before flushing it
HTTP POST and PUT calls
- request: Request¶
- session: ISession¶
endi.views.status.utils module¶
Module contents¶
Status change related views
- Common to :
Estimation Invoice CancelInvoice ExpenseSheet
- class endi.views.status.StatusView(context, request=None)¶
Bases :
BaseViewView for status handling
See the call method for the workflow and the params passed to the methods
- check_allowed(status)¶
Check that the status change is allowed
- post_status_process(status, params)¶
Launch post status process functions
- Paramètres:
State’s callback
- pre_status_process(status, params)¶
Launch pre process functions
- redirect()¶
Redirect function to be used after status processing
- set_status(status, params)¶
Set the new status to the given item handle pre_status and post_status processing
- status_process(status, params)¶
Definitively Set the status of the element
- Paramètres:
function
- valid_msg = 'Le statut a bien été modifié'¶