From 4a700d0ad9eecb00233f734042a96c3959aa7e83 Mon Sep 17 00:00:00 2001
From: Raphael Collet <rco@openerp.com>
Date: Fri, 2 Sep 2016 16:16:50 +0200
Subject: [PATCH] [FIX] odoo: rename imports and adapt import hooks

---
 odoo.py                                       |   6 +-
 odoo/__init__.py                              |   4 +-
 odoo/addons/base/ir/ir_qweb/ir_qweb.py        |   2 +-
 odoo/api.py                                   |  14 +-
 odoo/cli/__init__.py                          |   2 +-
 odoo/cli/command.py                           |  10 +-
 odoo/cli/scaffold.py                          |   2 +-
 odoo/cli/server.py                            |  50 +++----
 odoo/cli/shell.py                             |  22 +--
 odoo/cli/start.py                             |   4 +-
 odoo/fields.py                                |  18 +--
 odoo/http.py                                  | 112 +++++++--------
 odoo/loglevels.py                             |   2 +-
 odoo/models.py                                |  62 ++++-----
 odoo/modules/__init__.py                      |   4 +-
 odoo/modules/db.py                            |  12 +-
 odoo/modules/graph.py                         |  14 +-
 odoo/modules/loading.py                       |  58 ++++----
 odoo/modules/migration.py                     |  10 +-
 odoo/modules/module.py                        |  47 ++++---
 odoo/modules/registry.py                      |  36 ++---
 odoo/netsvc.py                                |  44 +++---
 odoo/osv/expression.py                        |   6 +-
 odoo/osv/orm.py                               |   6 +-
 odoo/osv/query.py                             |   8 +-
 odoo/report/__init__.py                       |   2 +-
 odoo/report/custom.py                         |  18 +--
 odoo/report/interface.py                      |  12 +-
 odoo/report/print_xml.py                      |  12 +-
 odoo/report/printscreen/ps_form.py            |  10 +-
 odoo/report/printscreen/ps_list.py            |  14 +-
 odoo/report/render/html2html/html2html.py     |   2 +-
 odoo/report/render/odt2odt/odt2odt.py         |   2 +-
 odoo/report/render/rml2html/rml2html.py       |   2 +-
 odoo/report/render/rml2pdf/trml2pdf.py        |   4 +-
 odoo/report/render/rml2pdf/utils.py           |   6 +-
 odoo/report/render/rml2txt/utils.py           |   2 +-
 odoo/report/report_sxw.py                     |  34 ++---
 odoo/service/common.py                        |  18 +--
 odoo/service/db.py                            | 130 +++++++++---------
 odoo/service/model.py                         |  32 ++---
 odoo/service/report.py                        |  32 ++---
 odoo/service/security.py                      |   8 +-
 odoo/service/server.py                        |  72 +++++-----
 odoo/service/wsgi_server.py                   |  50 +++----
 odoo/sql_db.py                                |   4 +-
 .../addons/test_translation_import/models.py  |   2 +-
 .../tests/test_term_count.py                  |   6 +-
 odoo/tests/common.py                          |  38 ++---
 odoo/tools/amount_to_text_en.py               |   2 +-
 odoo/tools/cache.py                           |   4 +-
 odoo/tools/config.py                          |  36 ++---
 odoo/tools/convert.py                         |  16 +--
 odoo/tools/mail.py                            |   8 +-
 odoo/tools/misc.py                            |  30 ++--
 odoo/tools/osutil.py                          |   2 +-
 odoo/tools/safe_eval.py                       |  16 +--
 odoo/tools/test_reports.py                    |  14 +-
 odoo/tools/translate.py                       |  30 ++--
 odoo/tools/yaml_import.py                     |  12 +-
 odoo/workflow/__init__.py                     |   4 +-
 odoo/workflow/helpers.py                      |   4 +-
 odoo/workflow/instance.py                     |   6 +-
 odoo/workflow/service.py                      |   2 +-
 odoo/workflow/workitem.py                     |  18 +--
 openerp-gevent                                |   4 +-
 openerp-server                                |   4 +-
 openerp-wsgi.py                               |  14 +-
 68 files changed, 646 insertions(+), 647 deletions(-)

diff --git a/odoo.py b/odoo.py
index 6c204e101d6f..30d6983ff5a4 100755
--- a/odoo.py
+++ b/odoo.py
@@ -48,7 +48,7 @@ def git_locate():
     while path != os.path.abspath(os.sep):
         gitconfig_path = os.path.join(path, '.git/config')
         if os.path.isfile(gitconfig_path):
-            release_py = os.path.join(path, 'openerp/release.py')
+            release_py = os.path.join(path, 'odoo/release.py')
             if os.path.isfile(release_py):
                 break
         path = os.path.dirname(path)
@@ -153,8 +153,8 @@ def main():
     elif len(sys.argv) == 2 and sys.argv[1] in cmds:
         cmds[sys.argv[1]]()
     else:
-        import openerp
-        openerp.cli.main()
+        import odoo
+        odoo.cli.main()
 
 if __name__ == "__main__":
     main()
diff --git a/odoo/__init__.py b/odoo/__init__.py
index 543ba70ce2a1..03a2dd5e9e1e 100644
--- a/odoo/__init__.py
+++ b/odoo/__init__.py
@@ -25,7 +25,7 @@ multi_process = False
 # Make sure the OpenERP server runs in UTC. This is especially necessary
 # under Windows as under Linux it seems the real import of time is
 # sufficiently deferred so that setting the TZ environment variable
-# in openerp.cli.server was working.
+# in odoo.cli.server was working.
 import os
 os.environ['TZ'] = 'UTC' # Set the timezone...
 import time              # ... *then* import time.
@@ -71,7 +71,7 @@ import workflow
 from . import models
 from . import fields
 from . import api
-from openerp.tools.translate import _
+from odoo.tools.translate import _
 
 #----------------------------------------------------------
 # Other imports, which may require stuff from above
diff --git a/odoo/addons/base/ir/ir_qweb/ir_qweb.py b/odoo/addons/base/ir/ir_qweb/ir_qweb.py
index cee3b569fb8b..dcd7500f7cbc 100644
--- a/odoo/addons/base/ir/ir_qweb/ir_qweb.py
+++ b/odoo/addons/base/ir/ir_qweb/ir_qweb.py
@@ -9,7 +9,7 @@ from lxml import etree
 from collections import OrderedDict
 
 from openerp import api, models, tools
-from openerp.tools import safe_eval
+import openerp.tools.safe_eval as safe_eval
 from openerp.http import request
 from odoo.modules.module import get_resource_path
 import json
diff --git a/odoo/api.py b/odoo/api.py
index 4741adedad87..1adbd08f6e5d 100644
--- a/odoo/api.py
+++ b/odoo/api.py
@@ -55,7 +55,7 @@ from weakref import WeakSet
 from decorator import decorator
 from werkzeug.local import Local, release_local
 
-from openerp.tools import frozendict, classproperty
+from odoo.tools import frozendict, classproperty
 
 _logger = logging.getLogger(__name__)
 
@@ -147,7 +147,7 @@ def constrains(*args):
 
     Invoked on the records on which one of the named fields has been modified.
 
-    Should raise :class:`~openerp.exceptions.ValidationError` if the
+    Should raise :class:`~odoo.exceptions.ValidationError` if the
     validation failed.
 
     .. warning::
@@ -355,7 +355,7 @@ def one(method):
 
             It is strongly recommended to use :func:`~.multi` and either
             iterate on the ``self`` recordset or ensure that the recordset
-            is a single record with :meth:`~openerp.models.Model.ensure_one`.
+            is a single record with :meth:`~odoo.models.Model.ensure_one`.
     """
     def loop(method, self, *args, **kwargs):
         result = [method(rec, *args, **kwargs) for rec in self]
@@ -933,7 +933,7 @@ class Environment(Mapping):
 
     def check_cache(self):
         """ Check the cache consistency. """
-        from openerp.fields import SpecialValue
+        from odoo.fields import SpecialValue
 
         # make a full copy of the cache, and invalidate it
         cache_dump = dict(
@@ -994,6 +994,6 @@ class Environments(object):
 
 
 # keep those imports here in order to handle cyclic dependencies correctly
-from openerp import SUPERUSER_ID
-from openerp.exceptions import UserError, AccessError, MissingError
-from openerp.modules.registry import Registry
+from odoo import SUPERUSER_ID
+from odoo.exceptions import UserError, AccessError, MissingError
+from odoo.modules.registry import Registry
diff --git a/odoo/cli/__init__.py b/odoo/cli/__init__.py
index 2ba56ac4cf14..1fd63804785b 100644
--- a/odoo/cli/__init__.py
+++ b/odoo/cli/__init__.py
@@ -2,7 +2,7 @@ import logging
 import sys
 import os
 
-import openerp
+import odoo
 
 from command import Command, main
 
diff --git a/odoo/cli/command.py b/odoo/cli/command.py
index 2f2fffa18b4b..fa22fd5baf1c 100644
--- a/odoo/cli/command.py
+++ b/odoo/cli/command.py
@@ -3,8 +3,8 @@ import sys
 import os
 from os.path import join as joinpath, isdir
 
-import openerp
-from openerp.modules import get_modules, get_module_path
+import odoo
+from odoo.modules import get_modules, get_module_path
 
 commands = {}
 
@@ -17,7 +17,7 @@ class CommandType(type):
             commands[name] = cls
 
 class Command(object):
-    """Subclass this class to define new openerp subcommands """
+    """Subclass this class to define new odoo subcommands """
     __metaclass__ = CommandType
 
     def run(self, args):
@@ -42,7 +42,7 @@ def main():
     # commands from modules
     if len(args) > 1 and args[0].startswith('--addons-path=') and not args[1].startswith("-"):
         # parse only the addons-path, do not setup the logger...
-        openerp.tools.config._parse_config([args[0]])
+        odoo.tools.config._parse_config([args[0]])
         args = args[1:]
 
     # Default legacy command
@@ -54,7 +54,7 @@ def main():
         logging.disable(logging.CRITICAL)
         for module in get_modules():
             if isdir(joinpath(get_module_path(module), 'cli')):
-                __import__('openerp.addons.' + module)
+                __import__('odoo.addons.' + module)
         logging.disable(logging.NOTSET)
         command = args[0]
         args = args[1:]
diff --git a/odoo/cli/scaffold.py b/odoo/cli/scaffold.py
index 221f192347e2..bc5321a3b751 100644
--- a/odoo/cli/scaffold.py
+++ b/odoo/cli/scaffold.py
@@ -9,7 +9,7 @@ import jinja2
 
 from . import Command
 
-from openerp.modules.module import (get_module_root, MANIFEST, load_information_from_description_file as load_manifest)
+from odoo.modules.module import (get_module_root, MANIFEST, load_information_from_description_file as load_manifest)
 
 
 class Scaffold(Command):
diff --git a/odoo/cli/server.py b/odoo/cli/server.py
index 314072b69a8d..da33c6888cdc 100644
--- a/odoo/cli/server.py
+++ b/odoo/cli/server.py
@@ -21,15 +21,15 @@ import threading
 import traceback
 import time
 
-import openerp
+import odoo
 
 from . import Command
 
-__author__ = openerp.release.author
-__version__ = openerp.release.version
+__author__ = odoo.release.author
+__version__ = odoo.release.version
 
-# Also use the `openerp` logger for the main script.
-_logger = logging.getLogger('openerp')
+# Also use the `odoo` logger for the main script.
+_logger = logging.getLogger('odoo')
 
 def check_root_user():
     """Warn if the process's user is 'root' (on POSIX system)."""
@@ -43,7 +43,7 @@ def check_postgres_user():
 
     This function assumes the configuration has been initialized.
     """
-    config = openerp.tools.config
+    config = odoo.tools.config
     if config['db_user'] == 'postgres':
         sys.stderr.write("Using the database user 'postgres' is a security risk, aborting.")
         sys.exit(1)
@@ -53,16 +53,16 @@ def report_configuration():
 
     This function assumes the configuration has been initialized.
     """
-    config = openerp.tools.config
+    config = odoo.tools.config
     _logger.info("OpenERP version %s", __version__)
-    _logger.info('addons paths: %s', openerp.modules.module.ad_paths)
+    _logger.info('addons paths: %s', odoo.modules.module.ad_paths)
     host = config['db_host'] or os.environ.get('PGHOST', 'default')
     port = config['db_port'] or os.environ.get('PGPORT', 'default')
     user = config['db_user'] or os.environ.get('PGUSER', 'default')
     _logger.info('database: %s@%s:%s', user, host, port)
 
 def rm_pid_file(main_pid):
-    config = openerp.tools.config
+    config = odoo.tools.config
     if config['pidfile'] and main_pid == os.getpid():
         try:
             os.unlink(config['pidfile'])
@@ -74,15 +74,15 @@ def setup_pid_file():
 
     This function assumes the configuration has been initialized.
     """
-    config = openerp.tools.config
-    if not openerp.evented and config['pidfile']:
+    config = odoo.tools.config
+    if not odoo.evented and config['pidfile']:
         pid = os.getpid()
         with open(config['pidfile'], 'w') as fd:
             fd.write(str(pid))
         atexit.register(rm_pid_file, pid)
 
 def export_translation():
-    config = openerp.tools.config
+    config = odoo.tools.config
     dbname = config['db_name']
 
     if config["language"]:
@@ -95,33 +95,33 @@ def export_translation():
     fileformat = os.path.splitext(config["translate_out"])[-1][1:].lower()
 
     with open(config["translate_out"], "w") as buf:
-        registry = openerp.modules.registry.Registry.new(dbname)
-        with openerp.api.Environment.manage():
+        registry = odoo.modules.registry.Registry.new(dbname)
+        with odoo.api.Environment.manage():
             with registry.cursor() as cr:
-                openerp.tools.trans_export(config["language"],
+                odoo.tools.trans_export(config["language"],
                     config["translate_modules"] or ["all"], buf, fileformat, cr)
 
     _logger.info('translation file written successfully')
 
 def import_translation():
-    config = openerp.tools.config
+    config = odoo.tools.config
     context = {'overwrite': config["overwrite_existing_translations"]}
     dbname = config['db_name']
 
-    registry = openerp.modules.registry.Registry.new(dbname)
-    with openerp.api.Environment.manage():
+    registry = odoo.modules.registry.Registry.new(dbname)
+    with odoo.api.Environment.manage():
         with registry.cursor() as cr:
-            openerp.tools.trans_load(
+            odoo.tools.trans_load(
                 cr, config["translate_in"], config["language"], context=context,
             )
 
 def main(args):
     check_root_user()
-    openerp.tools.config.parse_config(args)
+    odoo.tools.config.parse_config(args)
     check_postgres_user()
     report_configuration()
 
-    config = openerp.tools.config
+    config = odoo.tools.config
 
     # the default limit for CSV fields in the module is 128KiB, which is not
     # quite sufficient to import images to store in attachment. 500MiB is a
@@ -133,8 +133,8 @@ def main(args):
         preload = config['db_name'].split(',')
         for db_name in preload:
             try:
-                openerp.service.db._create_empty_database(db_name)
-            except openerp.service.db.DatabaseExists:
+                odoo.service.db._create_empty_database(db_name)
+            except odoo.service.db.DatabaseExists:
                 pass
 
     if config["translate_out"]:
@@ -148,12 +148,12 @@ def main(args):
     # This needs to be done now to ensure the use of the multiprocessing
     # signaling mecanism for registries loaded with -d
     if config['workers']:
-        openerp.multi_process = True
+        odoo.multi_process = True
 
     stop = config["stop_after_init"]
 
     setup_pid_file()
-    rc = openerp.service.server.start(preload=preload, stop=stop)
+    rc = odoo.service.server.start(preload=preload, stop=stop)
     sys.exit(rc)
 
 class Server(Command):
diff --git a/odoo/cli/shell.py b/odoo/cli/shell.py
index 0d1ed59813ea..082ade3f948b 100644
--- a/odoo/cli/shell.py
+++ b/odoo/cli/shell.py
@@ -6,7 +6,7 @@ import os
 import signal
 import sys
 
-import openerp
+import odoo
 from . import Command
 
 def raise_keyboard_interrupt(*a):
@@ -27,9 +27,9 @@ class Console(code.InteractiveConsole):
 class Shell(Command):
     """Start odoo in an interactive shell"""
     def init(self, args):
-        openerp.tools.config.parse_config(args)
-        openerp.cli.server.report_configuration()
-        openerp.service.server.start(preload=[], stop=True)
+        odoo.tools.config.parse_config(args)
+        odoo.cli.server.report_configuration()
+        odoo.service.server.start(preload=[], stop=True)
         signal.signal(signal.SIGINT, raise_keyboard_interrupt)
 
     def console(self, local_vars):
@@ -44,15 +44,15 @@ class Shell(Command):
 
     def shell(self, dbname):
         local_vars = {
-            'openerp': openerp
+            'openerp': odoo
         }
-        with openerp.api.Environment.manage():
+        with odoo.api.Environment.manage():
             if dbname:
-                registry = openerp.registry(dbname)
+                registry = odoo.registry(dbname)
                 with registry.cursor() as cr:
-                    uid = openerp.SUPERUSER_ID
-                    ctx = openerp.api.Environment(cr, uid, {})['res.users'].context_get()
-                    env = openerp.api.Environment(cr, uid, ctx)
+                    uid = odoo.SUPERUSER_ID
+                    ctx = odoo.api.Environment(cr, uid, {})['res.users'].context_get()
+                    env = odoo.api.Environment(cr, uid, ctx)
                     local_vars['env'] = env
                     local_vars['self'] = env.user
                     self.console(local_vars)
@@ -61,5 +61,5 @@ class Shell(Command):
 
     def run(self, args):
         self.init(args)
-        self.shell(openerp.tools.config['db_name'])
+        self.shell(odoo.tools.config['db_name'])
         return 0
diff --git a/odoo/cli/start.py b/odoo/cli/start.py
index b0cc932e19d6..690582241170 100644
--- a/odoo/cli/start.py
+++ b/odoo/cli/start.py
@@ -7,8 +7,8 @@ import sys
 
 from . import Command
 from .server import main
-from openerp.modules.module import get_module_root, MANIFEST
-from openerp.service.db import _create_empty_database, DatabaseExists
+from odoo.modules.module import get_module_root, MANIFEST
+from odoo.service.db import _create_empty_database, DatabaseExists
 
 
 class Start(Command):
diff --git a/odoo/fields.py b/odoo/fields.py
index 0b9a481320e1..4d3f43f0fa7d 100644
--- a/odoo/fields.py
+++ b/odoo/fields.py
@@ -15,12 +15,12 @@ import xmlrpclib
 
 import psycopg2
 
-from openerp.sql_db import LazyCursor
-from openerp.tools import float_precision, float_repr, float_round, frozendict, \
-                          html_sanitize, human_size, pg_varchar, ustr, OrderedSet
-from openerp.tools import DEFAULT_SERVER_DATE_FORMAT as DATE_FORMAT
-from openerp.tools import DEFAULT_SERVER_DATETIME_FORMAT as DATETIME_FORMAT
-from openerp.tools.translate import html_translate, _
+from odoo.sql_db import LazyCursor
+from odoo.tools import float_precision, float_repr, float_round, frozendict, \
+                       html_sanitize, human_size, pg_varchar, ustr, OrderedSet
+from odoo.tools import DEFAULT_SERVER_DATE_FORMAT as DATE_FORMAT
+from odoo.tools import DEFAULT_SERVER_DATETIME_FORMAT as DATETIME_FORMAT
+from odoo.tools.translate import html_translate, _
 
 DATE_LENGTH = len(date.today().strftime(DATE_FORMAT))
 DATETIME_LENGTH = len(datetime.now().strftime(DATETIME_FORMAT))
@@ -196,7 +196,7 @@ class Field(object):
                 return [('name', operator, value)]
 
         The compute method has to assign the field on all records of the invoked
-        recordset. The decorator :meth:`openerp.api.depends` must be applied on
+        recordset. The decorator :meth:`odoo.api.depends` must be applied on
         the compute method to specify the field dependencies; those dependencies
         are used to determine when to recompute the field; recomputation is
         automatic and guarantees cache/database consistency. Note that the same
@@ -268,7 +268,7 @@ class Field(object):
         .. rubric:: Incremental definition
 
         A field is defined as class attribute on a model class. If the model
-        is extended (see :class:`~openerp.models.Model`), one can also extend
+        is extended (see :class:`~odoo.models.Model`), one can also extend
         the field definition by redefining a field with the same name and same
         type on the subclass. In that case, the attributes of the field are
         taken from the parent class and overridden by the ones given in
@@ -2393,6 +2393,6 @@ class Id(Field):
         raise TypeError("field 'id' cannot be assigned")
 
 # imported here to avoid dependency cycle issues
-from openerp import SUPERUSER_ID
+from odoo import SUPERUSER_ID
 from .exceptions import AccessError, MissingError, UserError
 from .models import check_pg_name, BaseModel, IdType
diff --git a/odoo/http.py b/odoo/http.py
index 6783e8d82969..5fd3c727a2f8 100644
--- a/odoo/http.py
+++ b/odoo/http.py
@@ -43,11 +43,11 @@ try:
 except ImportError:
     psutil = None
 
-import openerp
-from openerp.service.server import memory_info
-from openerp.service import security, model as service_model
-from openerp.tools.func import lazy_property
-from openerp.tools import ustr, consteq, frozendict
+import odoo
+from odoo.service.server import memory_info
+from odoo.service import security, model as service_model
+from odoo.tools.func import lazy_property
+from odoo.tools import ustr, consteq, frozendict
 
 _logger = logging.getLogger(__name__)
 rpc_request = logging.getLogger(__name__ + '.rpc.request')
@@ -78,13 +78,13 @@ def replace_request_password(args):
 # don't trigger debugger for those exceptions, they carry user-facing warnings
 # and indications, they're not necessarily indicative of anything being
 # *broken*
-NO_POSTMORTEM = (openerp.osv.orm.except_orm,
-                 openerp.exceptions.AccessError,
-                 openerp.exceptions.ValidationError,
-                 openerp.exceptions.MissingError,
-                 openerp.exceptions.AccessDenied,
-                 openerp.exceptions.Warning,
-                 openerp.exceptions.RedirectWarning)
+NO_POSTMORTEM = (odoo.osv.orm.except_orm,
+                 odoo.exceptions.AccessError,
+                 odoo.exceptions.ValidationError,
+                 odoo.exceptions.MissingError,
+                 odoo.exceptions.AccessDenied,
+                 odoo.exceptions.Warning,
+                 odoo.exceptions.RedirectWarning)
 def dispatch_rpc(service_name, method, params):
     """ Handle a RPC call.
 
