Fix use always basename for cvs file
bzr revid: ced-34ee218daf98b14b55c6c5a7615459c0fbf0cfb0
This commit is contained in:
parent
bee04b3198
commit
0885c78c25
|
@ -194,7 +194,7 @@ def load_module_graph(cr, graph, status={}):
|
||||||
logger.notifyChannel('init', netsvc.LOG_INFO, 'addon:%s:loading %s' % (m, filename))
|
logger.notifyChannel('init', netsvc.LOG_INFO, 'addon:%s:loading %s' % (m, filename))
|
||||||
name, ext = os.path.splitext(filename)
|
name, ext = os.path.splitext(filename)
|
||||||
if ext == '.csv':
|
if ext == '.csv':
|
||||||
tools.convert_csv_import(cr, m, filename, tools.file_open(opj(m, filename)).read(), idref, mode=mode)
|
tools.convert_csv_import(cr, m, os.path.basename(filename), tools.file_open(opj(m, filename)).read(), idref, mode=mode)
|
||||||
elif ext == '.sql':
|
elif ext == '.sql':
|
||||||
queries = tools.file_open(opj(m, filename)).read().split(';')
|
queries = tools.file_open(opj(m, filename)).read().split(';')
|
||||||
for query in queries:
|
for query in queries:
|
||||||
|
|
Loading…
Reference in New Issue