.. _tutorial-module-wizard: Create wizard ============= Sometime you want to add functionalities to a model that do not suite the use of a button. For this kind of use case the :ref:`wizard ` is the preferred solution. A wizard is a kind of `state machine`_ where states can be a form view, an action or transition. .. _state machine: https://en.wikipedia.org/wiki/Finite-state_machine Let's create a wizard that converts the opportunities by asking for the end date. First we define a :class:`~trytond.model.ModelView` class in :file:`opportunity.py`: .. code-block:: python class ConvertStart(ModelView): "Convert Opportunities" __name__ = 'training.opportunity.convert.start' end_date = fields.Date("End Date", required=True) And we register it in the :class:`~trytond.pool.Pool` in :file:`__init__.py`: .. code-block:: python def register(): Pool.register( ..., opportunity.ConvertStart, module='opportunity', type_='model') Then the form view record in :file:`opportunity.xml`: .. code-block:: xml ... training.opportunity.convert.start form opportunity_convert_start_form And the view in :file:`view/opportunity_convert_start_form.xml`: .. code-block:: xml