@@ -100,18 +100,18 @@ def dispatch_rpc(service_name, method, params):
             if psutil:
                 start_rss, start_vms = memory_info(psutil.Process(os.getpid()))
             if rpc_request and rpc_response_flag:
-                openerp.netsvc.log(rpc_request, logging.DEBUG, '%s.%s' % (service_name, method), replace_request_password(params))
+                odoo.netsvc.log(rpc_request, logging.DEBUG, '%s.%s' % (service_name, method), replace_request_password(params))
 
         threading.current_thread().uid = None
         threading.current_thread().dbname = None
         if service_name == 'common':
-            dispatch = openerp.service.common.dispatch
+            dispatch = odoo.service.common.dispatch
         elif service_name == 'db':
-            dispatch = openerp.service.db.dispatch
+            dispatch = odoo.service.db.dispatch
         elif service_name == 'object':
-            dispatch = openerp.service.model.dispatch
+            dispatch = odoo.service.model.dispatch
         elif service_name == 'report':
-            dispatch = openerp.service.report.dispatch
+            dispatch = odoo.service.report.dispatch
         result = dispatch(method, params)
 
         if rpc_request_flag or rpc_response_flag:
@@ -121,20 +121,20 @@ def dispatch_rpc(service_name, method, params):
                 end_rss, end_vms = memory_info(psutil.Process(os.getpid()))
             logline = '%s.%s time:%.3fs mem: %sk -> %sk (diff: %sk)' % (service_name, method, end_time - start_time, start_vms / 1024, end_vms / 1024, (end_vms - start_vms)/1024)
             if rpc_response_flag:
-                openerp.netsvc.log(rpc_response, logging.DEBUG, logline, result)
+                odoo.netsvc.log(rpc_response, logging.DEBUG, logline, result)
             else:
-                openerp.netsvc.log(rpc_request, logging.DEBUG, logline, replace_request_password(params), depth=1)
+                odoo.netsvc.log(rpc_request, logging.DEBUG, logline, replace_request_password(params), depth=1)
 
         return result
     except NO_POSTMORTEM:
         raise
-    except openerp.exceptions.DeferredException, e:
-        _logger.exception(openerp.tools.exception_to_unicode(e))
-        openerp.tools.debugger.post_mortem(openerp.tools.config, e.traceback)
+    except odoo.exceptions.DeferredException, e:
+        _logger.exception(odoo.tools.exception_to_unicode(e))
+        odoo.tools.debugger.post_mortem(odoo.tools.config, e.traceback)
         raise
     except Exception, e:
-        _logger.exception(openerp.tools.exception_to_unicode(e))
-        openerp.tools.debugger.post_mortem(openerp.tools.config, sys.exc_info())
+        _logger.exception(odoo.tools.exception_to_unicode(e))
+        odoo.tools.debugger.post_mortem(odoo.tools.config, sys.exc_info())
         raise
 
 def local_redirect(path, query=None, keep_hash=False, forward_debug=True, code=303):
@@ -198,7 +198,7 @@ class WebRequest(object):
         self._failed = None
 
         # set db/uid trackers - they're cleaned up at the WSGI
-        # dispatching phase in openerp.service.wsgi_server.application
+        # dispatching phase in odoo.service.wsgi_server.application
         if self.db:
             threading.current_thread().dbname = self.db
         if self.session.uid:
@@ -206,7 +206,7 @@ class WebRequest(object):
 
     @property
     def cr(self):
-        """ :class:`~openerp.sql_db.Cursor` initialized for the current method call.
+        """ :class:`~odoo.sql_db.Cursor` initialized for the current method call.
 
         Accessing the cursor when the current request uses the ``none``
         authentication will raise an exception.
@@ -242,9 +242,9 @@ class WebRequest(object):
 
     @property
     def env(self):
-        """ The :class:`~openerp.api.Environment` bound to current request. """
+        """ The :class:`~odoo.api.Environment` bound to current request. """
         if self._env is None:
-            self._env = openerp.api.Environment(self.cr, self.uid, self.context)
+            self._env = odoo.api.Environment(self.cr, self.uid, self.context)
         return self._env
 
     @lazy_property
@@ -291,8 +291,8 @@ class WebRequest(object):
         self._failed = exception # prevent tx commit
         if not isinstance(exception, NO_POSTMORTEM) \
                 and not isinstance(exception, werkzeug.exceptions.HTTPException):
-            openerp.tools.debugger.post_mortem(
-                openerp.tools.config, sys.exc_info())
+            odoo.tools.debugger.post_mortem(
+                odoo.tools.config, sys.exc_info())
         raise
 
     def _call_function(self, *args, **kwargs):
@@ -359,7 +359,7 @@ class WebRequest(object):
 
             use :attr:`.env`
         """
-        return openerp.registry(self.db) if self.db else None
+        return odoo.registry(self.db) if self.db else None
 
     @property
     def db(self):
@@ -465,8 +465,8 @@ def route(route=None, **kw):
 
         * if the form is generated in Python, a csrf token is
           available via :meth:`request.csrf_token()
-          <openerp.http.WebRequest.csrf_token`, the
-          :data:`~openerp.http.request` object is available by default
+          <odoo.http.WebRequest.csrf_token`, the
+          :data:`~odoo.http.request` object is available by default
           in QWeb (python) templates, it may have to be added
           explicitly if you are not using QWeb.
 
@@ -634,7 +634,7 @@ class JsonRequest(WebRequest):
         try:
             return super(JsonRequest, self)._handle_exception(exception)
         except Exception:
-            if not isinstance(exception, (openerp.exceptions.Warning, SessionExpiredException, openerp.exceptions.except_orm)):
+            if not isinstance(exception, (odoo.exceptions.Warning, SessionExpiredException, odoo.exceptions.except_orm)):
                 _logger.exception("Exception during JSON request handling.")
             error = {
                     'code': 200,
@@ -695,21 +695,21 @@ def serialize_exception(e):
         "arguments": to_jsonable(e.args),
         "exception_type": "internal_error"
     }
-    if isinstance(e, openerp.exceptions.UserError):
+    if isinstance(e, odoo.exceptions.UserError):
         tmp["exception_type"] = "user_error"
-    elif isinstance(e, openerp.exceptions.Warning):
+    elif isinstance(e, odoo.exceptions.Warning):
         tmp["exception_type"] = "warning"
-    elif isinstance(e, openerp.exceptions.RedirectWarning):
+    elif isinstance(e, odoo.exceptions.RedirectWarning):
         tmp["exception_type"] = "warning"
-    elif isinstance(e, openerp.exceptions.AccessError):
+    elif isinstance(e, odoo.exceptions.AccessError):
         tmp["exception_type"] = "access_error"
-    elif isinstance(e, openerp.exceptions.MissingError):
+    elif isinstance(e, odoo.exceptions.MissingError):
         tmp["exception_type"] = "missing_error"
-    elif isinstance(e, openerp.exceptions.AccessDenied):
+    elif isinstance(e, odoo.exceptions.AccessDenied):
         tmp["exception_type"] = "access_denied"
-    elif isinstance(e, openerp.exceptions.ValidationError):
+    elif isinstance(e, odoo.exceptions.ValidationError):
         tmp["exception_type"] = "validation_error"
-    elif isinstance(e, openerp.exceptions.except_orm):
+    elif isinstance(e, odoo.exceptions.except_orm):
         tmp["exception_type"] = "except_orm"
     return tmp
 
@@ -901,7 +901,7 @@ class ControllerType(type):
         # store the controller in the controllers list
         name_class = ("%s.%s" % (cls.__module__, cls.__name__), cls)
         class_path = name_class[0].split(".")
-        if not class_path[:2] == ["openerp", "addons"]:
+        if not class_path[:2] == ["odoo", "addons"]:
             module = ""
         else:
             # we want to know all modules that have controllers
@@ -934,7 +934,7 @@ def routing_map(modules, nodb_only, converters=None):
 
     def get_subclasses(klass):
         def valid(c):
-            return c.__module__.startswith('openerp.addons.') and c.__module__.split(".")[2] in modules
+            return c.__module__.startswith('odoo.addons.') and c.__module__.split(".")[2] in modules
         subclasses = klass.__subclasses__()
         result = []
         for subclass in subclasses:
@@ -1242,7 +1242,7 @@ class Response(werkzeug.wrappers.Response):
     def render(self):
         """ Renders the Response's template, returns the result
         """
-        env = request.env(user=self.uid or request.uid or openerp.SUPERUSER_ID)
+        env = request.env(user=self.uid or request.uid or odoo.SUPERUSER_ID)
         self.qcontext['request'] = request
         return env["ir.ui.view"].render_template(self.template, self.qcontext)
 
@@ -1285,14 +1285,14 @@ class Root(object):
     @lazy_property
     def session_store(self):
         # Setup http sessions
-        path = openerp.tools.config.session_dir
+        path = odoo.tools.config.session_dir
         _logger.debug('HTTP sessions stored in: %s', path)
         return werkzeug.contrib.sessions.FilesystemSessionStore(path, session_class=OpenERPSession)
 
     @lazy_property
     def nodb_routing_map(self):
         _logger.info("Generating nondb routing")
-        return routing_map([''] + openerp.conf.server_wide_modules, True)
+        return routing_map([''] + odoo.conf.server_wide_modules, True)
 
     def __call__(self, environ, start_response):
         """ Handle a WSGI request
@@ -1308,7 +1308,7 @@ class Root(object):
         # TODO should we move this to ir.http so that only configured modules are served ?
         statics = {}
 
-        for addons_path in openerp.modules.module.ad_paths:
+        for addons_path in odoo.modules.module.ad_paths:
             for module in sorted(os.listdir(str(addons_path))):
                 if module not in addons_module:
                     manifest_path = os.path.join(addons_path, module, '__openerp__.py')
@@ -1319,8 +1319,8 @@ class Root(object):
                             continue
                         manifest['addons_path'] = addons_path
                         _logger.debug("Loading %s", module)
-                        if 'openerp.addons' in sys.modules:
-                            m = __import__('openerp.addons.' + module)
+                        if 'odoo.addons' in sys.modules:
+                            m = __import__('odoo.addons.' + module)
                         else:
                             m = None
                         addons_module[module] = m
@@ -1447,9 +1447,9 @@ class Root(object):
             with request:
                 db = request.session.db
                 if db:
-                    openerp.registry(db).check_signaling()
+                    odoo.registry(db).check_signaling()
                     try:
-                        with openerp.tools.mute_logger('openerp.sql_db'):
+                        with odoo.tools.mute_logger('odoo.sql_db'):
                             ir_http = request.registry['ir.http']
                     except (AttributeError, psycopg2.OperationalError, psycopg2.ProgrammingError):
                         # psycopg2 error or attribute error while constructing
@@ -1482,7 +1482,7 @@ class Root(object):
         return request.registry['ir.http'].routing_map()
 
 def db_list(force=False, httprequest=None):
-    dbs = openerp.service.db.list_dbs(force)
+    dbs = odoo.service.db.list_dbs(force)
     return db_filter(dbs, httprequest=httprequest)
 
 def db_filter(dbs, httprequest=None):
@@ -1491,7 +1491,7 @@ def db_filter(dbs, httprequest=None):
     d, _, r = h.partition('.')
     if d == "www" and r:
         d = r.partition('.')[0]
-    r = openerp.tools.config['dbfilter'].replace('%h', h).replace('%d', d)
+    r = odoo.tools.config['dbfilter'].replace('%h', h).replace('%d', d)
     dbs = [i for i in dbs if re.match(r, i)]
     return dbs
 
