Fix use always basename for cvs file

bzr revid: ced-34ee218daf98b14b55c6c5a7615459c0fbf0cfb0
This commit is contained in:
ced 2007-01-25 15:23:10 +00:00
parent bee04b3198
commit 0885c78c25
1 changed files with 1 additions and 1 deletions

View File

@ -194,7 +194,7 @@ def load_module_graph(cr, graph, status={}):
logger.notifyChannel('init', netsvc.LOG_INFO, 'addon:%s:loading %s' % (m, filename))
name, ext = os.path.splitext(filename)
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':
queries = tools.file_open(opj(m, filename)).read().split(';')
for query in queries: