KERNEL: allow directory for import csv

bzr revid: ced-f4c6b454af6e330b5750d309649d77787de26e43
This commit is contained in:
ced 2007-02-22 08:46:46 +00:00
parent c1c8fe6454
commit 071fd71878
1 changed files with 5 additions and 0 deletions

View File

@ -6,6 +6,7 @@ import StringIO,xml.dom.minidom
import osv,ir,pooler
import csv
import os.path
from config import config
@ -377,6 +378,10 @@ def convert_csv_import(cr, module, fname, csvcontent, idref={}, mode='init'):
return
model = ('.'.join(fname.split('.')[:-1]).split('-'))[0]
#model = fname.split('.')[0].replace('_', '.')
#remove folder path from model
head, model = os.path.split(model)
pool = pooler.get_pool(cr.dbname)
# pool = osv.osv.FakePool(module)