@@ -1588,7 +1588,7 @@ def send_file(filepath_or_fp, mimetype=None, as_attachment=False, filename=None,
 
     if isinstance(mtime, str):
         try:
-            server_format = openerp.tools.misc.DEFAULT_SERVER_DATETIME_FORMAT
+            server_format = odoo.tools.misc.DEFAULT_SERVER_DATETIME_FORMAT
             mtime = datetime.datetime.strptime(mtime.split('.')[0], server_format)
         except Exception:
             mtime = None
@@ -1618,7 +1618,7 @@ def send_file(filepath_or_fp, mimetype=None, as_attachment=False, filename=None,
     return rv
 
 def content_disposition(filename):
-    filename = openerp.tools.ustr(filename)
+    filename = odoo.tools.ustr(filename)
     escaped = urllib2.quote(filename.encode('utf8'))
     browser = request.httprequest.user_agent.browser
     version = int((request.httprequest.user_agent.version or '0').split('.')[0])
diff --git a/odoo/loglevels.py b/odoo/loglevels.py
index 08dba7bfe003..400f08e1a8fa 100644
--- a/odoo/loglevels.py
+++ b/odoo/loglevels.py
@@ -64,7 +64,7 @@ def ustr(value, hint_encoding='utf-8', errors='strict'):
         return value
 
     # special short-circuit for str, as we still needs to support
-    # str subclasses such as `openerp.tools.unquote`
+    # str subclasses such as `odoo.tools.unquote`
     if ttype is str or issubclass(ttype, str):
 
         # try hint_encoding first, avoids call to get_encoding()
diff --git a/odoo/models.py b/odoo/models.py
index ce12cdd75b74..6b82a115f55c 100644
--- a/odoo/models.py
+++ b/odoo/models.py
@@ -40,7 +40,7 @@ import psycopg2
 from lxml import etree
 from lxml.builder import E
 
-import openerp
+import odoo
 from . import SUPERUSER_ID
 from . import api
 from . import tools
@@ -80,7 +80,7 @@ def make_compute(text, deps):
 
 
 def check_object_name(name):
-    """ Check if the given name is a valid openerp object name.
+    """ Check if the given name is a valid model name.
 
         The _name attribute in osv and osv_memory object is subject to
         some restrictions. This function returns True or False whether
@@ -178,12 +178,12 @@ class MetaModel(api.Meta):
                 val.args = dict(val.args, _module=self._module)
 
     def _get_addon_name(self, full_name):
-        # The (OpenERP) module name can be in the ``openerp.addons`` namespace
+        # The (OpenERP) module name can be in the ``odoo.addons`` namespace
         # or not. For instance, module ``sale`` can be imported as
-        # ``openerp.addons.sale`` (the right way) or ``sale`` (for backward
+        # ``odoo.addons.sale`` (the right way) or ``sale`` (for backward
         # compatibility).
         module_parts = full_name.split('.')
-        if len(module_parts) > 2 and module_parts[:2] == ['openerp', 'addons']:
+        if len(module_parts) > 2 and module_parts[:2] == ['odoo', 'addons']:
             addon_name = full_name.split('.')[2]
         else:
             addon_name = full_name.split('.')[0]
@@ -452,13 +452,13 @@ class BaseModel(object):
 
     def compute_concurrency_field(self):
         for record in self:
-            record[self.CONCURRENCY_CHECK_FIELD] = openerp.fields.Datetime.now()
+            record[self.CONCURRENCY_CHECK_FIELD] = odoo.fields.Datetime.now()
 
     @api.depends('create_date', 'write_date')
     def compute_concurrency_field_with_access(self):
         for record in self:
             record[self.CONCURRENCY_CHECK_FIELD] = \
-                record.write_date or record.create_date or openerp.fields.Datetime.now()
+                record.write_date or record.create_date or odoo.fields.Datetime.now()
 
     #
     # Goal: try to apply inheritance at the instantiation level and
@@ -943,7 +943,7 @@ class BaseModel(object):
         return {'ids': ids, 'messages': messages}
 
     def _add_fake_fields(self, fields):
-        from openerp.fields import Char, Integer
+        from odoo.fields import Char, Integer
         fields[None] = Char('rec_name')
         fields['id'] = Char('External ID')
         fields['.id'] = Integer('Database ID')
@@ -1198,7 +1198,7 @@ class BaseModel(object):
             not preceded by ``!`` and is not member of any of the groups
             preceded by ``!``
         """
-        from openerp.http import request
+        from odoo.http import request
         user = self.env.user
 
         has_groups = []
@@ -1688,7 +1688,7 @@ class BaseModel(object):
             self.browse(present_group_ids),
             domain,
             read_group_order=read_group_order,
-            access_rights_uid=openerp.SUPERUSER_ID,
+            access_rights_uid=odoo.SUPERUSER_ID,
         )
 
         result_template = dict.fromkeys(aggregated_fields, False)
@@ -3340,7 +3340,7 @@ class BaseModel(object):
     @api.multi
     def create_workflow(self):
         """ Create a workflow instance for the given records. """
-        from openerp import workflow
+        from odoo import workflow
         for res_id in self.ids:
             workflow.trg_create(self._uid, self._name, res_id, self._cr)
         return True
@@ -3348,7 +3348,7 @@ class BaseModel(object):
     @api.multi
     def delete_workflow(self):
         """ Delete the workflow instances bound to the given records. """
-        from openerp import workflow
+        from odoo import workflow
         for res_id in self.ids:
             workflow.trg_delete(self._uid, self._name, res_id, self._cr)
         self.invalidate_cache()
@@ -3357,7 +3357,7 @@ class BaseModel(object):
     @api.multi
     def step_workflow(self):
         """ Reevaluate the workflow instances of the given records. """
-        from openerp import workflow
+        from odoo import workflow
         for res_id in self.ids:
             workflow.trg_write(self._uid, self._name, res_id, self._cr)
         return True
@@ -3365,7 +3365,7 @@ class BaseModel(object):
     @api.multi
     def signal_workflow(self, signal):
         """ Send the workflow signal, and return a dict mapping ids to workflow results. """
-        from openerp import workflow
+        from odoo import workflow
         result = {}
         for res_id in self.ids:
             result[res_id] = workflow.trg_validate(self._uid, self._name, res_id, signal, self._cr)
@@ -3376,7 +3376,7 @@ class BaseModel(object):
         """ Rebind the workflow instance bound to the given 'old' record IDs to
             the given 'new' IDs. (``old_new_ids`` is a list of pairs ``(old, new)``.
         """
-        from openerp import workflow
+        from odoo import workflow
         for old_id, new_id in old_new_ids:
             workflow.trg_redirect(self._uid, self._name, old_id, new_id, self._cr)
         self.invalidate_cache()
@@ -3487,32 +3487,32 @@ class BaseModel(object):
         :raise ValidateError: if user tries to enter invalid value for a field that is not in selection
         :raise UserError: if a loop would be created in a hierarchy of objects a result of the operation (such as setting an object as its own parent)
 
-        * For numeric fields (:class:`~openerp.fields.Integer`,
-          :class:`~openerp.fields.Float`) the value should be of the
+        * For numeric fields (:class:`~odoo.fields.Integer`,
+          :class:`~odoo.fields.Float`) the value should be of the
           corresponding type
-        * For :class:`~openerp.fields.Boolean`, the value should be a
+        * For :class:`~odoo.fields.Boolean`, the value should be a
           :class:`python:bool`
-        * For :class:`~openerp.fields.Selection`, the value should match the
+        * For :class:`~odoo.fields.Selection`, the value should match the
           selection values (generally :class:`python:str`, sometimes
           :class:`python:int`)
-        * For :class:`~openerp.fields.Many2one`, the value should be the
+        * For :class:`~odoo.fields.Many2one`, the value should be the
           database identifier of the record to set
         * Other non-relational fields use a string for value
 
           .. danger::
 
               for historical and compatibility reasons,
-              :class:`~openerp.fields.Date` and
-              :class:`~openerp.fields.Datetime` fields use strings as values
+              :class:`~odoo.fields.Date` and
+              :class:`~odoo.fields.Datetime` fields use strings as values
               (written and read) rather than :class:`~python:datetime.date` or
               :class:`~python:datetime.datetime`. These date strings are
               UTC-only and formatted according to
-              :const:`openerp.tools.misc.DEFAULT_SERVER_DATE_FORMAT` and
-              :const:`openerp.tools.misc.DEFAULT_SERVER_DATETIME_FORMAT`
+              :const:`odoo.tools.misc.DEFAULT_SERVER_DATE_FORMAT` and
+              :const:`odoo.tools.misc.DEFAULT_SERVER_DATETIME_FORMAT`
         * .. _openerp/models/relationals/format:
 
-          :class:`~openerp.fields.One2many` and
-          :class:`~openerp.fields.Many2many` use a special "commands" format to
+          :class:`~odoo.fields.One2many` and
+          :class:`~odoo.fields.Many2many` use a special "commands" format to
           manipulate the set of records stored in/associated with the field.
 
           This format is a list of triplets executed sequentially, where each
@@ -3530,21 +3530,21 @@ class BaseModel(object):
           ``(3, id, _)``
               removes the record of id ``id`` from the set, but does not
               delete it. Can not be used on
-              :class:`~openerp.fields.One2many`. Can not be used in
+              :class:`~odoo.fields.One2many`. Can not be used in
               :meth:`~.create`.
           ``(4, id, _)``
               adds an existing record of id ``id`` to the set. Can not be
-              used on :class:`~openerp.fields.One2many`.
+              used on :class:`~odoo.fields.One2many`.
           ``(5, _, _)``
               removes all records from the set, equivalent to using the
               command ``3`` on every record explicitly. Can not be used on
-              :class:`~openerp.fields.One2many`. Can not be used in
+              :class:`~odoo.fields.One2many`. Can not be used in
               :meth:`~.create`.
           ``(6, _, ids)``
               replaces all existing records in the set by the ``ids`` list,
               equivalent to using the command ``5`` followed by a command
               ``4`` for each ``id`` in ``ids``. Can not be used on
-              :class:`~openerp.fields.One2many`.
+              :class:`~odoo.fields.One2many`.
 
           .. note:: Values marked as ``_`` in the list above are ignored and
                     can be anything, generally ``0`` or ``False``.
@@ -4834,7 +4834,7 @@ class BaseModel(object):
             delays while re-fetching from the database.
             The returned recordset has the same prefetch object as ``self``.
 
-        :type env: :class:`~openerp.api.Environment`
+        :type env: :class:`~odoo.api.Environment`
         """
         return self._browse(self._ids, env, self._prefetch)
 
diff --git a/odoo/modules/__init__.py b/odoo/modules/__init__.py
index a6be26492af9..530f81ff5e39 100644
--- a/odoo/modules/__init__.py
+++ b/odoo/modules/__init__.py
@@ -7,9 +7,9 @@
 
 from . import db, graph, loading, migration, module, registry
 
-from openerp.modules.loading import load_modules
+from odoo.modules.loading import load_modules
 
-from openerp.modules.module import (
+from odoo.modules.module import (
     adapt_version,
     get_module_path,
     get_module_resource,
diff --git a/odoo/modules/db.py b/odoo/modules/db.py
index 66051f8ca4db..f2592f947e2b 100644
--- a/odoo/modules/db.py
+++ b/odoo/modules/db.py
@@ -1,7 +1,7 @@
 # -*- coding: utf-8 -*-
 # Part of Odoo. See LICENSE file for full copyright and licensing details.
 
-import openerp.modules
+import odoo.modules
 import logging
 
 _logger = logging.getLogger(__name__)
@@ -23,25 +23,25 @@ def initialize(cr):
     and ir_model_data entries.
 
     """
-    f = openerp.modules.get_module_resource('base', 'base.sql')
+    f = odoo.modules.get_module_resource('base', 'base.sql')
     if not f:
         m = "File not found: 'base.sql' (provided by module 'base')."
         _logger.critical(m)
         raise IOError(m)
-    base_sql_file = openerp.tools.misc.file_open(f)
+    base_sql_file = odoo.tools.misc.file_open(f)
     try:
         cr.execute(base_sql_file.read())
         cr.commit()
     finally:
         base_sql_file.close()
 
-    for i in openerp.modules.get_modules():
-        mod_path = openerp.modules.get_module_path(i)
+    for i in odoo.modules.get_modules():
+        mod_path = odoo.modules.get_module_path(i)
         if not mod_path:
             continue
 
         # This will raise an exception if no/unreadable descriptor file.
-        info = openerp.modules.load_information_from_description_file(i)
+        info = odoo.modules.load_information_from_description_file(i)
 
         if not info:
             continue
diff --git a/odoo/modules/graph.py b/odoo/modules/graph.py
index f3e7e4850313..aaf90ae84436 100644
--- a/odoo/modules/graph.py
+++ b/odoo/modules/graph.py
@@ -8,15 +8,15 @@ from os.path import join as opj
 import itertools
 import zipimport
 
-import openerp
+import odoo
 
-import openerp.osv as osv
-import openerp.tools as tools
-import openerp.tools.osutil as osutil
-from openerp.tools.translate import _
+import odoo.osv as osv
+import odoo.tools as tools
+import odoo.tools.osutil as osutil
+from odoo.tools.translate import _
 
 import zipfile
-import openerp.release as release
+import odoo.release as release
 
 import re
 import base64
@@ -77,7 +77,7 @@ class Graph(dict):
             # This will raise an exception if no/unreadable descriptor file.
             # NOTE The call to load_information_from_description_file is already
             # done by db.initialize, so it is possible to not do it again here.
-            info = openerp.modules.module.load_information_from_description_file(module)
+            info = odoo.modules.module.load_information_from_description_file(module)
             if info and info['installable']:
                 packages.append((module, info)) # TODO directly a dict, like in get_modules_with_version
             else:
diff --git a/odoo/modules/loading.py b/odoo/modules/loading.py
index 56066ecc2ad8..f379f55d3c0c 100644
--- a/odoo/modules/loading.py
+++ b/odoo/modules/loading.py
@@ -11,19 +11,19 @@ import sys
 import threading
 import time
 
-import openerp
-import openerp.modules.db
-import openerp.modules.graph
-import openerp.modules.migration
-import openerp.modules.registry
-import openerp.tools as tools
+import odoo
+import odoo.modules.db
+import odoo.modules.graph
+import odoo.modules.migration
+import odoo.modules.registry
+import odoo.tools as tools
 
-from openerp import api, SUPERUSER_ID
-from openerp.modules.module import adapt_version, initialize_sys_path, \
-                                   load_openerp_module, runs_post_install
+from odoo import api, SUPERUSER_ID
+from odoo.modules.module import adapt_version, initialize_sys_path, \
+                                load_openerp_module, runs_post_install
 
 _logger = logging.getLogger(__name__)
-_test_logger = logging.getLogger('openerp.tests')
+_test_logger = logging.getLogger('odoo.tests')
 
 
 def load_module_graph(cr, graph, status=None, perform_checks=True, skip_modules=None, report=None):
@@ -50,7 +50,7 @@ def load_module_graph(cr, graph, status=None, perform_checks=True, skip_modules=
             else:
                 cr.rollback()
                 # avoid keeping stale xml_id, etc. in cache
-                openerp.registry(cr.dbname).clear_caches()
+                odoo.registry(cr.dbname).clear_caches()
 
 
     def _get_files_of_kind(kind):
@@ -99,8 +99,8 @@ def load_module_graph(cr, graph, status=None, perform_checks=True, skip_modules=
 
     processed_modules = []
     loaded_modules = []
-    registry = openerp.registry(cr.dbname)
-    migrations = openerp.modules.migration.MigrationManager(cr, graph)
+    registry = odoo.registry(cr.dbname)
+    migrations = odoo.modules.migration.MigrationManager(cr, graph)
     module_count = len(graph)
     _logger.info('loading %d modules...', module_count)
 
@@ -108,7 +108,7 @@ def load_module_graph(cr, graph, status=None, perform_checks=True, skip_modules=
 
     # register, instantiate and initialize models for each modules
     t0 = time.time()
-    t0_sql = openerp.sql_db.sql_counter
+    t0_sql = odoo.sql_db.sql_counter
 
     for index, package in enumerate(graph, 1):
         module_name = package.name
@@ -123,7 +123,7 @@ def load_module_graph(cr, graph, status=None, perform_checks=True, skip_modules=
 
         new_install = package.state == 'to install'
         if new_install:
-            py_module = sys.modules['openerp.addons.%s' % (module_name,)]
+            py_module = sys.modules['odoo.addons.%s' % (module_name,)]
             pre_init = package.info.get('pre_init_hook')
             if pre_init:
                 getattr(py_module, pre_init)(cr)
@@ -163,7 +163,7 @@ def load_module_graph(cr, graph, status=None, perform_checks=True, skip_modules=
             migrations.migrate_module(package, 'post')
 
             # Update translations for all installed languages
-            overwrite = openerp.tools.config["overwrite_existing_translations"]
+            overwrite = odoo.tools.config["overwrite_existing_translations"]
             module.with_context(overwrite=overwrite).update_translations()
 
             registry._init_modules.add(package.name)
@@ -183,7 +183,7 @@ def load_module_graph(cr, graph, status=None, perform_checks=True, skip_modules=
                     report.record_result(load_test(module_name, idref, mode))
                     # Python tests
                     env['ir.http']._clear_routing_map()     # force routing map to be rebuilt
-                    report.record_result(openerp.modules.module.run_unit_tests(module_name, cr.dbname))
+                    report.record_result(odoo.modules.module.run_unit_tests(module_name, cr.dbname))
 
             processed_modules.append(package.name)
 
@@ -199,7 +199,7 @@ def load_module_graph(cr, graph, status=None, perform_checks=True, skip_modules=
         registry._init_modules.add(package.name)
         cr.commit()
 
-    _logger.log(25, "%s modules loaded in %.2fs, %s queries", len(graph), time.time() - t0, openerp.sql_db.sql_counter - t0_sql)
+    _logger.log(25, "%s modules loaded in %.2fs, %s queries", len(graph), time.time() - t0, odoo.sql_db.sql_counter - t0_sql)
 
     registry.clear_manual_fields()
 
@@ -248,9 +248,9 @@ def load_modules(db, force_demo=False, status=None, update_module=False):
 
     cr = db.cursor()
     try:
-        if not openerp.modules.db.is_initialized(cr):
+        if not odoo.modules.db.is_initialized(cr):
             _logger.info("init db")
-            openerp.modules.db.initialize(cr)
+            odoo.modules.db.initialize(cr)
             update_module = True # process auto-installed modules
             tools.config["init"]["all"] = 1
             tools.config['update']['all'] = 1
@@ -258,15 +258,15 @@ def load_modules(db, force_demo=False, status=None, update_module=False):
                 tools.config["demo"]['all'] = 1
 
         # This is a brand new registry, just created in
-        # openerp.modules.registry.Registry.new().
-        registry = openerp.registry(cr.dbname)
+        # odoo.modules.registry.Registry.new().
+        registry = odoo.registry(cr.dbname)
         env = api.Environment(cr, SUPERUSER_ID, {})
 
         if 'base' in tools.config['update'] or 'all' in tools.config['update']:
             cr.execute("update ir_module_module set state=%s where name=%s and state=%s", ('to upgrade', 'base', 'installed'))
 
         # STEP 1: LOAD BASE (must be done before module dependencies can be computed for later steps)
-        graph = openerp.modules.graph.Graph()
+        graph = odoo.modules.graph.Graph()
         graph.add_module(cr, 'base', force)
         if not graph:
             _logger.critical('module base cannot be loaded! (hint: verify addons-path)')
@@ -379,7 +379,7 @@ def load_modules(db, force_demo=False, status=None, update_module=False):
                 for pkg in pkgs:
                     uninstall_hook = pkg.info.get('uninstall_hook')
                     if uninstall_hook:
-                        py_module = sys.modules['openerp.addons.%s' % (pkg.name,)]
+                        py_module = sys.modules['odoo.addons.%s' % (pkg.name,)]
                         getattr(py_module, uninstall_hook)(cr, registry)
 
                 Module = env['ir.module.module']
@@ -389,7 +389,7 @@ def load_modules(db, force_demo=False, status=None, update_module=False):
                 cr.commit()
                 _logger.info('Reloading registry once more after uninstalling modules')
                 api.Environment.reset()
-                return openerp.modules.registry.Registry.new(cr.dbname, force_demo, status, update_module)
+                return odoo.modules.registry.Registry.new(cr.dbname, force_demo, status, update_module)
 
         # STEP 6: verify custom views on every model
         if update_module:
@@ -414,14 +414,14 @@ def load_modules(db, force_demo=False, status=None, update_module=False):
         cr.commit()
 
         t0 = time.time()
-        t0_sql = openerp.sql_db.sql_counter
-        if openerp.tools.config['test_enable']:
+        t0_sql = odoo.sql_db.sql_counter
+        if odoo.tools.config['test_enable']:
             if update_module:
                 cr.execute("SELECT name FROM ir_module_module WHERE state='installed' and name = ANY(%s)", (processed_modules,))
             else:
                 cr.execute("SELECT name FROM ir_module_module WHERE state='installed'")
             for module_name in cr.fetchall():
-                report.record_result(openerp.modules.module.run_unit_tests(module_name[0], cr.dbname, position=runs_post_install))
-            _logger.log(25, "All post-tested in %.2fs, %s queries", time.time() - t0, openerp.sql_db.sql_counter - t0_sql)
+                report.record_result(odoo.modules.module.run_unit_tests(module_name[0], cr.dbname, position=runs_post_install))
+            _logger.log(25, "All post-tested in %.2fs, %s queries", time.time() - t0, odoo.sql_db.sql_counter - t0_sql)
     finally:
         cr.close()
diff --git a/odoo/modules/migration.py b/odoo/modules/migration.py
index 9776a6816ad9..67f1d4d5c890 100644
--- a/odoo/modules/migration.py
+++ b/odoo/modules/migration.py
@@ -8,10 +8,10 @@ import logging
 import os
 from os.path import join as opj
 
-import openerp
-import openerp.release as release
-import openerp.tools as tools
-from openerp.tools.parse_version import parse_version
+import odoo
+import odoo.release as release
+import odoo.tools as tools
+from odoo.tools.parse_version import parse_version
 
 
 _logger = logging.getLogger(__name__)
@@ -60,7 +60,7 @@ class MigrationManager(object):
             if not (hasattr(pkg, 'update') or pkg.state == 'to upgrade'):
                 continue
 
-            get_module_filetree = openerp.modules.module.get_module_filetree
+            get_module_filetree = odoo.modules.module.get_module_filetree
             self.migrations[pkg.name]['module'] = get_module_filetree(pkg.name, 'migrations') or {}
             self.migrations[pkg.name]['maintenance'] = get_module_filetree('base', 'maintenance/migrations/' + pkg.name) or {}
 
diff --git a/odoo/modules/module.py b/odoo/modules/module.py
index f1812d86350b..bd850870e4d8 100644
--- a/odoo/modules/module.py
+++ b/odoo/modules/module.py
@@ -18,11 +18,11 @@ import threading
 from operator import itemgetter
 from os.path import join as opj
 
-import openerp
-import openerp.tools as tools
-import openerp.release as release
-from openerp import SUPERUSER_ID, api
-from openerp.tools.safe_eval import safe_eval
+import odoo
+import odoo.tools as tools
+import odoo.release as release
+from odoo import SUPERUSER_ID, api
+from odoo.tools.safe_eval import safe_eval
 
 MANIFEST = '__openerp__.py'
 README = ['README.rst', 'README.md', 'README.txt']
@@ -37,8 +37,8 @@ hooked = False
 loaded = []
 
 class AddonsHook(object):
-    """ Makes modules accessible through openerp.addons.* and odoo.addons.*
-    """
+    """ Makes modules accessible through openerp.addons.* and odoo.addons.* """
+
     def find_module(self, name, path):
         if name.startswith(('odoo.addons.', 'openerp.addons.'))\
                 and name.count('.') == 2:
@@ -61,8 +61,8 @@ class AddonsHook(object):
         if f: f.close()
 
         # TODO: fetch existing module from sys.modules if reloads permitted
-        # create empty openerp.addons.* module, set name
-        new_mod = types.ModuleType(openerp_name)
+        # create empty odoo.addons.* module, set name
+        new_mod = types.ModuleType(odoo_name)
         new_mod.__loader__ = self
 
         # module top-level can only be a package
@@ -70,18 +70,18 @@ class AddonsHook(object):
         modfile = opj(path, '__init__.py')
         new_mod.__file__ = modfile
         new_mod.__path__ = [path]
-        new_mod.__package__ = openerp_name
+        new_mod.__package__ = odoo_name
 
         # both base and alias should be in sys.modules to handle recursive and
         # corecursive situations
-        sys.modules[openerp_name] = sys.modules[odoo_name] = new_mod
+        sys.modules[odoo_name] = sys.modules[openerp_name] = new_mod
 
         # execute source in context of module *after* putting everything in
         # sys.modules, so recursive import works
         execfile(modfile, new_mod.__dict__)
 
         # people import openerp.addons and expect openerp.addons.<module> to work
-        setattr(openerp.addons, addon_name, new_mod)
+        setattr(odoo.addons, addon_name, new_mod)
 
         return sys.modules[name]
 # need to register loader with setuptools as Jinja relies on it when using
@@ -89,19 +89,18 @@ class AddonsHook(object):
 pkg_resources.register_loader_type(AddonsHook, pkg_resources.DefaultProvider)
 
 class OdooHook(object):
-    """ Makes odoo package also available as openerp
-    """
+    """ Makes odoo package also available as openerp """
 
     def find_module(self, name, path=None):
         # openerp.addons.<identifier> should already be matched by AddonsHook,
         # only framework and subdirectories of modules should match
-        if re.match(r'^odoo\b', name):
+        if re.match(r'^openerp\b', name):
             return self
 
     def load_module(self, name):
         assert name not in sys.modules
 
-        canonical = re.sub(r'^odoo(.*)', r'openerp\g<1>', name)
+        canonical = re.sub(r'^openerp(.*)', r'odoo\g<1>', name)
 
         if canonical in sys.modules:
             mod = sys.modules[canonical]
@@ -122,7 +121,7 @@ def initialize_sys_path():
     addons paths.
 
     This ensures something like ``import crm`` (or even
-    ``import openerp.addons.crm``) works even if the addons are not in the
+    ``import odoo.addons.crm``) works even if the addons are not in the
     PYTHONPATH.
     """
     global ad_paths
@@ -177,7 +176,7 @@ def get_module_filetree(module, dir='.'):
     if dir.startswith('..') or (dir and dir[0] == '/'):
         raise Exception('Cannot access file outside the module')
 
-    files = openerp.tools.osutil.listdir(path, True)
+    files = odoo.tools.osutil.listdir(path, True)
 
     tree = {}
     for f in files:
@@ -355,14 +354,14 @@ def load_openerp_module(module_name):
     initialize_sys_path()
     try:
         mod_path = get_module_path(module_name)
-        __import__('openerp.addons.' + module_name)
+        __import__('odoo.addons.' + module_name)
 
         # Call the module's post-load hook. This can done before any model or
         # data has been initialized. This is ok as the post-load hook is for
         # server-wide (instead of registry-specific) functionalities.
         info = load_information_from_description_file(module_name)
         if info['post_load']:
-            getattr(sys.modules['openerp.addons.' + module_name], info['post_load'])()
+            getattr(sys.modules['odoo.addons.' + module_name], info['post_load'])()
 
     except Exception, e:
         msg = "Couldn't load module %s" % (module_name)
@@ -415,7 +414,7 @@ def get_test_modules(module):
     """ Return a list of module for the addons potentially containing tests to
     feed unittest.TestLoader.loadTestsFromModule() """
     # Try to import the module
-    modpath = 'openerp.addons.' + module
+    modpath = 'odoo.addons.' + module
     try:
         mod = importlib.import_module('.tests', modpath)
     except Exception, e:
@@ -436,7 +435,7 @@ def get_test_modules(module):
 
 # Use a custom stream object to log the test executions.
 class TestStream(object):
-    def __init__(self, logger_name='openerp.tests'):
+    def __init__(self, logger_name='odoo.tests'):
         self.logger = logging.getLogger(logger_name)
         self.r = re.compile(r'^-*$|^ *... *$|^ok$')
     def flush(self):
@@ -487,11 +486,11 @@ def run_unit_tests(module_name, dbname, position=runs_at_install):
 
         if suite.countTestCases():
             t0 = time.time()
-            t0_sql = openerp.sql_db.sql_counter
+            t0_sql = odoo.sql_db.sql_counter
             _logger.info('%s running tests.', m.__name__)
             result = unittest.TextTestRunner(verbosity=2, stream=TestStream(m.__name__)).run(suite)
             if time.time() - t0 > 5:
-                _logger.log(25, "%s tested in %.2fs, %s queries", m.__name__, time.time() - t0, openerp.sql_db.sql_counter - t0_sql)
+                _logger.log(25, "%s tested in %.2fs, %s queries", m.__name__, time.time() - t0, odoo.sql_db.sql_counter - t0_sql)
             if not result.wasSuccessful():
                 r = False
                 _logger.error("Module %s: %d failures, %d errors", module_name, len(result.failures), len(result.errors))
diff --git a/odoo/modules/registry.py b/odoo/modules/registry.py
index 7c9772c3881d..aba103ffcfd6 100644
--- a/odoo/modules/registry.py
+++ b/odoo/modules/registry.py
@@ -10,11 +10,11 @@ import logging
 import os
 import threading
 
-import openerp
+import odoo
 from .. import SUPERUSER_ID
-from openerp.tools import assertion_report, lazy_classproperty, config, \
+from odoo.tools import assertion_report, lazy_classproperty, config, \
                           lazy_property, topological_sort, OrderedSet
-from openerp.tools.lru import LRU
+from odoo.tools.lru import LRU
 
 _logger = logging.getLogger(__name__)
 
@@ -54,14 +54,14 @@ class Registry(Mapping):
                 return cls.new(db_name)
             finally:
                 # set db tracker - cleaned up at the WSGI dispatching phase in
-                # openerp.service.wsgi_server.application
+                # odoo.service.wsgi_server.application
                 threading.current_thread().dbname = db_name
 
     @classmethod
     def new(cls, db_name, force_demo=False, status=None, update_module=False):
         """ Create and return a new registry for the given database name. """
         with cls._lock:
-            with openerp.api.Environment.manage():
+            with odoo.api.Environment.manage():
                 registry = object.__new__(cls)
                 registry.init(db_name)
 
@@ -74,7 +74,7 @@ class Registry(Mapping):
                 try:
                     registry.setup_signaling()
                     # This should be a method on Registry
-                    openerp.modules.load_modules(registry._db, force_demo, status, update_module)
+                    odoo.modules.load_modules(registry._db, force_demo, status, update_module)
                 except Exception:
                     _logger.exception('Failed to load registry')
                     del cls.registries[db_name]
@@ -110,7 +110,7 @@ class Registry(Mapping):
         self._init_modules = set()
 
         self.db_name = db_name
-        self._db = openerp.sql_db.db_connect(db_name)
+        self._db = odoo.sql_db.db_connect(db_name)
 
         # special cursor for test mode; None means "normal" mode
         self.test_cr = None
@@ -118,7 +118,7 @@ class Registry(Mapping):
         # Indicates that the registry is 
         self.ready = False
 
-        # Inter-process signaling (used only when openerp.multi_process is True):
+        # Inter-process signaling (used only when odoo.multi_process is True):
         # The `base_registry_signaling` sequence indicates the whole registry
         # must be reloaded.
         # The `base_cache_signaling sequence` indicates all caches must be
@@ -132,10 +132,10 @@ class Registry(Mapping):
         self.cache_cleared = False
 
         with closing(self.cursor()) as cr:
-            has_unaccent = openerp.modules.db.has_unaccent(cr)
-            if openerp.tools.config['unaccent'] and not has_unaccent:
+            has_unaccent = odoo.modules.db.has_unaccent(cr)
+            if odoo.tools.config['unaccent'] and not has_unaccent:
                 _logger.warning("The option --unaccent was given but no unaccent() function was found in database.")
-            self.has_unaccent = openerp.tools.config['unaccent'] and has_unaccent
+            self.has_unaccent = odoo.tools.config['unaccent'] and has_unaccent
 
     @classmethod
     def delete(cls, db_name):
@@ -216,7 +216,7 @@ class Registry(Mapping):
         return self._fields_by_model[model_name]
 
     def do_parent_store(self, cr):
-        env = openerp.api.Environment(cr, SUPERUSER_ID, {})
+        env = odoo.api.Environment(cr, SUPERUSER_ID, {})
         for model_name in self._init_parent:
             if model_name in env:
                 env[model_name]._parent_store_compute()
@@ -259,7 +259,7 @@ class Registry(Mapping):
             :param partial: ``True`` if all models have not been loaded yet.
         """
         lazy_property.reset_all(self)
-        env = openerp.api.Environment(cr, SUPERUSER_ID, {})
+        env = odoo.api.Environment(cr, SUPERUSER_ID, {})
 
         # load custom models
         ir_model = env['ir.model']
@@ -296,7 +296,7 @@ class Registry(Mapping):
             _logger.info('module %s: creating or updating database tables', context['module'])
 
         context = dict(context, todo=[])
-        env = openerp.api.Environment(cr, SUPERUSER_ID, context)
+        env = odoo.api.Environment(cr, SUPERUSER_ID, context)
         models = [env[model_name] for model_name in model_names]
 
         for model in models:
@@ -325,7 +325,7 @@ class Registry(Mapping):
 
     def setup_signaling(self):
         """ Setup the inter-process signaling on this registry. """
-        if not openerp.multi_process:
+        if not odoo.multi_process:
             return
 
         with self.cursor() as cr:
@@ -351,7 +351,7 @@ class Registry(Mapping):
         """ Check whether the registry has changed, and performs all necessary
         operations to update the registry. Return an up-to-date registry.
         """
-        if not openerp.multi_process:
+        if not odoo.multi_process:
             return self
 
         with closing(self.cursor()) as cr:
@@ -377,7 +377,7 @@ class Registry(Mapping):
 
     def signal_registry_change(self):
         """ Notifies other processes that the registry has changed. """
-        if openerp.multi_process:
+        if odoo.multi_process:
             _logger.info("Registry changed, signaling through the database")
             with closing(self.cursor()) as cr:
                 cr.execute("select nextval('base_registry_signaling')")
@@ -385,7 +385,7 @@ class Registry(Mapping):
 
     def signal_caches_change(self):
         """ Notifies other processes if caches have been invalidated. """
-        if openerp.multi_process and self.cache_cleared:
+        if odoo.multi_process and self.cache_cleared:
             # signal it through the database to other processes
             _logger.info("At least one model cache has been invalidated, signaling through the database.")
             with closing(self.cursor()) as cr:
diff --git a/odoo/netsvc.py b/odoo/netsvc.py
index c99409edafe4..ff904fed2f35 100644
--- a/odoo/netsvc.py
+++ b/odoo/netsvc.py
@@ -12,7 +12,7 @@ import threading
 
 import psycopg2
 
-import openerp
+import odoo
 import sql_db
 import tools
 
@@ -27,27 +27,27 @@ def log(logger, level, prefix, msg, depth=None):
 
 def LocalService(name):
     """
-    The openerp.netsvc.LocalService() function is deprecated. It still works
+    The odoo.netsvc.LocalService() function is deprecated. It still works
     in two cases: workflows and reports. For workflows, instead of using
-    LocalService('workflow'), openerp.workflow should be used (better yet,
-    methods on openerp.osv.orm.Model should be used). For reports,
-    openerp.report.render_report() should be used (methods on the Model should
+    LocalService('workflow'), odoo.workflow should be used (better yet,
+    methods on odoo.osv.orm.Model should be used). For reports,
+    odoo.report.render_report() should be used (methods on the Model should
     be provided too in the future).
     """
-    assert openerp.conf.deprecation.allow_local_service
+    assert odoo.conf.deprecation.allow_local_service
     _logger.warning("LocalService() is deprecated since march 2013 (it was called with '%s')." % name)
 
     if name == 'workflow':
-        return openerp.workflow
+        return odoo.workflow
 
     if name.startswith('report.'):
-        report = openerp.report.interface.report_int._reports.get(name)
+        report = odoo.report.interface.report_int._reports.get(name)
         if report:
             return report
         else:
             dbname = getattr(threading.currentThread(), 'dbname', None)
             if dbname:
-                registry = openerp.registry(dbname)
+                registry = odoo.registry(dbname)
                 with registry.cursor() as cr:
                     return registry['ir.actions.report.xml']._lookup_report(cr, name[len('report.'):])
 
@@ -63,7 +63,7 @@ class PostgreSQLHandler(logging.Handler):
         dbname = tools.config['log_db'] if tools.config['log_db'] and tools.config['log_db'] != '%d' else ct_db
         if not dbname:
             return
-        with tools.ignore(Exception), tools.mute_logger('openerp.sql_db'), sql_db.db_connect(dbname, allow_uri=True).cursor() as cr:
+        with tools.ignore(Exception), tools.mute_logger('odoo.sql_db'), sql_db.db_connect(dbname, allow_uri=True).cursor() as cr:
             cr.autocommit(True)
             msg = tools.ustr(record.msg)
             if record.args:
@@ -195,20 +195,20 @@ def init_logger():
         _logger.debug('logger level set: "%s"', logconfig_item)
 
 DEFAULT_LOG_CONFIGURATION = [
-    'openerp.workflow.workitem:WARNING',
-    'openerp.http.rpc.request:INFO',
-    'openerp.http.rpc.response:INFO',
-    'openerp.addons.web.http:INFO',
-    'openerp.sql_db:INFO',
+    'odoo.workflow.workitem:WARNING',
+    'odoo.http.rpc.request:INFO',
+    'odoo.http.rpc.response:INFO',
+    'odoo.addons.web.http:INFO',
+    'odoo.sql_db:INFO',
     ':INFO',
 ]
 PSEUDOCONFIG_MAPPER = {
-    'debug_rpc_answer': ['openerp:DEBUG','openerp.http.rpc.request:DEBUG', 'openerp.http.rpc.response:DEBUG'],
-    'debug_rpc': ['openerp:DEBUG','openerp.http.rpc.request:DEBUG'],
-    'debug': ['openerp:DEBUG'],
-    'debug_sql': ['openerp.sql_db:DEBUG'],
+    'debug_rpc_answer': ['odoo:DEBUG','odoo.http.rpc.request:DEBUG', 'odoo.http.rpc.response:DEBUG'],
+    'debug_rpc': ['odoo:DEBUG','odoo.http.rpc.request:DEBUG'],
+    'debug': ['odoo:DEBUG'],
+    'debug_sql': ['odoo.sql_db:DEBUG'],
     'info': [],
-    'warn': ['openerp:WARNING', 'werkzeug:WARNING'],
-    'error': ['openerp:ERROR', 'werkzeug:ERROR'],
-    'critical': ['openerp:CRITICAL', 'werkzeug:CRITICAL'],
+    'warn': ['odoo:WARNING', 'werkzeug:WARNING'],
+    'error': ['odoo:ERROR', 'werkzeug:ERROR'],
+    'critical': ['odoo:CRITICAL', 'werkzeug:CRITICAL'],
 }
diff --git a/odoo/osv/expression.py b/odoo/osv/expression.py
index 1008e4808e76..61c67621dd45 100644
--- a/odoo/osv/expression.py
+++ b/odoo/osv/expression.py
@@ -120,9 +120,9 @@ import traceback
 from functools import partial
 from zlib import crc32
 
-import openerp.modules
+import odoo.modules
 from ..models import MAGIC_COLUMNS, BaseModel
-import openerp.tools as tools
+import odoo.tools as tools
 
 
 # Domain operators.
@@ -427,7 +427,7 @@ def select_distinct_from_where_not_null(cr, select_field, from_table):
     return [r[0] for r in cr.fetchall()]
 
 def get_unaccent_wrapper(cr):
-    if openerp.registry(cr.dbname).has_unaccent:
+    if odoo.registry(cr.dbname).has_unaccent:
         return lambda x: "unaccent(%s)" % (x,)
     return lambda x: x
 
diff --git a/odoo/osv/orm.py b/odoo/osv/orm.py
index 39bd965006bb..2e383ad0d9ee 100644
--- a/odoo/osv/orm.py
+++ b/odoo/osv/orm.py
@@ -11,7 +11,7 @@ from ..models import (
     LOG_ACCESS_COLUMNS,
 )
 
-from openerp.tools.safe_eval import safe_eval
+from odoo.tools.safe_eval import safe_eval
 
 # extra definitions for backward compatibility
 browse_record_list = BaseModel
@@ -128,8 +128,8 @@ def test_modifiers(what, expected):
 
 
 # To use this test:
-# import openerp
-# openerp.osv.orm.modifiers_tests()
+# import odoo
+# odoo.osv.orm.modifiers_tests()
 def modifiers_tests():
     test_modifiers('<field name="a"/>', '{}')
     test_modifiers('<field name="a" invisible="1"/>', '{"invisible": true}')
diff --git a/odoo/osv/query.py b/odoo/osv/query.py
index 5fe53cfdf876..d21b340d26d1 100644
--- a/odoo/osv/query.py
+++ b/odoo/osv/query.py
@@ -65,11 +65,11 @@ class Query(object):
         self.extras = extras or {}
 
     def _get_table_aliases(self):
-        from openerp.osv.expression import get_alias_from_query
+        from odoo.osv.expression import get_alias_from_query
         return [get_alias_from_query(from_statement)[1] for from_statement in self.tables]
 
     def _get_alias_mapping(self):
-        from openerp.osv.expression import get_alias_from_query
+        from odoo.osv.expression import get_alias_from_query
         mapping = {}
         for table in self.tables:
             alias, statement = get_alias_from_query(table)
@@ -108,7 +108,7 @@ class Query(object):
 
             :param extra_params: a list of parameters for the `extra` condition.
         """
-        from openerp.osv.expression import generate_table_alias
+        from odoo.osv.expression import generate_table_alias
         (lhs, table, lhs_col, col, link) = connection
         alias, alias_statement = generate_table_alias(lhs, [(table, link)])
 
@@ -139,7 +139,7 @@ class Query(object):
 
     def get_sql(self):
         """ Returns (query_from, query_where, query_params). """
-        from openerp.osv.expression import get_alias_from_query
+        from odoo.osv.expression import get_alias_from_query
         tables_to_process = list(self.tables)
         alias_mapping = self._get_alias_mapping()
         from_clause = []
diff --git a/odoo/report/__init__.py b/odoo/report/__init__.py
index b8dbb7452088..1000d4991c65 100644
--- a/odoo/report/__init__.py
+++ b/odoo/report/__init__.py
@@ -1,7 +1,7 @@
 # -*- coding: utf-8 -*-
 # Part of Odoo. See LICENSE file for full copyright and licensing details.
 
-from openerp import api
+from odoo import api
 from . import custom
 from . import int_to_text
 from . import interface
diff --git a/odoo/report/custom.py b/odoo/report/custom.py
index 97d2a184cae7..be4b95f93890 100644
--- a/odoo/report/custom.py
+++ b/odoo/report/custom.py
@@ -9,12 +9,12 @@ from lxml import etree
 from pychart import area, arrow, axis, bar_plot, canvas, category_coord, \
                     fill_style, legend, line_plot, line_style, pie_plot, theme
 
-import openerp
-import openerp.tools as tools
-from openerp.exceptions import UserError
-from openerp.models import BaseModel
-from openerp.tools.safe_eval import safe_eval
-from openerp.tools.translate import _
+import odoo
+import odoo.tools as tools
+from odoo.exceptions import UserError
+from odoo.models import BaseModel
+from odoo.tools.safe_eval import safe_eval
+from odoo.tools.translate import _
 from . import common
 from . import misc
 from . import render
@@ -108,7 +108,7 @@ class report_custom(report_int):
         return result 
 
     def create(self, cr, uid, ids, datas, context=None):
-        env = openerp.api.Environment(cr, uid, context or {})
+        env = odoo.api.Environment(cr, uid, context or {})
         report = env['ir.report.custom'].browse([datas['report_id']])
         datas['model'] = report.model_id.model
         if report.menu_id:
@@ -317,7 +317,7 @@ class report_custom(report_int):
         return True
 
     def _create_lines(self, cr, uid, ids, report, fields, results, context):
-        env = openerp.api.Environment(cr, uid, context or {})
+        env = odoo.api.Environment(cr, uid, context or {})
         pdf_string = cStringIO.StringIO()
 
         can = canvas.init(fname=pdf_string, format='pdf')
@@ -413,7 +413,7 @@ class report_custom(report_int):
         return True
 
     def _create_bars(self, cr, uid, ids, report, fields, results, context):
-        env = openerp.api.Environment(cr, uid, context or {})
+        env = odoo.api.Environment(cr, uid, context or {})
         pdf_string = cStringIO.StringIO()
 
         can = canvas.init(fname=pdf_string, format='pdf')
diff --git a/odoo/report/interface.py b/odoo/report/interface.py
index 947ad489af6f..ef0784fb518c 100644
--- a/odoo/report/interface.py
+++ b/odoo/report/interface.py
@@ -7,11 +7,11 @@ import urllib
 
 from lxml import etree
 
-import openerp
-import openerp.tools as tools
+import odoo
+import odoo.tools as tools
 from . import print_xml
 from . import render
-from openerp.modules import get_module_resource
+from odoo.modules import get_module_resource
 
 #
 # coerce any type to a unicode string (to preserve non-ascii characters)
@@ -28,7 +28,7 @@ class report_int(object):
     
     def __init__(self, name, register=True):
         if register:
-            assert openerp.conf.deprecation.allow_report_int_registration
+            assert odoo.conf.deprecation.allow_report_int_registration
             assert name.startswith('report.'), 'Report names should start with "report.".'
             assert name not in self._reports, 'The report "%s" already exists.' % name
             self._reports[name] = self
@@ -73,7 +73,7 @@ class report_rml(report_int):
         }
 
     def create(self, cr, uid, ids, datas, context=None):
-        env = openerp.api.Environment(cr, uid, context or {})
+        env = odoo.api.Environment(cr, uid, context or {})
         xml = self.create_xml(cr, uid, ids, datas, context)
         xml = tools.ustr(xml).encode('utf8')
         report_type = datas.get('report_type', 'pdf')
@@ -124,7 +124,7 @@ class report_rml(report_int):
     def create_rml(self, cr, xml, uid, context=None):
         if self.tmpl=='' and not self.internal_header:
             self.internal_header=True
-        env = openerp.api.Environment(cr, uid, context or {})
+        env = odoo.api.Environment(cr, uid, context or {})
         Translation = env['ir.translation']
 
         # In some case we might not use xsl ...
diff --git a/odoo/report/print_xml.py b/odoo/report/print_xml.py
index a39782f79990..3fe9b959f88a 100644
--- a/odoo/report/print_xml.py
+++ b/odoo/report/print_xml.py
@@ -3,11 +3,11 @@
 
 from lxml import etree
 
-import openerp
-import openerp.tools as tools
+import odoo
+import odoo.tools as tools
 from . import print_fnc
-from openerp.models import BaseModel
-from openerp.tools.safe_eval import safe_eval
+from odoo.models import BaseModel
+from odoo.tools.safe_eval import safe_eval
 
 
 class InheritDict(dict):
@@ -88,7 +88,7 @@ class document(object):
         return safe_eval(expr, {}, {'obj': record})
 
     def parse_node(self, node, parent, browser, datas=None):
-        env = openerp.api.Environment(self.cr, self.uid, {})
+        env = odoo.api.Environment(self.cr, self.uid, {})
         attrs = self.node_attrs_get(node)
         if 'type' in attrs:
             if attrs['type']=='field':
@@ -230,7 +230,7 @@ class document(object):
         return etree.tostring(self.doc,encoding="utf-8",xml_declaration=True,pretty_print=True)
 
     def parse_tree(self, ids, model, context=None):
-        env = openerp.api.Environment(self.cr, self.uid, context or {})
+        env = odoo.api.Environment(self.cr, self.uid, context or {})
         browser = env[model].browse(ids)
         self.parse_node(self.dom, self.doc, browser)
 
diff --git a/odoo/report/printscreen/ps_form.py b/odoo/report/printscreen/ps_form.py
index df9766ba8987..c063d04f3d5a 100644
--- a/odoo/report/printscreen/ps_form.py
+++ b/odoo/report/printscreen/ps_form.py
@@ -6,10 +6,10 @@ import time
 
 from lxml import etree
 
-import openerp
-import openerp.tools as tools
-from openerp.report import render
-from openerp.report.interface import report_int
+import odoo
+import odoo.tools as tools
+from odoo.report import render
+from odoo.report.interface import report_int
 
 
 class report_printscreen_list(report_int):
@@ -34,7 +34,7 @@ class report_printscreen_list(report_int):
     def create(self, cr, uid, ids, datas, context=None):
         if not context:
             context={}
-        env = openerp.api.Environment(cr, uid, context)
+        env = odoo.api.Environment(cr, uid, context)
         datas['ids'] = ids
         records = env[datas['model']].browse(ids)
         # title come from description of model which are specified in py file.
diff --git a/odoo/report/printscreen/ps_list.py b/odoo/report/printscreen/ps_list.py
index 78de721cb6ce..23e6c09466d7 100644
--- a/odoo/report/printscreen/ps_list.py
+++ b/odoo/report/printscreen/ps_list.py
@@ -8,11 +8,11 @@ from datetime import datetime
 
 from lxml  import etree
 
-import openerp
-import openerp.tools as tools
-from openerp.report import render, report_sxw
-from openerp.report.interface import report_int
-from openerp.tools.safe_eval import safe_eval
+import odoo
+import odoo.tools as tools
+from odoo.report import render, report_sxw
+from odoo.report.interface import report_int
+from odoo.tools.safe_eval import safe_eval
 
 
 class report_printscreen_list(report_int):
@@ -49,7 +49,7 @@ class report_printscreen_list(report_int):
         self.context = context
         self.groupby = context.get('group_by',[])
         self.groupby_no_leaf = context.get('group_by_no_leaf', False)
-        env = openerp.api.Environment(cr, uid, context)
+        env = odoo.api.Environment(cr, uid, context)
         Model = env[datas['model']]
         model = env['ir.model'].search([('model', '=', Model._name)])
         model_desc = model.name or Model._description
@@ -113,7 +113,7 @@ class report_printscreen_list(report_int):
         _append_node('PageHeight', '%.2f' %(pageSize[1] * 2.8346,))
         _append_node('report-header', title)
 
-        env = openerp.api.Environment(self.cr, uid, {})
+        env = odoo.api.Environment(self.cr, uid, {})
         Users = env['res.users']
         _append_node('company', Users.browse(uid).company_id.name)
         rml_obj = report_sxw.rml_parse(self.cr, uid, Users._name, context)
diff --git a/odoo/report/render/html2html/html2html.py b/odoo/report/render/html2html/html2html.py
index b66d44a5a5f6..bb6ea8bae0d9 100644
--- a/odoo/report/render/html2html/html2html.py
+++ b/odoo/report/render/html2html/html2html.py
@@ -8,7 +8,7 @@ import re
 
 from reportlab.lib.utils import ImageReader
 
-from openerp.report.render.rml2pdf import utils
+from odoo.report.render.rml2pdf import utils
 
 _regex = re.compile('\[\[(.+?)\]\]')
 utils._regex = re.compile('\[\[\s*(.+?)\s*\]\]',re.DOTALL)
diff --git a/odoo/report/render/odt2odt/odt2odt.py b/odoo/report/render/odt2odt/odt2odt.py
index 350e3565c6c2..8eea37b8fb48 100644
--- a/odoo/report/render/odt2odt/odt2odt.py
+++ b/odoo/report/render/odt2odt/odt2odt.py
@@ -3,7 +3,7 @@
 
 import copy
 
-from openerp.report.render.rml2pdf import utils
+from odoo.report.render.rml2pdf import utils
 
 class odt2odt(object):
     def __init__(self, odt, localcontext):
diff --git a/odoo/report/render/rml2html/rml2html.py b/odoo/report/render/rml2html/rml2html.py
index cdcecb453997..bdf04f7d6c5f 100644
--- a/odoo/report/render/rml2html/rml2html.py
+++ b/odoo/report/render/rml2html/rml2html.py
@@ -7,7 +7,7 @@ import sys
 
 from lxml import etree
 
-from openerp.report.render.rml2pdf import utils
+from odoo.report.render.rml2pdf import utils
 
 class _flowable(object):
     def __init__(self, template, doc, localcontext = None):
diff --git a/odoo/report/render/rml2pdf/trml2pdf.py b/odoo/report/render/rml2pdf/trml2pdf.py
index 9690ecb5e70a..22eac51cfab4 100644
--- a/odoo/report/render/rml2pdf/trml2pdf.py
+++ b/odoo/report/render/rml2pdf/trml2pdf.py
@@ -24,8 +24,8 @@ from reportlab.pdfgen import canvas
 from reportlab.platypus.doctemplate import ActionFlowable
 from lxml import etree
 
-from openerp.tools.misc import file_open
-from openerp.tools.safe_eval import safe_eval
+from odoo.tools.misc import file_open
+from odoo.tools.safe_eval import safe_eval
 from . import color
 from . import utils
 
diff --git a/odoo/report/render/rml2pdf/utils.py b/odoo/report/render/rml2pdf/utils.py
index a213befa1eef..0a9a6bd44bff 100644
--- a/odoo/report/render/rml2pdf/utils.py
+++ b/odoo/report/render/rml2pdf/utils.py
@@ -8,9 +8,9 @@ import re
 
 import reportlab
 
-import openerp.tools as tools
-from openerp.tools.safe_eval import safe_eval
-from openerp.tools.misc import ustr
+import odoo.tools as tools
+from odoo.tools.safe_eval import safe_eval
+from odoo.tools.misc import ustr
 
 _logger = logging.getLogger(__name__)
 
diff --git a/odoo/report/render/rml2txt/utils.py b/odoo/report/render/rml2txt/utils.py
index 17952e6356af..d86380ccfbb0 100644
--- a/odoo/report/render/rml2txt/utils.py
+++ b/odoo/report/render/rml2txt/utils.py
@@ -7,7 +7,7 @@ import re
 import reportlab
 import reportlab.lib.units
 
-from openerp.tools.safe_eval import safe_eval
+from odoo.tools.safe_eval import safe_eval
 
 _regex = re.compile('\[\[(.+?)\]\]')
 
diff --git a/odoo/report/report_sxw.py b/odoo/report/report_sxw.py
index 552e74375189..e54ecad953ed 100644
--- a/odoo/report/report_sxw.py
+++ b/odoo/report/report_sxw.py
@@ -13,16 +13,16 @@ from datetime import datetime
 
 from lxml import etree
 
-import openerp
-import openerp.tools as tools
+import odoo
+import odoo.tools as tools
 from . import common
 from . import preprocess
 from .interface import report_rml
-from openerp import fields
-from openerp.exceptions import AccessError
-from openerp.tools import DEFAULT_SERVER_DATE_FORMAT, DEFAULT_SERVER_DATETIME_FORMAT
-from openerp.tools.safe_eval import safe_eval
-from openerp.tools.translate import _
+from odoo import fields
+from odoo.exceptions import AccessError
+from odoo.tools import DEFAULT_SERVER_DATE_FORMAT, DEFAULT_SERVER_DATETIME_FORMAT
+from odoo.tools.safe_eval import safe_eval
+from odoo.tools.translate import _
 
 
 _logger = logging.getLogger(__name__)
@@ -64,7 +64,7 @@ class rml_parse(object):
             context = {}
         self.cr = cr
         self.uid = uid
-        env = openerp.api.Environment(cr, uid, context)
+        env = odoo.api.Environment(cr, uid, context)
         user = env['res.users'].browse(uid)
         self.localcontext = {
             'user': user,
@@ -131,7 +131,7 @@ class rml_parse(object):
         if not model:
             model = 'ir.attachment'
         try:
-            env = openerp.api.Environment(self.cr, self.uid, {})
+            env = odoo.api.Environment(self.cr, self.uid, {})
             res = env[model].browse(int(id)).read()[0]
             if field:
                 return res[field]
@@ -150,7 +150,7 @@ class rml_parse(object):
         self.objects = self.objects.with_env(env)
 
     def _get_lang_dict(self):
-        env = openerp.api.Environment(self.cr, self.uid, {})
+        env = odoo.api.Environment(self.cr, self.uid, {})
         Lang = env['res.lang']
         lang = self.localcontext.get('lang', 'en_US') or 'en_US'
         lang_obj = Lang.search([('code', '=', lang)], limit=1) or \
@@ -168,7 +168,7 @@ class rml_parse(object):
     def get_digits(self, obj=None, f=None, dp=None):
         d = DEFAULT_DIGITS = 2
         if dp:
-            env = openerp.api.Environment(self.cr, self.uid, {})
+            env = odoo.api.Environment(self.cr, self.uid, {})
             d = env['decimal.precision'].precision_get(dp)
         elif obj and f:
             res_digits = getattr(obj._fields[f], 'digits', lambda x: ((16, DEFAULT_DIGITS)))
@@ -245,7 +245,7 @@ class rml_parse(object):
     def _translate(self,text):
         lang = self.localcontext['lang']
         if lang and text and not text.isspace():
-            env = openerp.api.Environment(self.cr, self.uid, {})
+            env = odoo.api.Environment(self.cr, self.uid, {})
             Translation = env['ir.translation']
             piece_list = self._transl_regex.split(text)
             for pn in range(len(piece_list)):
@@ -303,8 +303,8 @@ class rml_parse(object):
 class report_sxw(report_rml, preprocess.report):
     """
     The register=True kwarg has been added to help remove the
-    openerp.netsvc.LocalService() indirection and the related
-    openerp.report.interface.report_int._reports dictionary:
+    odoo.netsvc.LocalService() indirection and the related
+    odoo.report.interface.report_int._reports dictionary:
     report_sxw registered in XML with auto=False are also registered in Python.
     In that case, they are registered in the above dictionary. Since
     registration is automatically done upon instanciation, and that
@@ -323,7 +323,7 @@ class report_sxw(report_rml, preprocess.report):
             self.internal_header=True
 
     def getObjects(self, cr, uid, ids, context):
-        env = openerp.api.Environment(cr, uid, context or {})
+        env = odoo.api.Environment(cr, uid, context or {})
         return env[self.table].browse(ids)
 
     def create(self, cr, uid, ids, data, context=None):
@@ -332,7 +332,7 @@ class report_sxw(report_rml, preprocess.report):
             context.update(internal_header=self.internal_header)
 
         context.update(bin_raw=True)
-        env = openerp.api.Environment(cr, uid, context)
+        env = odoo.api.Environment(cr, uid, context)
         env['res.font'].sudo().font_scan(lazy=True)
         ir_obj = env['ir.actions.report.xml']
 
@@ -385,7 +385,7 @@ class report_sxw(report_rml, preprocess.report):
     def create_source_pdf(self, cr, uid, ids, data, report_xml, context=None):
         if not context:
             context = {}
-        env = openerp.api.Environment(cr, uid, context)
+        env = odoo.api.Environment(cr, uid, context)
         attach = report_xml.attachment
         if attach:
             objs = self.getObjects(cr, uid, ids, context)
diff --git a/odoo/service/common.py b/odoo/service/common.py
index 8d7b5a505c5e..e79adcc2528a 100644
--- a/odoo/service/common.py
+++ b/odoo/service/common.py
@@ -2,18 +2,18 @@
 
 import logging
 
-import openerp.release
-import openerp.tools
-from openerp.tools.translate import _
+import odoo.release
+import odoo.tools
+from odoo.tools.translate import _
 
 import security
 
 _logger = logging.getLogger(__name__)
 
 RPC_VERSION_1 = {
-        'server_version': openerp.release.version,
-        'server_version_info': openerp.release.version_info,
-        'server_serie': openerp.release.serie,
+        'server_version': odoo.release.version,
+        'server_version_info': odoo.release.version_info,
+        'server_serie': odoo.release.serie,
         'protocol_version': 1,
 }
 
@@ -26,7 +26,7 @@ def exp_login(db, login, password):
     return res or False
 
 def exp_authenticate(db, login, password, user_agent_env):
-    res_users = openerp.registry(db)['res.users']
+    res_users = odoo.registry(db)['res.users']
     return res_users.authenticate(db, login, password, user_agent_env)
 
 def exp_version():
@@ -42,12 +42,12 @@ def exp_about(extended=False):
     info = _('See http://openerp.com')
 
     if extended:
-        return info, openerp.release.version
+        return info, odoo.release.version
     return info
 
 def exp_set_loglevel(loglevel, logger=None):
     # TODO Previously, the level was set on the now deprecated
-    # `openerp.netsvc.Logger` class.
+    # `odoo.netsvc.Logger` class.
     return True
 
 def dispatch(method, params):
diff --git a/odoo/service/db.py b/odoo/service/db.py
index 5c1cc8021252..b2944e958bca 100644
--- a/odoo/service/db.py
+++ b/odoo/service/db.py
@@ -15,12 +15,12 @@ from contextlib import closing
 
 import psycopg2
 
-import openerp
-from openerp import SUPERUSER_ID
-from openerp.exceptions import UserError
-import openerp.release
-import openerp.sql_db
-import openerp.tools
+import odoo
+from odoo import SUPERUSER_ID
+from odoo.exceptions import UserError
+import odoo.release
+import odoo.sql_db
+import odoo.tools
 
 _logger = logging.getLogger(__name__)
 
@@ -32,24 +32,24 @@ class DatabaseExists(Warning):
 #----------------------------------------------------------
 
 def check_super(passwd):
-    if passwd and passwd == openerp.tools.config['admin_passwd']:
+    if passwd and passwd == odoo.tools.config['admin_passwd']:
         return True
-    raise openerp.exceptions.AccessDenied()
+    raise odoo.exceptions.AccessDenied()
 
-# This should be moved to openerp.modules.db, along side initialize().
+# This should be moved to odoo.modules.db, along side initialize().
 def _initialize_db(id, db_name, demo, lang, user_password, login='admin', country_code=None):
     try:
-        db = openerp.sql_db.db_connect(db_name)
+        db = odoo.sql_db.db_connect(db_name)
         with closing(db.cursor()) as cr:
             # TODO this should be removed as it is done by Registry.new().
-            openerp.modules.db.initialize(cr)
-            openerp.tools.config['load_language'] = lang
+            odoo.modules.db.initialize(cr)
+            odoo.tools.config['load_language'] = lang
             cr.commit()
 
-        registry = openerp.modules.registry.Registry.new(db_name, demo, None, update_module=True)
+        registry = odoo.modules.registry.Registry.new(db_name, demo, None, update_module=True)
 
         with closing(db.cursor()) as cr:
-            env = openerp.api.Environment(cr, SUPERUSER_ID, {})
+            env = odoo.api.Environment(cr, SUPERUSER_ID, {})
 
             if lang:
                 modules = env['ir.module.module'].search([('state', '=', 'installed')])
@@ -64,7 +64,7 @@ def _initialize_db(id, db_name, demo, lang, user_password, login='admin', countr
             values = {'password': user_password, 'lang': lang}
             if login:
                 values['login'] = login
-                emails = openerp.tools.email_split(login)
+                emails = odoo.tools.email_split(login)
                 if emails:
                     values['email'] = emails[0]
             env.user.write(values)
@@ -75,9 +75,9 @@ def _initialize_db(id, db_name, demo, lang, user_password, login='admin', countr
         _logger.exception('CREATE DATABASE failed:')
 
 def _create_empty_database(name):
-    db = openerp.sql_db.db_connect('postgres')
+    db = odoo.sql_db.db_connect('postgres')
     with closing(db.cursor()) as cr:
-        chosen_template = openerp.tools.config['db_template']
+        chosen_template = odoo.tools.config['db_template']
         cr.execute("SELECT datname FROM pg_database WHERE datname = %s",
                    (name,))
         if cr.fetchall():
@@ -95,21 +95,21 @@ def exp_create_database(db_name, demo, lang, user_password='admin', login='admin
 
 def exp_duplicate_database(db_original_name, db_name):
     _logger.info('Duplicate database `%s` to `%s`.', db_original_name, db_name)
-    openerp.sql_db.close_db(db_original_name)
-    db = openerp.sql_db.db_connect('postgres')
+    odoo.sql_db.close_db(db_original_name)
+    db = odoo.sql_db.db_connect('postgres')
     with closing(db.cursor()) as cr:
         cr.autocommit(True)     # avoid transaction block
         _drop_conn(cr, db_original_name)
         cr.execute("""CREATE DATABASE "%s" ENCODING 'unicode' TEMPLATE "%s" """ % (db_name, db_original_name))
 
-    registry = openerp.modules.registry.Registry.new(db_name)
+    registry = odoo.modules.registry.Registry.new(db_name)
     with registry.cursor() as cr:
         # if it's a copy of a database, force generation of a new dbuuid
-        env = openerp.api.Environment(cr, SUPERUSER_ID, {})
+        env = odoo.api.Environment(cr, SUPERUSER_ID, {})
         env['ir.config_parameter'].init(force=True)
 
-    from_fs = openerp.tools.config.filestore(db_original_name)
-    to_fs = openerp.tools.config.filestore(db_name)
+    from_fs = odoo.tools.config.filestore(db_original_name)
+    to_fs = odoo.tools.config.filestore(db_name)
     if os.path.exists(from_fs) and not os.path.exists(to_fs):
         shutil.copytree(from_fs, to_fs)
     return True
@@ -133,10 +133,10 @@ def _drop_conn(cr, db_name):
 def exp_drop(db_name):
     if db_name not in list_dbs(True):
         return False
-    openerp.modules.registry.Registry.delete(db_name)
-    openerp.sql_db.close_db(db_name)
+    odoo.modules.registry.Registry.delete(db_name)
+    odoo.sql_db.close_db(db_name)
 
-    db = openerp.sql_db.db_connect('postgres')
+    db = odoo.sql_db.db_connect('postgres')
     with closing(db.cursor()) as cr:
         cr.autocommit(True) # avoid transaction block
         _drop_conn(cr, db_name)
@@ -149,7 +149,7 @@ def exp_drop(db_name):
         else:
             _logger.info('DROP DB: %s', db_name)
 
-    fs = openerp.tools.config.filestore(db_name)
+    fs = odoo.tools.config.filestore(db_name)
     if os.path.exists(fs):
         shutil.rmtree(fs)
     return True
@@ -167,9 +167,9 @@ def dump_db_manifest(cr):
     manifest = {
         'odoo_dump': '1',
         'db_name': cr.dbname,
-        'version': openerp.release.version,
-        'version_info': openerp.release.version_info,
-        'major_version': openerp.release.major_version,
+        'version': odoo.release.version,
+        'version_info': odoo.release.version_info,
+        'major_version': odoo.release.major_version,
         'pg_version': pg_version,
         'modules': modules,
     }
@@ -185,26 +185,26 @@ def dump_db(db_name, stream, backup_format='zip'):
     cmd.append(db_name)
 
     if backup_format == 'zip':
-        with openerp.tools.osutil.tempdir() as dump_dir:
-            filestore = openerp.tools.config.filestore(db_name)
+        with odoo.tools.osutil.tempdir() as dump_dir:
+            filestore = odoo.tools.config.filestore(db_name)
             if os.path.exists(filestore):
                 shutil.copytree(filestore, os.path.join(dump_dir, 'filestore'))
             with open(os.path.join(dump_dir, 'manifest.json'), 'w') as fh:
-                db = openerp.sql_db.db_connect(db_name)
+                db = odoo.sql_db.db_connect(db_name)
                 with db.cursor() as cr:
                     json.dump(dump_db_manifest(cr), fh, indent=4)
             cmd.insert(-1, '--file=' + os.path.join(dump_dir, 'dump.sql'))
-            openerp.tools.exec_pg_command(*cmd)
+            odoo.tools.exec_pg_command(*cmd)
             if stream:
-                openerp.tools.osutil.zip_dir(dump_dir, stream, include_dir=False, fnct_sort=lambda file_name: file_name != 'dump.sql')
+                odoo.tools.osutil.zip_dir(dump_dir, stream, include_dir=False, fnct_sort=lambda file_name: file_name != 'dump.sql')
             else:
                 t=tempfile.TemporaryFile()
-                openerp.tools.osutil.zip_dir(dump_dir, t, include_dir=False, fnct_sort=lambda file_name: file_name != 'dump.sql')
+                odoo.tools.osutil.zip_dir(dump_dir, t, include_dir=False, fnct_sort=lambda file_name: file_name != 'dump.sql')
                 t.seek(0)
                 return t
     else:
         cmd.insert(-1, '--format=c')
-        stdin, stdout = openerp.tools.exec_pg_command_pipe(*cmd)
+        stdin, stdout = odoo.tools.exec_pg_command_pipe(*cmd)
         if stream:
             shutil.copyfileobj(stdout, stream)
         else:
@@ -229,7 +229,7 @@ def restore_db(db, dump_file, copy=False):
     _create_empty_database(db)
 
     filestore_path = None
-    with openerp.tools.osutil.tempdir() as dump_dir:
+    with odoo.tools.osutil.tempdir() as dump_dir:
         if zipfile.is_zipfile(dump_file):
             # v8 format
             with zipfile.ZipFile(dump_file, 'r') as z:
@@ -252,12 +252,12 @@ def restore_db(db, dump_file, copy=False):
         args.append('--dbname=' + db)
         pg_args = args + pg_args
 
-        if openerp.tools.exec_pg_command(pg_cmd, *pg_args):
+        if odoo.tools.exec_pg_command(pg_cmd, *pg_args):
             raise Exception("Couldn't restore database")
 
-        registry = openerp.modules.registry.Registry.new(db)
+        registry = odoo.modules.registry.Registry.new(db)
         with registry.cursor() as cr:
-            env = openerp.api.Environment(cr, SUPERUSER_ID, {})
+            env = odoo.api.Environment(cr, SUPERUSER_ID, {})
             if copy:
                 # if it's a copy of a database, force generation of a new dbuuid
                 env['ir.config_parameter'].init(force=True)
@@ -265,7 +265,7 @@ def restore_db(db, dump_file, copy=False):
                 filestore_dest = env['ir.attachment']._filestore()
                 shutil.move(filestore_path, filestore_dest)
 
-            if openerp.tools.config['unaccent']:
+            if odoo.tools.config['unaccent']:
                 try:
                     with cr.savepoint():
                         cr.execute("CREATE EXTENSION unaccent")
@@ -275,10 +275,10 @@ def restore_db(db, dump_file, copy=False):
     _logger.info('RESTORE DB: %s', db)
 
 def exp_rename(old_name, new_name):
-    openerp.modules.registry.Registry.delete(old_name)
-    openerp.sql_db.close_db(old_name)
+    odoo.modules.registry.Registry.delete(old_name)
+    odoo.sql_db.close_db(old_name)
 
-    db = openerp.sql_db.db_connect('postgres')
+    db = odoo.sql_db.db_connect('postgres')
     with closing(db.cursor()) as cr:
         cr.autocommit(True)     # avoid transaction block
         _drop_conn(cr, old_name)
@@ -289,70 +289,70 @@ def exp_rename(old_name, new_name):
             _logger.info('RENAME DB: %s -> %s failed:\n%s', old_name, new_name, e)
             raise Exception("Couldn't rename database %s to %s: %s" % (old_name, new_name, e))
 
-    old_fs = openerp.tools.config.filestore(old_name)
-    new_fs = openerp.tools.config.filestore(new_name)
+    old_fs = odoo.tools.config.filestore(old_name)
+    new_fs = odoo.tools.config.filestore(new_name)
     if os.path.exists(old_fs) and not os.path.exists(new_fs):
         shutil.move(old_fs, new_fs)
     return True
 
 def exp_change_admin_password(new_password):
-    openerp.tools.config['admin_passwd'] = new_password
-    openerp.tools.config.save()
+    odoo.tools.config['admin_passwd'] = new_password
+    odoo.tools.config.save()
     return True
 
 def exp_migrate_databases(databases):
     for db in databases:
         _logger.info('migrate database %s', db)
-        openerp.tools.config['update']['base'] = True
-        openerp.modules.registry.Registry.new(db, force_demo=False, update_module=True)
+        odoo.tools.config['update']['base'] = True
+        odoo.modules.registry.Registry.new(db, force_demo=False, update_module=True)
     return True
 
 #----------------------------------------------------------
 # No master password required
 #----------------------------------------------------------
 
-@openerp.tools.mute_logger('openerp.sql_db')
+@odoo.tools.mute_logger('odoo.sql_db')
 def exp_db_exist(db_name):
     ## Not True: in fact, check if connection to database is possible. The database may exists
-    return bool(openerp.sql_db.db_connect(db_name))
+    return bool(odoo.sql_db.db_connect(db_name))
 
 def list_dbs(force=False):
-    if not openerp.tools.config['list_db'] and not force:
-        raise openerp.exceptions.AccessDenied()
-    chosen_template = openerp.tools.config['db_template']
+    if not odoo.tools.config['list_db'] and not force:
+        raise odoo.exceptions.AccessDenied()
+    chosen_template = odoo.tools.config['db_template']
     templates_list = tuple(set(['postgres', chosen_template]))
-    db = openerp.sql_db.db_connect('postgres')
+    db = odoo.sql_db.db_connect('postgres')
     with closing(db.cursor()) as cr:
         try:
-            db_user = openerp.tools.config["db_user"]
+            db_user = odoo.tools.config["db_user"]
             if not db_user and os.name == 'posix':
                 import pwd
                 db_user = pwd.getpwuid(os.getuid())[0]
             if not db_user:
-                cr.execute("select usename from pg_user where usesysid=(select datdba from pg_database where datname=%s)", (openerp.tools.config["db_name"],))
+                cr.execute("select usename from pg_user where usesysid=(select datdba from pg_database where datname=%s)", (odoo.tools.config["db_name"],))
                 res = cr.fetchone()
                 db_user = res and str(res[0])
             if db_user:
                 cr.execute("select datname from pg_database where datdba=(select usesysid from pg_user where usename=%s) and not datistemplate and datallowconn and datname not in %s order by datname", (db_user, templates_list))
             else:
                 cr.execute("select datname from pg_database where not datistemplate and datallowconn and datname not in %s order by datname", (templates_list,))
-            res = [openerp.tools.ustr(name) for (name,) in cr.fetchall()]
+            res = [odoo.tools.ustr(name) for (name,) in cr.fetchall()]
         except Exception:
             res = []
     res.sort()
     return res
 
 def exp_list(document=False):
-    if not openerp.tools.config['list_db']:
-        raise openerp.exceptions.AccessDenied()
+    if not odoo.tools.config['list_db']:
+        raise odoo.exceptions.AccessDenied()
     return list_dbs()
 
 def exp_list_lang():
-    return openerp.tools.scan_languages()
+    return odoo.tools.scan_languages()
 
 def exp_list_countries():
     list_countries = []
-    root = ET.parse(os.path.join(openerp.tools.config['root_path'], 'addons/base/res/res_country_data.xml')).getroot()
+    root = ET.parse(os.path.join(odoo.tools.config['root_path'], 'addons/base/res/res_country_data.xml')).getroot()
     for country in root.find('data').findall('record[@model="res.country"]'):
         name = country.find('field[@name="name"]').text
         code = country.find('field[@name="code"]').text
@@ -363,7 +363,7 @@ def exp_server_version():
     """ Return the version of the server
         Used by the client to verify the compatibility with its own version
     """
-    return openerp.release.version
+    return odoo.release.version
 
 #----------------------------------------------------------
 # db service dispatch
diff --git a/odoo/service/model.py b/odoo/service/model.py
index 0fdd8eb117e3..1db02c3c09d9 100644
--- a/odoo/service/model.py
+++ b/odoo/service/model.py
@@ -7,11 +7,11 @@ import random
 import threading
 import time
 
-import openerp
-from openerp.exceptions import UserError, ValidationError, QWebException
-from openerp.models import check_method_name
-from openerp.tools.translate import translate
-from openerp.tools.translate import _
+import odoo
+from odoo.exceptions import UserError, ValidationError, QWebException
+from odoo.models import check_method_name
+from odoo.tools.translate import translate
+from odoo.tools.translate import _
 
 import security
 
@@ -24,7 +24,7 @@ def dispatch(method, params):
     (db, uid, passwd ) = params[0:3]
 
     # set uid tracker - cleaned up at the WSGI
-    # dispatching phase in openerp.service.wsgi_server.application
+    # dispatching phase in odoo.service.wsgi_server.application
     threading.current_thread().uid = uid
 
     params = params[3:]
@@ -33,7 +33,7 @@ def dispatch(method, params):
     if method not in ['execute', 'execute_kw', 'exec_workflow']:
         raise NameError("Method not available %s" % method)
     security.check(db,uid,passwd)
-    registry = openerp.registry(db).check_signaling()
+    registry = odoo.registry(db).check_signaling()
     fn = globals()[method]
     res = fn(db, uid, *params)
     registry.signal_caches_change()
@@ -87,7 +87,7 @@ def check(f):
                             ids = args[3]
                         else:
                             ids = []
-                    cr = openerp.sql_db.db_connect(dbname).cursor()
+                    cr = odoo.sql_db.db_connect(dbname).cursor()
                     return src(obj, cr, uid, ids, context=(ctx or {}))
                 except Exception:
                     pass
@@ -98,7 +98,7 @@ def check(f):
                              # be returned, it is the best we have.
 
             try:
-                cr = openerp.sql_db.db_connect(dbname).cursor()
+                cr = odoo.sql_db.db_connect(dbname).cursor()
                 res = translate(cr, name=False, source_type=ttype,
                                 lang=lang, source=src)
                 if res:
@@ -114,8 +114,8 @@ def check(f):
         tries = 0
         while True:
             try:
-                if openerp.registry(dbname)._init and not openerp.tools.config['test_enable']:
-                    raise openerp.exceptions.Warning('Currently, this database is not fully loaded and can not be used.')
+                if odoo.registry(dbname)._init and not odoo.tools.config['test_enable']:
+                    raise odoo.exceptions.Warning('Currently, this database is not fully loaded and can not be used.')
                 return f(dbname, *args, **kwargs)
             except (OperationalError, QWebException) as e:
                 if isinstance(e, QWebException):
@@ -135,7 +135,7 @@ def check(f):
                 _logger.info("%s, retry %d/%d in %.04f sec..." % (errorcodes.lookup(e.pgcode), tries, MAX_TRIES_ON_CONCURRENCY_FAILURE, wait_time))
                 time.sleep(wait_time)
             except IntegrityError, inst:
-                registry = openerp.registry(dbname)
+                registry = odoo.registry(dbname)
                 for key in registry._sql_error.keys():
                     if key in inst[0]:
                         raise ValidationError(tr(registry._sql_error[key], 'sql_constraint') or inst[0])
@@ -165,10 +165,10 @@ def check(f):
     return wrapper
 
 def execute_cr(cr, uid, obj, method, *args, **kw):
-    recs = openerp.api.Environment(cr, uid, {}).get(obj)
+    recs = odoo.api.Environment(cr, uid, {}).get(obj)
     if recs is None:
         raise UserError(_("Object %s doesn't exist") % obj)
-    return openerp.api.call_kw(recs, method, args, kw)
+    return odoo.api.call_kw(recs, method, args, kw)
 
 
 def execute_kw(db, uid, obj, method, args, kw=None):
@@ -177,7 +177,7 @@ def execute_kw(db, uid, obj, method, args, kw=None):
 @check
 def execute(db, uid, obj, method, *args, **kw):
     threading.currentThread().dbname = db
-    with openerp.registry(db).cursor() as cr:
+    with odoo.registry(db).cursor() as cr:
         check_method_name(method)
         res = execute_cr(cr, uid, obj, method, *args, **kw)
         if res is None:
@@ -191,5 +191,5 @@ def exec_workflow_cr(cr, uid, obj, signal, *args):
 
 @check
 def exec_workflow(db, uid, obj, signal, *args):
-    with openerp.registry(db).cursor() as cr:
+    with odoo.registry(db).cursor() as cr:
         return exec_workflow_cr(cr, uid, obj, signal, *args)
diff --git a/odoo/service/report.py b/odoo/service/report.py
index 4674843760b6..011fb19ca63f 100644
--- a/odoo/service/report.py
+++ b/odoo/service/report.py
@@ -5,10 +5,10 @@ import logging
 import sys
 import threading
 
-import openerp
-import openerp.report
-from openerp import tools
-from openerp.exceptions import UserError
+import odoo
+import odoo.report
+from odoo import tools
+from odoo.exceptions import UserError
 
 import security
 
@@ -30,7 +30,7 @@ def dispatch(method, params):
     if method not in ['report', 'report_get', 'render_report']:
         raise KeyError("Method not supported %s" % method)
     security.check(db,uid,passwd)
-    registry = openerp.registry(db).check_signaling()
+    registry = odoo.registry(db).check_signaling()
     fn = globals()['exp_' + method]
     res = fn(db, uid, *params)
     registry.signal_caches_change()
@@ -50,12 +50,12 @@ def exp_render_report(db, uid, object, ids, datas=None, context=None):
 
     self_reports[id] = {'uid': uid, 'result': False, 'state': False, 'exception': None}
 
-    cr = openerp.registry(db).cursor()
+    cr = odoo.registry(db).cursor()
     try:
-        result, format = openerp.report.render_report(cr, uid, ids, object, datas, context)
+        result, format = odoo.report.render_report(cr, uid, ids, object, datas, context)
         if not result:
             tb = sys.exc_info()
-            self_reports[id]['exception'] = openerp.exceptions.DeferredException('RML is not available at specified location or not enough data to print!', tb)
+            self_reports[id]['exception'] = odoo.exceptions.DeferredException('RML is not available at specified location or not enough data to print!', tb)
         self_reports[id]['result'] = result
         self_reports[id]['format'] = format
         self_reports[id]['state'] = True
@@ -63,10 +63,10 @@ def exp_render_report(db, uid, object, ids, datas=None, context=None):
 
         _logger.exception('Exception: %s\n', exception)
         if hasattr(exception, 'name') and hasattr(exception, 'value'):
-            self_reports[id]['exception'] = openerp.exceptions.DeferredException(tools.ustr(exception.name), tools.ustr(exception.value))
+            self_reports[id]['exception'] = odoo.exceptions.DeferredException(tools.ustr(exception.name), tools.ustr(exception.value))
         else:
             tb = sys.exc_info()
-            self_reports[id]['exception'] = openerp.exceptions.DeferredException(tools.exception_to_unicode(exception), tb)
+            self_reports[id]['exception'] = odoo.exceptions.DeferredException(tools.exception_to_unicode(exception), tb)
         self_reports[id]['state'] = True
     cr.commit()
     cr.close()
@@ -88,23 +88,23 @@ def exp_report(db, uid, object, ids, datas=None, context=None):
     self_reports[id] = {'uid': uid, 'result': False, 'state': False, 'exception': None}
 
     def go(id, uid, ids, datas, context):
-        with openerp.api.Environment.manage():
-            cr = openerp.registry(db).cursor()
+        with odoo.api.Environment.manage():
+            cr = odoo.registry(db).cursor()
             try:
-                result, format = openerp.report.render_report(cr, uid, ids, object, datas, context)
+                result, format = odoo.report.render_report(cr, uid, ids, object, datas, context)
                 if not result:
                     tb = sys.exc_info()
-                    self_reports[id]['exception'] = openerp.exceptions.DeferredException('RML is not available at specified location or not enough data to print!', tb)
+                    self_reports[id]['exception'] = odoo.exceptions.DeferredException('RML is not available at specified location or not enough data to print!', tb)
                 self_reports[id]['result'] = result
                 self_reports[id]['format'] = format
                 self_reports[id]['state'] = True
             except Exception, exception:
                 _logger.exception('Exception: %s\n', exception)
                 if hasattr(exception, 'name') and hasattr(exception, 'value'):
-                    self_reports[id]['exception'] = openerp.exceptions.DeferredException(tools.ustr(exception.name), tools.ustr(exception.value))
+                    self_reports[id]['exception'] = odoo.exceptions.DeferredException(tools.ustr(exception.name), tools.ustr(exception.value))
                 else:
                     tb = sys.exc_info()
-                    self_reports[id]['exception'] = openerp.exceptions.DeferredException(tools.exception_to_unicode(exception), tb)
+                    self_reports[id]['exception'] = odoo.exceptions.DeferredException(tools.exception_to_unicode(exception), tb)
                 self_reports[id]['state'] = True
             cr.commit()
             cr.close()
diff --git a/odoo/service/security.py b/odoo/service/security.py
index 8ab38d3d6590..264e88d42bd8 100644
--- a/odoo/service/security.py
+++ b/odoo/service/security.py
@@ -1,13 +1,13 @@
 # -*- coding: utf-8 -*-
 # Part of Odoo. See LICENSE file for full copyright and licensing details.
 
-import openerp
-import openerp.exceptions
+import odoo
+import odoo.exceptions
 
 def login(db, login, password):
-    res_users = openerp.registry(db)['res.users']
+    res_users = odoo.registry(db)['res.users']
     return res_users._login(db, login, password)
 
 def check(db, uid, passwd):
-    res_users = openerp.registry(db)['res.users']
+    res_users = odoo.registry(db)['res.users']
     return res_users.check(db, uid, passwd)
diff --git a/odoo/service/server.py b/odoo/service/server.py
index 7355f4565477..6d6c585212d9 100644
--- a/odoo/service/server.py
+++ b/odoo/service/server.py
@@ -35,11 +35,11 @@ try:
 except ImportError:
     setproctitle = lambda x: None
 
-import openerp
-from openerp.modules.registry import Registry
-from openerp.release import nt_service_name
-import openerp.tools.config as config
-from openerp.tools import stripped_sys_argv, dumpstacks, log_ormcache_stats
+import odoo
+from odoo.modules.registry import Registry
+from odoo.release import nt_service_name
+import odoo.tools.config as config
+from odoo.tools import stripped_sys_argv, dumpstacks, log_ormcache_stats
 
 _logger = logging.getLogger(__name__)
 
@@ -90,7 +90,7 @@ class RequestHandler(werkzeug.serving.WSGIRequestHandler):
         # flag the current thread as handling a http request
         super(RequestHandler, self).setup()
         me = threading.currentThread()
-        me.name = 'openerp.service.http.request.%s' % (me.ident,)
+        me.name = 'odoo.service.http.request.%s' % (me.ident,)
 
 # _reexec() should set LISTEN_* to avoid connection refused during reload time. It
 # should also work with systemd socket activation. This is currently untested
@@ -125,7 +125,7 @@ class ThreadedWSGIServerReloadable(LoggingBaseWSGIServerMixIn, werkzeug.serving.
 class FSWatcher(object):
     def __init__(self):
         self.observer = Observer()
-        for path in openerp.modules.module.ad_paths:
+        for path in odoo.modules.module.ad_paths:
             _logger.info('Watching addons folder %s', path)
             self.observer.schedule(self, path, recursive=True)
 
@@ -207,17 +207,17 @@ class ThreadedServer(CommonServer):
                 os._exit(0)
         elif sig == signal.SIGHUP:
             # restart on kill -HUP
-            openerp.phoenix = True
+            odoo.phoenix = True
             self.quit_signals_received += 1
 
     def cron_thread(self, number):
         while True:
             time.sleep(SLEEP_INTERVAL + number)     # Steve Reich timing style
-            registries = openerp.modules.registry.Registry.registries
+            registries = odoo.modules.registry.Registry.registries
             _logger.debug('cron%d polling for jobs', number)
             for db_name, registry in registries.iteritems():
                 while registry.ready:
-                    acquired = openerp.addons.base.ir.ir_cron.ir_cron._acquire_job(db_name)
+                    acquired = odoo.addons.base.ir.ir_cron.ir_cron._acquire_job(db_name)
                     if not acquired:
                         break
 
@@ -233,10 +233,10 @@ class ThreadedServer(CommonServer):
         # to prevent time.strptime AttributeError within the thread.
         # See: http://bugs.python.org/issue7980
         datetime.datetime.strptime('2012-01-01', '%Y-%m-%d')
-        for i in range(openerp.tools.config['max_cron_threads']):
+        for i in range(odoo.tools.config['max_cron_threads']):
             def target():
                 self.cron_thread(i)
-            t = threading.Thread(target=target, name="openerp.service.cron.cron%d" % i)
+            t = threading.Thread(target=target, name="odoo.service.cron.cron%d" % i)
             t.setDaemon(True)
             t.start()
             _logger.debug("cron%d started!" % i)
@@ -248,7 +248,7 @@ class ThreadedServer(CommonServer):
         self.httpd.serve_forever()
 
     def http_spawn(self):
-        t = threading.Thread(target=self.http_thread, name="openerp.service.httpd")
+        t = threading.Thread(target=self.http_thread, name="odoo.service.httpd")
         t.setDaemon(True)
         t.start()
         _logger.info('HTTP service (werkzeug) running on %s:%s', self.interface, self.port)
@@ -301,7 +301,7 @@ class ThreadedServer(CommonServer):
                     time.sleep(0.05)
 
         _logger.debug('--')
-        openerp.modules.registry.Registry.delete_all()
+        odoo.modules.registry.Registry.delete_all()
         logging.shutdown()
 
     def run(self, preload=None, stop=False):
@@ -476,7 +476,7 @@ class PreforkServer(CommonServer):
                 raise KeyboardInterrupt
             elif sig == signal.SIGHUP:
                 # restart on kill -HUP
-                openerp.phoenix = True
+                odoo.phoenix = True
                 raise KeyboardInterrupt
             elif sig == signal.SIGQUIT:
                 # dump stacks on kill -3
@@ -608,7 +608,7 @@ class PreforkServer(CommonServer):
             return rc
 
         # Empty the cursor pool, we dont want them to be shared among forked workers.
-        openerp.sql_db.close_all()
+        odoo.sql_db.close_all()
 
         _logger.debug("Multiprocess starting")
         while 1:
@@ -644,7 +644,7 @@ class Worker(object):
         self.request_count = 0
 
     def setproctitle(self, title=""):
-        setproctitle('openerp: %s %s %s' % (self.__class__.__name__, self.pid, title))
+        setproctitle('odoo: %s %s %s' % (self.__class__.__name__, self.pid, title))
 
     def close(self):
         os.close(self.watchdog_pipe[0])
@@ -723,7 +723,7 @@ class Worker(object):
                 self.process_work()
             _logger.info("Worker (%s) exiting. request_count: %s, registry count: %s.",
                          self.pid, self.request_count,
-                         len(openerp.modules.registry.Registry.registries))
+                         len(odoo.modules.registry.Registry.registries))
             self.stop()
         except Exception:
             _logger.exception("Worker (%s) Exception occured, exiting..." % self.pid)
@@ -783,11 +783,11 @@ class WorkerCron(Worker):
         if config['db_name']:
             db_names = config['db_name'].split(',')
         else:
-            db_names = openerp.service.db.list_dbs(True)
+            db_names = odoo.service.db.list_dbs(True)
         return db_names
 
     def process_work(self):
-        rpc_request = logging.getLogger('openerp.netsvc.rpc.request')
+        rpc_request = logging.getLogger('odoo.netsvc.rpc.request')
         rpc_request_flag = rpc_request.isEnabledFor(logging.DEBUG)
         _logger.debug("WorkerCron (%s) polling for jobs", self.pid)
         db_names = self._db_list()
@@ -799,13 +799,13 @@ class WorkerCron(Worker):
                 start_time = time.time()
                 start_rss, start_vms = memory_info(psutil.Process(os.getpid()))
 
-            import openerp.addons.base as base
+            import odoo.addons.base as base
             base.ir.ir_cron.ir_cron._acquire_job(db_name)
-            openerp.modules.registry.Registry.delete(db_name)
+            odoo.modules.registry.Registry.delete(db_name)
 
             # dont keep cursors in multi database mode
             if len(db_names) > 1:
-                openerp.sql_db.close_db(db_name)
+                odoo.sql_db.close_db(db_name)
             if rpc_request_flag:
                 run_time = time.time() - start_time
                 end_rss, end_vms = memory_info(psutil.Process(os.getpid()))
@@ -835,9 +835,9 @@ class WorkerCron(Worker):
 server = None
 
 def load_server_wide_modules():
-    for m in openerp.conf.server_wide_modules:
+    for m in odoo.conf.server_wide_modules:
         try:
-            openerp.modules.module.load_openerp_module(m)
+            odoo.modules.module.load_openerp_module(m)
         except Exception:
             msg = ''
             if m == 'web':
@@ -848,7 +848,7 @@ Maybe you forgot to add those addons in your addons_path configuration."""
 
 def _reexec(updated_modules=None):
     """reexecute openerp-server process with (nearly) the same arguments"""
-    if openerp.tools.osutil.is_running_as_nt_service():
+    if odoo.tools.osutil.is_running_as_nt_service():
         subprocess.call('net stop {0} && net start {0}'.format(nt_service_name), shell=True)
     exe = os.path.basename(sys.executable)
     args = stripped_sys_argv()
@@ -860,7 +860,7 @@ def _reexec(updated_modules=None):
 
 def load_test_file_yml(registry, test_file):
     with registry.cursor() as cr:
-        openerp.tools.convert_yaml_import(cr, 'base', file(test_file), 'test', {}, 'init')
+        odoo.tools.convert_yaml_import(cr, 'base', file(test_file), 'test', {}, 'init')
         if config['test_commit']:
             _logger.info('test %s has been commited', test_file)
             cr.commit()
@@ -879,7 +879,7 @@ def load_test_file_py(registry, test_file):
                 for t in unittest.TestLoader().loadTestsFromModule(mod_mod):
                     suite.addTest(t)
                 _logger.log(logging.INFO, 'running tests %s.', mod_mod.__name__)
-                stream = openerp.modules.module.TestStream()
+                stream = odoo.modules.module.TestStream()
                 result = unittest.TextTestRunner(verbosity=2, stream=stream).run(suite)
                 success = result.wasSuccessful()
                 if hasattr(registry._assertion_report,'report_result'):
@@ -890,7 +890,7 @@ def load_test_file_py(registry, test_file):
 def preload_registries(dbnames):
     """ Preload a registries, possibly run a test file."""
     # TODO: move all config checks to args dont check tools.config here
-    config = openerp.tools.config
+    config = odoo.tools.config
     test_file = config['test_file']
     dbnames = dbnames or []
     rc = 0
@@ -901,7 +901,7 @@ def preload_registries(dbnames):
             # run test_file if provided
             if test_file:
                 _logger.info('loading test file %s', test_file)
-                with openerp.api.Environment.manage():
+                with odoo.api.Environment.manage():
                     if test_file.endswith('yml'):
                         load_test_file_yml(registry, test_file)
                     elif test_file.endswith('py'):
@@ -915,16 +915,16 @@ def preload_registries(dbnames):
     return rc
 
 def start(preload=None, stop=False):
-    """ Start the openerp http server and cron processor.
+    """ Start the odoo http server and cron processor.
     """
     global server
     load_server_wide_modules()
-    if openerp.evented:
-        server = GeventServer(openerp.service.wsgi_server.application)
+    if odoo.evented:
+        server = GeventServer(odoo.service.wsgi_server.application)
     elif config['workers']:
-        server = PreforkServer(openerp.service.wsgi_server.application)
+        server = PreforkServer(odoo.service.wsgi_server.application)
     else:
-        server = ThreadedServer(openerp.service.wsgi_server.application)
+        server = ThreadedServer(odoo.service.wsgi_server.application)
 
     watcher = None
     if 'reload' in config['dev_mode']:
@@ -939,7 +939,7 @@ def start(preload=None, stop=False):
     rc = server.run(preload, stop)
 
     # like the legend of the phoenix, all ends with beginnings
-    if getattr(openerp, 'phoenix', False):
+    if getattr(odoo, 'phoenix', False):
         if watcher:
             watcher.stop()
         _reexec()
diff --git a/odoo/service/wsgi_server.py b/odoo/service/wsgi_server.py
index 8bbcc18030e3..9669fabf5d30 100644
--- a/odoo/service/wsgi_server.py
+++ b/odoo/service/wsgi_server.py
@@ -23,14 +23,14 @@ import traceback
 import werkzeug.serving
 import werkzeug.contrib.fixers
 
-import openerp
-import openerp.tools.config as config
+import odoo
+import odoo.tools.config as config
 
 _logger = logging.getLogger(__name__)
 
 # XML-RPC fault codes. Some care must be taken when changing these: the
 # constants are also defined client-side and must remain in sync.
-# User code must use the exceptions defined in ``openerp.exceptions`` (not
+# User code must use the exceptions defined in ``odoo.exceptions`` (not
 # create directly ``xmlrpclib.Fault`` objects).
 RPC_FAULT_CODE_CLIENT_ERROR = 1 # indistinguishable from app. error.
 RPC_FAULT_CODE_APPLICATION_ERROR = 1
@@ -47,13 +47,13 @@ def xmlrpc_return(start_response, service, method, params, string_faultcode=Fals
     and XML-RPC fault codes.
     """
     # Map OpenERP core exceptions to XML-RPC fault codes. Specific exceptions
-    # defined in ``openerp.exceptions`` are mapped to specific fault codes;
+    # defined in ``odoo.exceptions`` are mapped to specific fault codes;
     # all the other exceptions are mapped to the generic
     # RPC_FAULT_CODE_APPLICATION_ERROR value.
     # This also mimics SimpleXMLRPCDispatcher._marshaled_dispatch() for
     # exception handling.
     try:
-        result = openerp.http.dispatch_rpc(service, method, params)
+        result = odoo.http.dispatch_rpc(service, method, params)
         response = xmlrpclib.dumps((result,), methodresponse=1, allow_none=False, encoding=None)
     except Exception, e:
         if string_faultcode:
@@ -64,26 +64,26 @@ def xmlrpc_return(start_response, service, method, params, string_faultcode=Fals
     return [response]
 
 def xmlrpc_handle_exception_int(e):
-    if isinstance(e, openerp.exceptions.UserError):
-        fault = xmlrpclib.Fault(RPC_FAULT_CODE_WARNING, openerp.tools.ustr(e.value))
+    if isinstance(e, odoo.exceptions.UserError):
+        fault = xmlrpclib.Fault(RPC_FAULT_CODE_WARNING, odoo.tools.ustr(e.value))
         response = xmlrpclib.dumps(fault, allow_none=False, encoding=None)
-    elif isinstance(e, openerp.exceptions.RedirectWarning):
+    elif isinstance(e, odoo.exceptions.RedirectWarning):
         fault = xmlrpclib.Fault(RPC_FAULT_CODE_WARNING, str(e))
         response = xmlrpclib.dumps(fault, allow_none=False, encoding=None)
-    elif isinstance(e, openerp.exceptions.MissingError):
+    elif isinstance(e, odoo.exceptions.MissingError):
         fault = xmlrpclib.Fault(RPC_FAULT_CODE_WARNING, str(e))
         response = xmlrpclib.dumps(fault, allow_none=False, encoding=None)
-    elif isinstance (e, openerp.exceptions.AccessError):
+    elif isinstance (e, odoo.exceptions.AccessError):
         fault = xmlrpclib.Fault(RPC_FAULT_CODE_ACCESS_ERROR, str(e))
         response = xmlrpclib.dumps(fault, allow_none=False, encoding=None)
-    elif isinstance(e, openerp.exceptions.AccessDenied):
+    elif isinstance(e, odoo.exceptions.AccessDenied):
         fault = xmlrpclib.Fault(RPC_FAULT_CODE_ACCESS_DENIED, str(e))
         response = xmlrpclib.dumps(fault, allow_none=False, encoding=None)
-    elif isinstance(e, openerp.exceptions.DeferredException):
+    elif isinstance(e, odoo.exceptions.DeferredException):
         info = e.traceback
         # Which one is the best ?
         formatted_info = "".join(traceback.format_exception(*info))
-        #formatted_info = openerp.tools.exception_to_unicode(e) + '\n' + info
+        #formatted_info = odoo.tools.exception_to_unicode(e) + '\n' + info
         fault = xmlrpclib.Fault(RPC_FAULT_CODE_APPLICATION_ERROR, formatted_info)
         response = xmlrpclib.dumps(fault, allow_none=False, encoding=None)
     else:
@@ -95,36 +95,36 @@ def xmlrpc_handle_exception_int(e):
             info = sys.exc_info()
             # Which one is the best ?
             formatted_info = "".join(traceback.format_exception(*info))
-            #formatted_info = openerp.tools.exception_to_unicode(e) + '\n' + info
+            #formatted_info = odoo.tools.exception_to_unicode(e) + '\n' + info
             fault = xmlrpclib.Fault(RPC_FAULT_CODE_APPLICATION_ERROR, formatted_info)
             response = xmlrpclib.dumps(fault, allow_none=None, encoding=None)
     return response
 
 def xmlrpc_handle_exception_string(e):
-    if isinstance(e, openerp.exceptions.UserError):
+    if isinstance(e, odoo.exceptions.UserError):
         fault = xmlrpclib.Fault('warning -- %s\n\n%s' % (e.name, e.value), '')
         response = xmlrpclib.dumps(fault, allow_none=False, encoding=None)
-    elif isinstance(e, openerp.exceptions.RedirectWarning):
+    elif isinstance(e, odoo.exceptions.RedirectWarning):
         fault = xmlrpclib.Fault('warning -- Warning\n\n' + str(e), '')
-    elif isinstance(e, openerp.exceptions.MissingError):
+    elif isinstance(e, odoo.exceptions.MissingError):
         fault = xmlrpclib.Fault('warning -- MissingError\n\n' + str(e), '')
         response = xmlrpclib.dumps(fault, allow_none=False, encoding=None)
-    elif isinstance(e, openerp.exceptions.AccessError):
+    elif isinstance(e, odoo.exceptions.AccessError):
         fault = xmlrpclib.Fault('warning -- AccessError\n\n' + str(e), '')
         response = xmlrpclib.dumps(fault, allow_none=False, encoding=None)
-    elif isinstance(e, openerp.exceptions.AccessDenied):
+    elif isinstance(e, odoo.exceptions.AccessDenied):
         fault = xmlrpclib.Fault('AccessDenied', str(e))
         response = xmlrpclib.dumps(fault, allow_none=False, encoding=None)
-    elif isinstance(e, openerp.exceptions.DeferredException):
+    elif isinstance(e, odoo.exceptions.DeferredException):
         info = e.traceback
         formatted_info = "".join(traceback.format_exception(*info))
-        fault = xmlrpclib.Fault(openerp.tools.ustr(e.message), formatted_info)
+        fault = xmlrpclib.Fault(odoo.tools.ustr(e.message), formatted_info)
         response = xmlrpclib.dumps(fault, allow_none=False, encoding=None)
     #InternalError
     else:
         info = sys.exc_info()
         formatted_info = "".join(traceback.format_exception(*info))
-        fault = xmlrpclib.Fault(openerp.tools.exception_to_unicode(e), formatted_info)
+        fault = xmlrpclib.Fault(odoo.tools.exception_to_unicode(e), formatted_info)
         response = xmlrpclib.dumps(fault, allow_none=None, encoding=None)
     return response
 
@@ -156,7 +156,7 @@ def application_unproxied(environ, start_response):
     """ WSGI entry point."""
     # cleanup db/uid trackers - they're set at HTTP dispatch in
     # web.session.OpenERPSession.send() and at RPC dispatch in
-    # openerp.service.web_services.objects_proxy.dispatch().
+    # odoo.service.web_services.objects_proxy.dispatch().
     # /!\ The cleanup cannot be done at the end of this `application`
     # method because werkzeug still produces relevant logging afterwards 
     if hasattr(threading.current_thread(), 'uid'):
@@ -164,9 +164,9 @@ def application_unproxied(environ, start_response):
     if hasattr(threading.current_thread(), 'dbname'):
         del threading.current_thread().dbname
 
-    with openerp.api.Environment.manage():
+    with odoo.api.Environment.manage():
         # Try all handlers until one returns some result (i.e. not None).
-        for handler in [wsgi_xmlrpc, openerp.http.root]:
+        for handler in [wsgi_xmlrpc, odoo.http.root]:
             result = handler(environ, start_response)
             if result is None:
                 continue
diff --git a/odoo/sql_db.py b/odoo/sql_db.py
index 4f26b57ae623..f2b200225a22 100644
--- a/odoo/sql_db.py
+++ b/odoo/sql_db.py
@@ -467,7 +467,7 @@ class LazyCursor(object):
     def __getattr__(self, name):
         cr = self._cursor
         if cr is None:
-            from openerp import registry
+            from odoo import registry
             cr = self._cursor = registry(self.dbname).cursor()
             for _ in xrange(self._depth):
                 cr.__enter__()
@@ -682,7 +682,7 @@ def db_connect(to, allow_uri=False):
     return Connection(_Pool, db, info)
 
 def close_db(db_name):
-    """ You might want to call openerp.modules.registry.Registry.delete(db_name) along this function."""
+    """ You might want to call odoo.modules.registry.Registry.delete(db_name) along this function."""
     global _Pool
     if _Pool:
         _Pool.close_all(connection_info_for(db_name)[1])
diff --git a/odoo/tests/addons/test_translation_import/models.py b/odoo/tests/addons/test_translation_import/models.py
index bcffd1c2f2c6..bf9e5e39fcb6 100644
--- a/odoo/tests/addons/test_translation_import/models.py
+++ b/odoo/tests/addons/test_translation_import/models.py
@@ -1,6 +1,6 @@
 # -*- coding: utf-8 -*-
 
-from openerp import models, fields, _
+from odoo import models, fields, _
 
 class m(models.TransientModel):
     """ A model to provide source strings. """
diff --git a/odoo/tests/addons/test_translation_import/tests/test_term_count.py b/odoo/tests/addons/test_translation_import/tests/test_term_count.py
index 7ccd30969cbc..9d2be3ba82cd 100644
--- a/odoo/tests/addons/test_translation_import/tests/test_term_count.py
+++ b/odoo/tests/addons/test_translation_import/tests/test_term_count.py
@@ -1,7 +1,7 @@
 # -*- coding: utf-8 -*-
 
-import openerp
-from openerp.tests import common
+import odoo
+from odoo.tests import common
 
 class TestTermCount(common.TransactionCase):
 
@@ -9,7 +9,7 @@ class TestTermCount(common.TransactionCase):
         """
         Just make sure we have as many translation entries as we wanted.
         """
-        openerp.tools.trans_load(self.cr, 'test_translation_import/i18n/fr.po', 'fr_FR', verbose=False)
+        odoo.tools.trans_load(self.cr, 'test_translation_import/i18n/fr.po', 'fr_FR', verbose=False)
         ids = self.registry('ir.translation').search(self.cr, self.uid,
             [('src', '=', '1XBUO5PUYH2RYZSA1FTLRYS8SPCNU1UYXMEYMM25ASV7JC2KTJZQESZYRV9L8CGB')])
         self.assertEqual(len(ids), 2)
diff --git a/odoo/tests/common.py b/odoo/tests/common.py
index 51da5eba4072..552878f093dd 100644
--- a/odoo/tests/common.py
+++ b/odoo/tests/common.py
@@ -1,6 +1,6 @@
 # -*- coding: utf-8 -*-
 """
-The module :mod:`openerp.tests.common` provides unittest test cases and a few
+The module :mod:`odoo.tests.common` provides unittest test cases and a few
 helpers and classes to write tests.
 
 """
@@ -24,21 +24,21 @@ from pprint import pformat
 
 import werkzeug
 
-import openerp
-from openerp import api
+import odoo
+from odoo import api
 
 _logger = logging.getLogger(__name__)
 
-# The openerp library is supposed already configured.
-ADDONS_PATH = openerp.tools.config['addons_path']
+# The odoo library is supposed already configured.
+ADDONS_PATH = odoo.tools.config['addons_path']
 HOST = '127.0.0.1'
-PORT = openerp.tools.config['xmlrpc_port']
+PORT = odoo.tools.config['xmlrpc_port']
 # Useless constant, tests are aware of the content of demo data
-ADMIN_USER_ID = openerp.SUPERUSER_ID
+ADMIN_USER_ID = odoo.SUPERUSER_ID
 
 
 def get_db_name():
-    db = openerp.tools.config['db_name']
+    db = odoo.tools.config['db_name']
     # If the database name is not provided on the command-line,
     # use the one on the thread (which means if it is provided on
     # the command-line, this will break when installing another
@@ -107,7 +107,7 @@ class BaseCase(unittest.TestCase):
         :param xid: fully-qualified :term:`external identifier`, in the form
                     :samp:`{module}.{identifier}`
         :raise: ValueError if not found
-        :returns: :class:`~openerp.models.BaseModel`
+        :returns: :class:`~odoo.models.BaseModel`
         """
         assert "." in xid, "this method requires a fully qualified parameter, in the following form: 'module.identifier'"
         return self.env.ref(xid)
@@ -138,11 +138,11 @@ class TransactionCase(BaseCase):
     """
 
     def setUp(self):
-        self.registry = openerp.registry(get_db_name())
+        self.registry = odoo.registry(get_db_name())
         #: current transaction's cursor
         self.cr = self.cursor()
-        self.uid = openerp.SUPERUSER_ID
-        #: :class:`~openerp.api.Environment` for the current test case
+        self.uid = odoo.SUPERUSER_ID
+        #: :class:`~odoo.api.Environment` for the current test case
         self.env = api.Environment(self.cr, self.uid, {})
 
         @self.addCleanup
@@ -172,9 +172,9 @@ class SingleTransactionCase(BaseCase):
 
     @classmethod
     def setUpClass(cls):
-        cls.registry = openerp.registry(get_db_name())
+        cls.registry = odoo.registry(get_db_name())
         cls.cr = cls.registry.cursor()
-        cls.uid = openerp.SUPERUSER_ID
+        cls.uid = odoo.SUPERUSER_ID
         cls.env = api.Environment(cls.cr, cls.uid, {})
 
     @classmethod
@@ -243,10 +243,10 @@ class HttpCase(TransactionCase):
         super(HttpCase, self).setUp()
         self.registry.enter_test_mode()
         # setup a magic session_id that will be rollbacked
-        self.session = openerp.http.root.session_store.new()
+        self.session = odoo.http.root.session_store.new()
         self.session_id = self.session.sid
         self.session.db = get_db_name()
-        openerp.http.root.session_store.save(self.session)
+        odoo.http.root.session_store.save(self.session)
         # setup an url opener helper
         self.opener = urllib2.OpenerDirector()
         self.opener.add_handler(urllib2.UnknownHandler())
@@ -287,7 +287,7 @@ class HttpCase(TransactionCase):
         session.context['uid'] = uid
         session._fix_lang(session.context)
 
-        openerp.http.root.session_store.save(session)
+        odoo.http.root.session_store.save(session)
 
     def phantom_poll(self, phantom, timeout):
         """ Phantomjs Test protocol.
@@ -383,7 +383,7 @@ class HttpCase(TransactionCase):
     def _wait_remaining_requests(self):
         t0 = int(time.time())
         for thread in threading.enumerate():
-            if thread.name.startswith('openerp.service.http.request.'):
+            if thread.name.startswith('odoo.service.http.request.'):
                 while thread.isAlive():
                     # Need a busyloop here as thread.join() masks signals
                     # and would prevent the forced shutdown.
@@ -392,7 +392,7 @@ class HttpCase(TransactionCase):
                     t1 = int(time.time())
                     if t0 != t1:
                         _logger.info('remaining requests')
-                        openerp.tools.misc.dumpstacks()
+                        odoo.tools.misc.dumpstacks()
                         t0 = t1
 
     def phantom_js(self, url_path, code, ready="window", login=None, timeout=60, **kw):
diff --git a/odoo/tools/amount_to_text_en.py b/odoo/tools/amount_to_text_en.py
index 46657251701a..3dd138f43fab 100644
--- a/odoo/tools/amount_to_text_en.py
+++ b/odoo/tools/amount_to_text_en.py
@@ -89,7 +89,7 @@ def amount_to_text(nbr, lang='en', currency='euro'):
         
             1654: thousands six cent cinquante-quatre.
     """
-    import openerp.loglevels as loglevels
+    import odoo.loglevels as loglevels
 #    if nbr > 10000000:
 #        _logger.warning(_("Number too large '%d', can not translate it"))
 #        return str(nbr)
diff --git a/odoo/tools/cache.py b/odoo/tools/cache.py
index e71ab9dd1215..ac776eefa74a 100644
--- a/odoo/tools/cache.py
+++ b/odoo/tools/cache.py
@@ -2,7 +2,7 @@
 # Part of Odoo. See LICENSE file for full copyright and licensing details.
 
 # decorator makes wrappers that have the same API as their wrapped function;
-# this is important for the openerp.api.guess() that relies on signatures
+# this is important for the odoo.api.guess() that relies on signatures
 from collections import defaultdict
 from decorator import decorator
 from inspect import formatargspec, getargspec
@@ -196,7 +196,7 @@ class dummy_cache(object):
 
 def log_ormcache_stats(sig=None, frame=None):
     """ Log statistics of ormcache usage by database, model, and method. """
-    from openerp.modules.registry import Registry
+    from odoo.modules.registry import Registry
     import threading
 
     me = threading.currentThread()
diff --git a/odoo/tools/config.py b/odoo/tools/config.py
index 3526b1738dec..7c81652b68f8 100644
--- a/odoo/tools/config.py
+++ b/odoo/tools/config.py
@@ -1,15 +1,15 @@
-#openerp.loggers.handlers. -*- coding: utf-8 -*-
+#odoo.loggers.handlers. -*- coding: utf-8 -*-
 # Part of Odoo. See LICENSE file for full copyright and licensing details.
 
 import ConfigParser
 import optparse
 import os
 import sys
-import openerp
-import openerp.conf
-import openerp.loglevels as loglevels
+import odoo
+import odoo.conf
+import odoo.loglevels as loglevels
 import logging
-import openerp.release as release
+import odoo.release as release
 import appdirs
 
 class MyOption (optparse.Option, object):
@@ -154,11 +154,11 @@ class configmanager(object):
         group.add_option("--logfile", dest="logfile", help="file where the server log will be stored")
         group.add_option("--logrotate", dest="logrotate", action="store_true", my_default=False, help="enable logfile rotation")
         group.add_option("--syslog", action="store_true", dest="syslog", my_default=False, help="Send the log to the syslog server")
-        group.add_option('--log-handler', action="append", default=[], my_default=DEFAULT_LOG_HANDLER, metavar="PREFIX:LEVEL", help='setup a handler at LEVEL for a given PREFIX. An empty PREFIX indicates the root logger. This option can be repeated. Example: "openerp.orm:DEBUG" or "werkzeug:CRITICAL" (default: ":INFO")')
-        group.add_option('--log-request', action="append_const", dest="log_handler", const="openerp.http.rpc.request:DEBUG", help='shortcut for --log-handler=openerp.http.rpc.request:DEBUG')
-        group.add_option('--log-response', action="append_const", dest="log_handler", const="openerp.http.rpc.response:DEBUG", help='shortcut for --log-handler=openerp.http.rpc.response:DEBUG')
-        group.add_option('--log-web', action="append_const", dest="log_handler", const="openerp.http:DEBUG", help='shortcut for --log-handler=openerp.http:DEBUG')
-        group.add_option('--log-sql', action="append_const", dest="log_handler", const="openerp.sql_db:DEBUG", help='shortcut for --log-handler=openerp.sql_db:DEBUG')
+        group.add_option('--log-handler', action="append", default=[], my_default=DEFAULT_LOG_HANDLER, metavar="PREFIX:LEVEL", help='setup a handler at LEVEL for a given PREFIX. An empty PREFIX indicates the root logger. This option can be repeated. Example: "odoo.orm:DEBUG" or "werkzeug:CRITICAL" (default: ":INFO")')
+        group.add_option('--log-request', action="append_const", dest="log_handler", const="odoo.http.rpc.request:DEBUG", help='shortcut for --log-handler=odoo.http.rpc.request:DEBUG')
+        group.add_option('--log-response', action="append_const", dest="log_handler", const="odoo.http.rpc.response:DEBUG", help='shortcut for --log-handler=odoo.http.rpc.response:DEBUG')
+        group.add_option('--log-web', action="append_const", dest="log_handler", const="odoo.http:DEBUG", help='shortcut for --log-handler=odoo.http:DEBUG')
+        group.add_option('--log-sql', action="append_const", dest="log_handler", const="odoo.sql_db:DEBUG", help='shortcut for --log-handler=odoo.sql_db:DEBUG')
         group.add_option('--log-db', dest='log_db', help="Logging database", my_default=False)
         group.add_option('--log-db-level', dest='log_db_level', my_default='warning', help="Logging database level")
         # For backward-compatibility, map the old log levels to something
@@ -297,7 +297,7 @@ class configmanager(object):
         """ Parse the configuration file (if any) and the command-line
         arguments.
 
-        This method initializes openerp.tools.config and openerp.conf (the
+        This method initializes odoo.tools.config and openerp.conf (the
         former should be removed in the furture) with library-wide
         configuration values.
 
@@ -306,11 +306,11 @@ class configmanager(object):
 
         Typical usage of this method:
 
-            openerp.tools.config.parse_config(sys.argv[1:])
+            odoo.tools.config.parse_config(sys.argv[1:])
         """
         self._parse_config(args)
-        openerp.netsvc.init_logger()
-        openerp.modules.module.initialize_sys_path()
+        odoo.netsvc.init_logger()
+        odoo.modules.module.initialize_sys_path()
 
     def _parse_config(self, args=None):
         if args is None:
@@ -416,7 +416,7 @@ class configmanager(object):
             elif isinstance(self.options[arg], basestring) and self.casts[arg].type in optparse.Option.TYPE_CHECKER:
                 self.options[arg] = optparse.Option.TYPE_CHECKER[self.casts[arg].type](self.casts[arg], arg, self.options[arg])
 
-        self.options['root_path'] = os.path.abspath(os.path.expanduser(os.path.expandvars(os.path.dirname(openerp.__file__))))
+        self.options['root_path'] = os.path.abspath(os.path.expanduser(os.path.expandvars(os.path.dirname(odoo.__file__))))
         if not self.options['addons_path'] or self.options['addons_path']=='None':
             default_addons = []
             base_addons = os.path.join(self.options['root_path'], 'addons')
@@ -451,11 +451,11 @@ class configmanager(object):
         if opt.save:
             self.save()
 
-        openerp.conf.addons_paths = self.options['addons_path'].split(',')
+        odoo.conf.addons_paths = self.options['addons_path'].split(',')
         if opt.server_wide_modules:
-            openerp.conf.server_wide_modules = map(lambda m: m.strip(), opt.server_wide_modules.split(','))
+            odoo.conf.server_wide_modules = map(lambda m: m.strip(), opt.server_wide_modules.split(','))
         else:
-            openerp.conf.server_wide_modules = ['web','web_kanban']
+            odoo.conf.server_wide_modules = ['web','web_kanban']
 
     def _is_addons_path(self, path):
         for f in os.listdir(path):
diff --git a/odoo/tools/convert.py b/odoo/tools/convert.py
index e711e3828e35..089210d6f999 100644
--- a/odoo/tools/convert.py
+++ b/odoo/tools/convert.py
@@ -15,14 +15,14 @@ from dateutil.relativedelta import relativedelta
 import pytz
 from lxml import etree, builder
 
-import openerp
-import openerp.release
+import odoo
+import odoo.release
 from . import assertion_report
 from .config import config
 from .misc import file_open, unquote, ustr, SKIPPED_ELEMENT_TYPES
 from .translate import _
 from .yaml_import import convert_yaml_import
-from openerp import SUPERUSER_ID
+from odoo import SUPERUSER_ID
 
 _logger = logging.getLogger(__name__)
 
@@ -62,7 +62,7 @@ def _get_idref(self, env, model_str, idref):
                   datetime=datetime,
                   timedelta=timedelta,
                   relativedelta=relativedelta,
-                  version=openerp.release.major_version,
+                  version=odoo.release.major_version,
                   ref=self.id_get,
                   pytz=pytz)
     if model_str:
@@ -117,7 +117,7 @@ def _eval_xml(self, node, env):
             try:
                 return unsafe_eval(a_eval, idref2)
             except Exception:
-                logging.getLogger('openerp.tools.convert.init').error(
+                logging.getLogger('odoo.tools.convert.init').error(
                     'Could not eval(%s) for %s in %s', a_eval, node.get('name'), env.context)
                 raise
         def _process(s):
@@ -191,7 +191,7 @@ def _eval_xml(self, node, env):
         model = env[node.get('model', '')]
         method = node.get('name')
         # this one still depends on the old API
-        return openerp.api.call_kw(model, method, args, {})
+        return odoo.api.call_kw(model, method, args, {})
     elif node.tag == "test":
         return node.text
 
@@ -811,7 +811,7 @@ form: module.record_id""" % (xml_id,)
     def __init__(self, cr, module, idref, mode, report=None, noupdate=False, xml_filename=None):
         self.mode = mode
         self.module = module
-        self.env = openerp.api.Environment(cr, SUPERUSER_ID, {})
+        self.env = odoo.api.Environment(cr, SUPERUSER_ID, {})
         self.cr = cr
         self.uid = SUPERUSER_ID
         self.idref = idref
@@ -892,7 +892,7 @@ def convert_csv_import(cr, module, fname, csvcontent, idref=None, mode='init',
         'module': module,
         'noupdate': noupdate,
     }
-    env = openerp.api.Environment(cr, SUPERUSER_ID, context)
+    env = odoo.api.Environment(cr, SUPERUSER_ID, context)
     result = env[model].load(fields, datas)
     if any(msg['type'] == 'error' for msg in result['messages']):
         # Report failed import and abort module install
diff --git a/odoo/tools/mail.py b/odoo/tools/mail.py
index da4ec6fb716f..26032f584c26 100644
--- a/odoo/tools/mail.py
+++ b/odoo/tools/mail.py
@@ -14,8 +14,8 @@ from email.header import decode_header
 from email.utils import getaddresses, formataddr
 from lxml import etree
 
-import openerp
-from openerp.loglevels import ustr
+import odoo
+from odoo.loglevels import ustr
 
 _logger = logging.getLogger(__name__)
 
@@ -445,13 +445,13 @@ def email_send(email_from, email_to, subject, body, email_cc=None, email_bcc=Non
     if not cr:
         db_name = getattr(threading.currentThread(), 'dbname', None)
         if db_name:
-            local_cr = cr = openerp.registry(db_name).cursor()
+            local_cr = cr = odoo.registry(db_name).cursor()
         else:
             raise Exception("No database cursor found, please pass one explicitly")
 
     # Send Email
     try:
-        mail_server_pool = openerp.registry(cr.dbname)['ir.mail_server']
+        mail_server_pool = odoo.registry(cr.dbname)['ir.mail_server']
         res = False
         # Pack Message into MIME Object
         email_msg = mail_server_pool.build_email(email_from, email_to, subject, body, email_cc, email_bcc, reply_to,
diff --git a/odoo/tools/misc.py b/odoo/tools/misc.py
index 2dbe2bad3824..b69ad469e8c5 100644
--- a/odoo/tools/misc.py
+++ b/odoo/tools/misc.py
@@ -40,10 +40,10 @@ from config import config
 from cache import *
 from .parse_version import parse_version 
 
-import openerp
+import odoo
 # get_encodings, ustr and exception_to_unicode were originally from tools.misc.
 # There are moved to loglevels until we refactor tools.
-from openerp.loglevels import get_encodings, ustr, exception_to_unicode     # noqa
+from odoo.loglevels import get_encodings, ustr, exception_to_unicode     # noqa
 
 _logger = logging.getLogger(__name__)
 
@@ -104,14 +104,14 @@ def exec_pg_environ():
     See also http://www.postgresql.org/docs/8.4/static/libpq-envars.html
     """
     env = os.environ.copy()
-    if openerp.tools.config['db_host']:
-        env['PGHOST'] = openerp.tools.config['db_host']
-    if openerp.tools.config['db_port']:
-        env['PGPORT'] = str(openerp.tools.config['db_port'])
-    if openerp.tools.config['db_user']:
-        env['PGUSER'] = openerp.tools.config['db_user']
-    if openerp.tools.config['db_password']:
-        env['PGPASSWORD'] = openerp.tools.config['db_password']
+    if odoo.tools.config['db_host']:
+        env['PGHOST'] = odoo.tools.config['db_host']
+    if odoo.tools.config['db_port']:
+        env['PGPORT'] = str(odoo.tools.config['db_port'])
+    if odoo.tools.config['db_user']:
+        env['PGUSER'] = odoo.tools.config['db_user']
+    if odoo.tools.config['db_password']:
+        env['PGPASSWORD'] = odoo.tools.config['db_password']
     return env
 
 def exec_pg_command(name, *args):
@@ -150,7 +150,7 @@ def file_open(name, mode="r", subdir='addons', pathinfo=False):
 
     @return fileobject if pathinfo is False else (fileobject, filepath)
     """
-    import openerp.modules as addons
+    import odoo.modules as addons
     adps = addons.module.ad_paths
     rtp = os.path.normcase(os.path.abspath(config['root_path']))
 
@@ -485,7 +485,7 @@ def scan_languages():
     :returns: a list of (lang_code, lang_name) pairs
     :rtype: [(str, unicode)]
     """
-    csvpath = openerp.modules.module.get_resource_path('base', 'res', 'res.lang.csv')
+    csvpath = odoo.modules.module.get_resource_path('base', 'res', 'res.lang.csv')
     try:
         # read (code, name) from languages in base/res/res.lang.csv
         result = []
@@ -883,11 +883,11 @@ class mute_logger(object):
     """Temporary suppress the logging.
     Can be used as context manager or decorator.
 
-        @mute_logger('openerp.plic.ploc')
+        @mute_logger('odoo.plic.ploc')
         def do_stuff():
             blahblah()
 
-        with mute_logger('openerp.foo.bar'):
+        with mute_logger('odoo.foo.bar'):
             do_suff()
 
     """
@@ -1019,7 +1019,7 @@ def dumpstacks(sig=None, frame=None):
         for line in extract_stack(stack):
             code.append(line)
 
-    if openerp.evented:
+    if odoo.evented:
         # code from http://stackoverflow.com/questions/12510648/in-gevent-how-can-i-dump-stack-traces-of-all-running-greenlets
         import gc
         from greenlet import greenlet
diff --git a/odoo/tools/osutil.py b/odoo/tools/osutil.py
index e7cd0dda4b08..af12c6558b23 100644
--- a/odoo/tools/osutil.py
+++ b/odoo/tools/osutil.py
@@ -117,7 +117,7 @@ else:
             CloseHandle(hProcessSnap)
 
     from contextlib import contextmanager
-    from openerp.release import nt_service_name
+    from odoo.release import nt_service_name
 
     def is_running_as_nt_service():
         @contextmanager
diff --git a/odoo/tools/safe_eval.py b/odoo/tools/safe_eval.py
index 2b4a0a07bc74..4d8e5b63d9f3 100644
--- a/odoo/tools/safe_eval.py
+++ b/odoo/tools/safe_eval.py
@@ -23,7 +23,7 @@ import werkzeug
 
 from .misc import ustr
 
-import openerp
+import odoo
 
 unsafe_eval = eval
 
@@ -299,25 +299,25 @@ def safe_eval(expr, globals_dict=None, locals_dict=None, mode="eval", nocopy=Fal
     c = test_expr(expr, _SAFE_OPCODES, mode=mode)
     try:
         return unsafe_eval(c, globals_dict, locals_dict)
-    except openerp.exceptions.except_orm:
+    except odoo.exceptions.except_orm:
         raise
-    except openerp.exceptions.Warning:
+    except odoo.exceptions.Warning:
         raise
-    except openerp.exceptions.RedirectWarning:
+    except odoo.exceptions.RedirectWarning:
         raise
-    except openerp.exceptions.AccessDenied:
+    except odoo.exceptions.AccessDenied:
         raise
-    except openerp.exceptions.AccessError:
+    except odoo.exceptions.AccessError:
         raise
     except werkzeug.exceptions.HTTPException:
         raise
-    except openerp.http.AuthenticationError:
+    except odoo.http.AuthenticationError:
         raise
     except OperationalError:
         # Do not hide PostgreSQL low-level exceptions, to let the auto-replay
         # of serialized transactions work its magic
         raise
-    except openerp.exceptions.MissingError:
+    except odoo.exceptions.MissingError:
         raise
     except Exception, e:
         import sys
diff --git a/odoo/tools/test_reports.py b/odoo/tools/test_reports.py
index ab924b5b4d15..962f84b2ed70 100644
--- a/odoo/tools/test_reports.py
+++ b/odoo/tools/test_reports.py
@@ -7,17 +7,17 @@
     through the code of yaml tests.
 """
 
-import openerp
-import openerp.report
-import openerp.tools as tools
+import odoo
+import odoo.report
+import odoo.tools as tools
 import logging
-from openerp.tools.safe_eval import safe_eval
+from odoo.tools.safe_eval import safe_eval
 from subprocess import Popen, PIPE
 import os
 import tempfile
 
 _logger = logging.getLogger(__name__)
-_test_logger = logging.getLogger('openerp.tests')
+_test_logger = logging.getLogger('odoo.tests')
 
 
 def try_report(cr, uid, rname, ids, data=None, context=None, our_module=None, report_type=None):
@@ -35,7 +35,7 @@ def try_report(cr, uid, rname, ids, data=None, context=None, our_module=None, re
         rname_s = rname
     _test_logger.info("  - Trying %s.create(%r)", rname, ids)
 
-    res = openerp.report.render_report(cr, uid, ids, rname_s, data, context=context)
+    res = odoo.report.render_report(cr, uid, ids, rname_s, data, context=context)
     if not isinstance(res, tuple):
         raise RuntimeError("Result of %s.create() should be a (data,format) tuple, now it is a %s" % \
                                 (rname, type(res)))
@@ -103,7 +103,7 @@ def try_report_action(cr, uid, action_id, active_model=None, active_ids=None,
     context = dict(context or {})
     # TODO context fill-up
 
-    env = openerp.api.Environment(cr, uid, context)
+    env = odoo.api.Environment(cr, uid, context)
 
     def log_test(msg, *args):
         _test_logger.info("  - " + msg, *args)
diff --git a/odoo/tools/translate.py b/odoo/tools/translate.py
index 07531254cf11..845b23c44e1f 100644
--- a/odoo/tools/translate.py
+++ b/odoo/tools/translate.py
@@ -20,11 +20,11 @@ from xml.sax.saxutils import escape
 from babel.messages import extract
 from lxml import etree
 
-import openerp
-from openerp.tools import config
-from openerp.tools.misc import file_open, get_iso_codes, SKIPPED_ELEMENT_TYPES
-from openerp.tools.osutil import walksymlinks
-from openerp import sql_db, SUPERUSER_ID
+import odoo
+from odoo.tools import config
+from odoo.tools.misc import file_open, get_iso_codes, SKIPPED_ELEMENT_TYPES
+from odoo.tools.osutil import walksymlinks
+from odoo import sql_db, SUPERUSER_ID
 
 _logger = logging.getLogger(__name__)
 
@@ -348,7 +348,7 @@ class GettextAlias(object):
         if hasattr(s, 'cr'):
             return s.cr, False
         try:
-            from openerp.http import request
+            from odoo.http import request
             return request.env.cr, False
         except RuntimeError:
             pass
@@ -387,7 +387,7 @@ class GettextAlias(object):
                     lang = s.localcontext.get('lang')
             if not lang:
                 try:
-                    from openerp.http import request
+                    from odoo.http import request
                     lang = request.env.lang
                 except RuntimeError:
                     pass
@@ -399,7 +399,7 @@ class GettextAlias(object):
                 (cr, dummy) = self._get_cr(frame, allow_create=False)
                 uid = self._get_uid(frame)
                 if cr and uid:
-                    env = openerp.api.Environment(cr, uid, {})
+                    env = odoo.api.Environment(cr, uid, {})
                     lang = env['res.users'].context_get()['lang']
         return lang
 
@@ -419,7 +419,7 @@ class GettextAlias(object):
                 cr, is_new_cr = self._get_cr(frame)
                 if cr:
                     # Try to use ir.translation to benefit from global cache if possible
-                    env = openerp.api.Environment(cr, SUPERUSER_ID, {})
+                    env = odoo.api.Environment(cr, SUPERUSER_ID, {})
                     res = env['ir.translation']._get_source(None, ('code','sql_constraint'), lang, source)
                 else:
                     _logger.debug('no context cursor detected, skipping translation for "%r"', source)
@@ -574,7 +574,7 @@ class PoFile(object):
         return trans_type, name, res_id, source, trad, '\n'.join(comments)
 
     def write_infos(self, modules):
-        import openerp.release as release
+        import odoo.release as release
         self.buffer.write("# Translation of %(project)s.\n" \
                           "# This file contains the translation of the following modules:\n" \
                           "%(modules)s" \
@@ -776,7 +776,7 @@ def babel_extract_qweb(fileobj, keywords, comment_tags, options):
 
 
 def trans_generate(lang, modules, cr):
-    env = openerp.api.Environment(cr, SUPERUSER_ID, {})
+    env = odoo.api.Environment(cr, SUPERUSER_ID, {})
     to_translate = set()
 
     def push_translation(module, type, name, id, source, comments=None):
@@ -919,7 +919,7 @@ def trans_generate(lang, modules, cr):
         for m in env['ir.module.module'].search_read([('state', '=', 'installed')], fields=['name'])
     ]
 
-    path_list = [(path, True) for path in openerp.modules.module.ad_paths]
+    path_list = [(path, True) for path in odoo.modules.module.ad_paths]
     # Also scan these non-addon paths
     for bin_path in ['osv', 'report', 'modules', 'service', 'tools']:
         path_list.append((os.path.join(config['root_path'], bin_path), True))
@@ -982,7 +982,7 @@ def trans_generate(lang, modules, cr):
             # QWeb template files
             if fnmatch.fnmatch(root, '*/static/src/xml*'):
                 for fname in fnmatch.filter(files, '*.xml'):
-                    babel_extract_terms(fname, path, root, 'openerp.tools.translate:babel_extract_qweb',
+                    babel_extract_terms(fname, path, root, 'odoo.tools.translate:babel_extract_qweb',
                                         extra_comments=[WEB_TRANSLATION_COMMENT])
             if not recursive:
                 # due to topdown, first iteration is in first level
@@ -1015,7 +1015,7 @@ def trans_load_data(cr, fileobj, fileformat, lang, lang_name=None, verbose=True,
     if verbose:
         _logger.info('loading translation file for language %s', lang)
 
-    env = openerp.api.Environment(cr, SUPERUSER_ID, context or {})
+    env = odoo.api.Environment(cr, SUPERUSER_ID, context or {})
     Lang = env['res.lang']
     Translation = env['ir.translation']
 
@@ -1192,6 +1192,6 @@ def load_language(cr, lang):
     :param lang: language ISO code with optional _underscore_ and l10n flavor (ex: 'fr', 'fr_BE', but not 'fr-BE')
     :type lang: str
     """
-    env = openerp.api.Environment(cr, SUPERUSER_ID, {})
+    env = odoo.api.Environment(cr, SUPERUSER_ID, {})
     installer = env['base.language.install'].create({'lang': lang})
     installer.lang_install()
diff --git a/odoo/tools/yaml_import.py b/odoo/tools/yaml_import.py
index 225c0388f8cb..93394a48f674 100644
--- a/odoo/tools/yaml_import.py
+++ b/odoo/tools/yaml_import.py
@@ -11,12 +11,12 @@ import types
 from lxml import etree
 import yaml
 
-import openerp
+import odoo
 from . import assertion_report
 from . import yaml_tag
 from .config import config
 from .misc import file_open, DEFAULT_SERVER_DATE_FORMAT, DEFAULT_SERVER_DATETIME_FORMAT
-from openerp import SUPERUSER_ID
+from odoo import SUPERUSER_ID
 
 # YAML import needs both safe and unsafe eval, but let's
 # default to /safe/.
@@ -123,7 +123,7 @@ class YamlInterpreter(object):
                              'time': time,
                              'datetime': datetime,
                              'timedelta': timedelta}
-        self.env = openerp.api.Environment(self.cr, self.uid, self.context)
+        self.env = odoo.api.Environment(self.cr, self.uid, self.context)
         self.sudo_env = self.env
 
     def _log(self, *args, **kwargs):
@@ -581,7 +581,7 @@ class YamlInterpreter(object):
             self.uid = self.get_id(node.uid)
         if node.noupdate:
             self.noupdate = node.noupdate
-        self.env = openerp.api.Environment(self.cr, self.uid, self.context)
+        self.env = odoo.api.Environment(self.cr, self.uid, self.context)
         self.sudo_env = self.env(user=SUPERUSER_ID)
 
     def process_python(self, node):
@@ -603,7 +603,7 @@ class YamlInterpreter(object):
             'uid': self.uid,
             'log': self._log,
             'context': self.context,
-            'openerp': openerp,
+            'openerp': odoo,
         }
         try:
             code_obj = compile(statements, self.filename, 'exec')
@@ -684,7 +684,7 @@ class YamlInterpreter(object):
         else:
             args = self._eval_params(function.model, params)
         # this one still depends on the old API
-        return openerp.api.call_kw(model, function.name, args, {})
+        return odoo.api.call_kw(model, function.name, args, {})
 
     def _set_group_values(self, node, values):
         if node.groups:
diff --git a/odoo/workflow/__init__.py b/odoo/workflow/__init__.py
index 752f7e54beaa..033b8347ad16 100644
--- a/odoo/workflow/__init__.py
+++ b/odoo/workflow/__init__.py
@@ -1,9 +1,9 @@
 # -*- coding: utf-8 -*-
 # Part of Odoo. See LICENSE file for full copyright and licensing details.
 
-from openerp.workflow.service import WorkflowService
+from odoo.workflow.service import WorkflowService
 
-# The new API is in openerp.workflow.workflow_service
+# The new API is in odoo.workflow.workflow_service
 # OLD API of the Workflow
 
 def clear_cache(cr, uid):
diff --git a/odoo/workflow/helpers.py b/odoo/workflow/helpers.py
index 8350259c4525..669c2dbc4439 100644
--- a/odoo/workflow/helpers.py
+++ b/odoo/workflow/helpers.py
@@ -1,8 +1,8 @@
-import openerp.sql_db
+import odoo.sql_db
 
 class Session(object):
     def __init__(self, cr, uid):
-        assert isinstance(cr, openerp.sql_db.Cursor)
+        assert isinstance(cr, odoo.sql_db.Cursor)
         assert isinstance(uid, (int, long))
         self.cr = cr
         self.uid = uid
diff --git a/odoo/workflow/instance.py b/odoo/workflow/instance.py
index 7baf6fddf883..730ae9ccf52a 100644
--- a/odoo/workflow/instance.py
+++ b/odoo/workflow/instance.py
@@ -1,9 +1,9 @@
 # -*- coding: utf-8 -*-
 # Part of Odoo. See LICENSE file for full copyright and licensing details.
 import workitem
-from openerp.workflow.helpers import Session
-from openerp.workflow.helpers import Record
-from openerp.workflow.workitem import WorkflowItem
+from odoo.workflow.helpers import Session
+from odoo.workflow.helpers import Record
+from odoo.workflow.workitem import WorkflowItem
 
 class WorkflowInstance(object):
     def __init__(self, session, record, values):
diff --git a/odoo/workflow/service.py b/odoo/workflow/service.py
index ea64f8103b6b..3aeca7b6a1a5 100644
--- a/odoo/workflow/service.py
+++ b/odoo/workflow/service.py
@@ -3,7 +3,7 @@
 from helpers import Session
 from helpers import Record
 
-from openerp.workflow.instance import WorkflowInstance
+from odoo.workflow.instance import WorkflowInstance
 # import instance
 
 
diff --git a/odoo/workflow/workitem.py b/odoo/workflow/workitem.py
index 8affdd7a8a16..cfa07bc8b5de 100644
--- a/odoo/workflow/workitem.py
+++ b/odoo/workflow/workitem.py
@@ -8,14 +8,14 @@
 import logging
 import instance
 
-from openerp.workflow.helpers import Session
-from openerp.workflow.helpers import Record
-from openerp.workflow.helpers import WorkflowActivity
+from odoo.workflow.helpers import Session
+from odoo.workflow.helpers import Record
+from odoo.workflow.helpers import WorkflowActivity
 
 logger = logging.getLogger(__name__)
 
-import openerp
-from openerp.tools.safe_eval import safe_eval
+import odoo
+from odoo.tools.safe_eval import safe_eval
 
 class Environment(dict):
     """
@@ -34,7 +34,7 @@ class Environment(dict):
         self.ids = [record.id]
 
     def __getitem__(self, key):
-        env = openerp.api.Environment(self.cr, self.uid, {})
+        env = odoo.api.Environment(self.cr, self.uid, {})
         records = env[self.model].browse(self.ids)
         if hasattr(records, key):
             return getattr(records, key)
@@ -282,7 +282,7 @@ class WorkflowItem(object):
             'active_id': self.record.id,
             'active_ids': [self.record.id]
         }
-        env = openerp.api.Environment(self.session.cr, self.session.uid, context)
+        env = odoo.api.Environment(self.session.cr, self.session.uid, context)
         action = env['ir.actions.server'].browse(activity['action_id'])
         result = action.run()
         return result
@@ -305,8 +305,8 @@ class WorkflowItem(object):
         if transition['signal'] and signal != transition['signal']:
             return False
 
-        if self.session.uid != openerp.SUPERUSER_ID and transition['group_id']:
-            env = openerp.api.Environment(self.session.cr, self.session.uid, {})
+        if self.session.uid != odoo.SUPERUSER_ID and transition['group_id']:
+            env = odoo.api.Environment(self.session.cr, self.session.uid, {})
             user_groups = env.user.groups_id
             if transition['group_id'] not in user_groups.ids:
                 return False
diff --git a/openerp-gevent b/openerp-gevent
index 55044976492f..1514cb53fbbd 100755
--- a/openerp-gevent
+++ b/openerp-gevent
@@ -5,7 +5,7 @@ gevent.monkey.patch_all()
 import psycogreen.gevent
 psycogreen.gevent.patch_psycopg()
 
-import openerp
+import odoo
 
 if __name__ == "__main__":
-    openerp.cli.main()
+    odoo.cli.main()
diff --git a/openerp-server b/openerp-server
index 2a7a87f99362..c417b226d871 100755
--- a/openerp-server
+++ b/openerp-server
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
-import openerp
+import odoo
 
 if __name__ == "__main__":
-    openerp.cli.main()
+    odoo.cli.main()
 
diff --git a/openerp-wsgi.py b/openerp-wsgi.py
index a1d7180ccfbe..7bc9c7f95e56 100644
--- a/openerp-wsgi.py
+++ b/openerp-wsgi.py
@@ -10,18 +10,18 @@
 #
 # For gunicorn additional globals need to be defined in the Gunicorn section.
 # Then the following command should run:
-#   $ gunicorn openerp:service.wsgi_server.application -c openerp-wsgi.py
+#   $ gunicorn odoo:service.wsgi_server.application -c openerp-wsgi.py
 
-import openerp
+import odoo
 
 #----------------------------------------------------------
 # Common
 #----------------------------------------------------------
-openerp.multi_process = True # Nah!
+odoo.multi_process = True # Nah!
 
 # Equivalent of --load command-line option
-openerp.conf.server_wide_modules = ['web']
-conf = openerp.tools.config
+odoo.conf.server_wide_modules = ['web']
+conf = odoo.tools.config
 
 # Path to the OpenERP Addons repository (comma-separated for
 # multiple locations)
@@ -38,9 +38,9 @@ conf['addons_path'] = '../../addons/trunk,../../web/trunk/addons'
 #----------------------------------------------------------
 # Generic WSGI handlers application
 #----------------------------------------------------------
-application = openerp.service.wsgi_server.application
+application = odoo.service.wsgi_server.application
 
-openerp.service.server.load_server_wide_modules()
+odoo.service.server.load_server_wide_modules()
 
 #----------------------------------------------------------
 # Gunicorn
-- 
GitLab