Update wizard tutorial to use tryton.cfg to register model
Closes #15089 (grafted from b5a764a7c2a909bef03ea9f5e2ed2858d42d147f) --HG-- branch : 8.0
This commit is contained in:
@@ -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`:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user