Example #1
0
def get_environment(session, model_name, backend_id):
    """ Create an environment to work with.  """
    backend_record = session.browse('icops.backend', backend_id)
    env = Environment(backend_record, session, model_name)
    lang_code = 'en_US'
    env.set_lang(code=lang_code)
    return env
Example #2
0
def get_environment(session, model_name, backend_id):
    """ Create an environment to work with.  """
    backend_record = session.browse('magento.backend', backend_id)
    env = Environment(backend_record, session, model_name)
    lang = backend_record.default_lang_id
    lang_code = lang.code if lang else 'en_US'
    env.set_lang(code=lang_code)
    return env
Example #3
0
def get_environment(session, model_name, backend_id):
    """ Create an environment to work with.  """
    backend_record = session.browse('highjump.backend', backend_id)
    env = Environment(backend_record, session, model_name)
    lang = backend_record.default_lang_id
    lang_code = lang.code if lang else 'en_US'
    env.set_lang(code=lang_code)
    return env
Example #4
0
def get_environment(session, backend_id):
    """ Create an environment to work with. """
    backend_record = session.browse('taktik.importer.backend', backend_id)
    env = Environment(backend_record, session, 'taktik.importer.model')
    env.set_lang(code='en_US')
    return env
Example #5
0
def get_environment(session, model_name, backend_id):
    """ Create an environment to work with. """
    backend_record = session.browse('civicrm.backend', backend_id)
    env = Environment(backend_record, session, model_name)
    env.set_lang(code='nl_NL')
    return env
def get_environment(session, model_name, backend_id):
    """ Create an environment to work with. """
    backend_record = session.browse('civicrm.backend', backend_id)
    env = Environment(backend_record, session, model_name)
    env.set_lang(code='nl_NL')
    return env