def load_openerp_module(module_name):
 global loaded
 if (module_name in loaded):
  return
 initialize_sys_path()
 try:
  __import__(('odoo.addons.' + module_name))
  info = load_information_from_description_file(module_name)
  if info['post_load']:
   getattr(sys.modules[('odoo.addons.' + module_name)], info['post_load'])()
 except Exception as e:
  msg = ("Couldn't load module %s" % module_name)
  _logger.critical(msg)
  _logger.critical(e)
  raise
 else:
  loaded.append(module_name)

def load_openerp_module ( module_name ) : global loaded if ( module_name in loaded ) : return initialize_sys_path ( ) try : __import__ ( ( 'odoo.addons.' + module_name ) ) info = load_information_from_description_file ( module_name ) if info [ 'post_load' ] : getattr ( sys . modules [ ( 'odoo.addons.' + module_name ) ] , info [ 'post_load' ] ) ( ) except Exception as e : msg = ( "Couldn't load module %s" % module_name ) _logger . critical ( msg ) _logger . critical ( e ) raise else : loaded . append ( module_name )
load an openerp module .