KERNEL: allow directory for import csv
authorced <>
Thu, 22 Feb 2007 08:46:46 +0000 (08:46 +0000)
committerced <>
Thu, 22 Feb 2007 08:46:46 +0000 (08:46 +0000)
bzr revid: ced-f4c6b454af6e330b5750d309649d77787de26e43

bin/tools/convert.py

index ba20880..3fb2c58 100644 (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)