diff --git a/anybox/recipe/odoo/runtime/session.py b/anybox/recipe/odoo/runtime/session.py index 2b6db4cd..7a8cc94c 100644 --- a/anybox/recipe/odoo/runtime/session.py +++ b/anybox/recipe/odoo/runtime/session.py @@ -7,29 +7,20 @@ try: - import openerp as odoo + import odoo except ImportError: try: - import odoo + import openerp as odoo except ImportError: warnings.warn("This must be imported with a buildout odoo recipe " "driven sys.path", RuntimeWarning) - else: - try: - from odoo.cli import server as startup - except ImportError: - from .backports.cli import server as startup - from odoo.tools import config - from odoo import SUPERUSER_ID - from odoo.tools.parse_version import parse_version -else: - try: - from openerp.cli import server as startup - except ImportError: - from .backports.cli import server as startup - from openerp.tools import config - from openerp import SUPERUSER_ID - from openerp.tools.parse_version import parse_version +try: + from odoo.cli import server as startup +except ImportError: + from .backports.cli import server as startup +from odoo.tools import config +from odoo import SUPERUSER_ID +from odoo.tools.parse_version import parse_version from optparse import OptionParser # we support python >= 2.6