How to add to the configuration wizard when a new module is installed

52 views
Skip to first unread message

Vincent Bastos

unread,
Feb 18, 2017, 1:42:07 AM2/18/17
to tryton-dev
Hi,

I am unable to figure out how modules are able to "append" to the configuration wizard when a new module is installed.

I have created a configuration.py file and configuration.xml file with a form, but this does not come up when I install my module.

I thought that Tryton automatically added configuration files to the wizard, but I was unable to find this in the code.

Cédric Krier

unread,
Feb 18, 2017, 7:20:07 AM2/18/17
to tryton-dev
Explicit is better than implicit.
You have to create an entry in ir.module.config_wizard.item

--
Cédric Krier - B2CK SPRL
Email/Jabber: cedric...@b2ck.com
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/

Vincent Bastos

unread,
Mar 3, 2017, 2:42:05 AM3/3/17
to tryton-dev


On Saturday, February 18, 2017 at 10:20:07 PM UTC+10, Cédric Krier wrote:
On 2017-02-17 22:42, Vincent Bastos wrote:
> Hi,
>
> I am unable to figure out how modules are able to "append" to the
> configuration wizard when a new module is installed.
>
> I have created a configuration.py file and configuration.xml file with a
> form, but this does not come up when I install my module.
>
> I thought that Tryton automatically added configuration files to the
> wizard, but I was unable to find this in the code.

Explicit is better than implicit.
You have to create an entry in ir.module.config_wizard.item

I suppose I also have to create Configuration class that extends a Wizard?

Sergi Almacellas Abellana

unread,
Mar 3, 2017, 3:23:07 AM3/3/17
to tryto...@googlegroups.com
El 03/03/17 a les 08:42, Vincent Bastos ha escrit:
No you have to create a record in ir.module.config_wizard.item that
references the wizard you want to call when your module is installed.
You can have a look at the company module as reference:

http://hg.tryton.org/modules/company/file/052e36889d49/company.xml#l167

Hope it helps.


--
Sergi Almacellas Abellana
www.koolpi.com
Twitter: @pokoli_srk

Vincent Bastos

unread,
Mar 3, 2017, 3:38:25 AM3/3/17
to tryto...@googlegroups.com
Yes, I saw this. But this has a reference to the record above it:

        <record model="ir.action.wizard" id="act_company_config">
            <field name="name">Configure Company</field>
            <field name="wiz_name">company.company.config</field>
        </record>

Which references the wizard class company.company.config - so I do have to create this configuration class for my module no?

--
Vincent Bastos
Lava Lab Software

Sergi Almacellas Abellana

unread,
Mar 3, 2017, 3:41:06 AM3/3/17
to tryto...@googlegroups.com
El 03/03/17 a les 09:38, Vincent Bastos ha escrit:
Yes, you have to register the new wizard on the database if you create one.

Note: You can use launch an existing wizard by using an existing xml_id
on the ir.module.config_wizard.item but I can not imagine any use case.


> --
> *Vincent Bastos*
> *Lava Lab Software*
>
> --
> You received this message because you are subscribed to the Google
> Groups "tryton-dev" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/tryton-dev/CACLX58AGinYsJQNQSXT9tVFx4X2xUy6hi1z7qNy34kRgrR3wTA%40mail.gmail.com
> <https://groups.google.com/d/msgid/tryton-dev/CACLX58AGinYsJQNQSXT9tVFx4X2xUy6hi1z7qNy34kRgrR3wTA%40mail.gmail.com?utm_medium=email&utm_source=footer>.
Reply all
Reply to author
Forward
0 new messages