Community mailing list archives

community@mail.odoo.com

Re: Making a module install on startup

by
Holger Brunn
- 11/02/2016 10:10:35
> And it suggested that to make
> auto_install to work as I want, I'd have to add auto_install to true on
> all modules and their dependencies too recursively. That is a lot of
> work as my module has 240 direct dependencies and some of these
> dependencies have dependencies too.

create one module that has no dependencies and the auto_install flag
set, and then in the post init hook, say

    env = api.Environment(cr, SUPERUSER_ID, {})
    env['ir.module.module'].search([
        (
            'name', 'in', [
                'enumerate', 'all', 'your', 'modules',
            ]
        ),
    ]).button_install()



-- 
Therp - Maatwerk in open ontwikkeling

Holger Brunn - Ontwerp en implementatie

mail: holger@therp.nl
web: http://therp.nl
phone: +31 (0)20 3093096