# if we already have a value, don't recompute it.
# This happen if case of stored many2one fields
if values and not multi and name in values[0]:
- result = {v['id']: v[name] for v in values}
+ result = dict((v['id'], v[name]) for v in values)
elif values and multi and all(n in values[0] for n in name):
- result = {v['id']: dict((n, v[n]) for n in name) for v in values}
+ result = dict((v['id'], dict((n, v[n]) for n in name)) for v in values)
else:
result = self._fnct(obj, cr, uid, ids, name, self._arg, context)
for id in ids:
def get_module_paths():
# default addons path (base)
def_path = os.path.abspath(os.path.join(config.config['root_path'], 'addons'))
- mod_paths = { def_path }
+ mod_paths = set([ def_path ])
ad_paths = map(lambda m: os.path.abspath(m.strip()),config.config['addons_path'].split(','))
for adp in ad_paths:
mod_paths.add(adp)
mod_paths.add(adp)
elif adp != def_path and adp.startswith(def_path):
mod_paths.add(adp[len(def_path)+1:])
- return mod_paths
+ return list(mod_paths)
def get_module_from_path(path, mod_paths):
for mp in mod_paths: