8 Workflow-related methods
9 ------------------------
13 Creating, deleting, or otherwise manipulating workflow instances is possible
14 right from a Model instance. (Previously, workflows were handled throught a
15 call to ``LocalService('workflow')``. Using the ORM methods is now the preferred
18 .. currentmodule:: openerp.osv.orm
20 .. automethod:: BaseModel.create_workflow
23 This is used instead of ``LocalService('workflow').trg_create()``.
25 .. automethod:: BaseModel.delete_workflow
28 This is used instead of ``LocalService('workflow').trg_delete()``.
30 .. automethod:: BaseModel.step_workflow
33 This is used instead of ``LocalService('workflow').trg_write()``.
35 .. automethod:: BaseModel.redirect_workflow
38 .. automethod:: BaseModel.signal_workflow
41 This is used instead of ``LocalService('workflow').trg_validate()``.
43 .. method:: BaseModel.signal_xxx(cr, uid, ids)
46 Sends a signal ``xxx`` to the workflow instances bound to the given record
47 IDs. (This is implemented using ``__getattr__`` so no source link is
48 rendered on the right.)
50 This is used instead of ``LocalService('workflow').trg_validate()``.
54 Low-level access to the workflows is still possible by using the
55 ``openerp.workflow`` module, that is, in a similar way to what was possible
56 with the previous ``LocalService('workflow')`` access. This may be useful
57 when looking-up a model in the registry and/or its records is not necessary.
58 For instance when working with raw model names and record IDs is preferred (to
59 avoid hitting unnecessarily the database). But this is something that should be
60 carefully considered as it would bypass the ORM methods (and thus any inherited