__init__.py 660 B

1234567891011121314151617181920212223
  1. # -*- coding: utf-8 -*-
  2. # Part of Odoo. See LICENSE file for full copyright and licensing details.
  3. from . import models
  4. from . import wizard
  5. from odoo import api, tools, SUPERUSER_ID
  6. def _auto_install_apps(cr, registry):
  7. if not tools.config.get('default_productivity_apps', False):
  8. return
  9. env = api.Environment(cr, SUPERUSER_ID, {})
  10. env['ir.module.module'].sudo().search([
  11. ('name', 'in', [
  12. # Community
  13. 'hr', 'mass_mailing', 'project', 'survey',
  14. # Enterprise
  15. 'appointment', 'knowledge', 'planning', 'sign',
  16. ]),
  17. ('state', '=', 'uninstalled')
  18. ]).button_install()