__init__.py 814 B

1234567891011121314151617181920212223242526
  1. # -*- coding: utf-8 -*-
  2. # Part of Odoo. See LICENSE file for full copyright and licensing details.
  3. """ Addons module.
  4. This module serves to contain all Odoo addons, across all configured addons
  5. paths. For the code to manage those addons, see odoo.modules.
  6. Addons are made available under `odoo.addons` after
  7. odoo.tools.config.parse_config() is called (so that the addons paths are
  8. known).
  9. This module also conveniently reexports some symbols from odoo.modules.
  10. Importing them from here is deprecated.
  11. """
  12. # make odoo.addons a namespace package, while keeping this __init__.py
  13. # present, for python 2 compatibility
  14. # https://packaging.python.org/guides/packaging-namespace-packages/
  15. import pkgutil
  16. import os.path
  17. __path__ = [
  18. os.path.abspath(path)
  19. for path in pkgutil.extend_path(__path__, __name__)
  20. ]