From 3debac9c7b74535c711e251b44e38805a0876bc0 Mon Sep 17 00:00:00 2001 From: Lars Wuerfel Date: Mon, 28 Sep 2026 18:07:34 +0200 Subject: [PATCH] Update wizard tutorial to use tryton.cfg to register model Closes #15089 (grafted from b5a764a7c2a909bef03ea9f5e2ed2858d42d147f) --HG-- branch : 8.0 --- trytond/doc/tutorial/module/wizard.rst | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/trytond/doc/tutorial/module/wizard.rst b/trytond/doc/tutorial/module/wizard.rst index 74b8d095df..a81c2b9da3 100644 --- a/trytond/doc/tutorial/module/wizard.rst +++ b/trytond/doc/tutorial/module/wizard.rst @@ -24,15 +24,17 @@ First we define a :class:`~trytond.model.ModelView` class in end_date = fields.Date("End Date", required=True) -And we register it in the :class:`~trytond.pool.Pool` in :file:`__init__.py`: +And we register it in the :class:`~trytond.pool.Pool` in :file:`tryton.cfg`: -.. code-block:: python +.. code-block:: ini + + [tryton] + ... + [register] + ... + model: + opportunity.ConvertStart - def register(): - Pool.register( - ..., - opportunity.ConvertStart, - module='opportunity', type_='model') Then the form view record in :file:`opportunity.xml`: