diff options
| author | Jay (Open ERP) <jvo@tinyerp.com> | 2010-07-29 00:04:47 +0530 |
|---|---|---|
| committer | Jay (Open ERP) <jvo@tinyerp.com> | 2010-07-29 00:04:47 +0530 |
| commit | af6d826facac8bae1eacf2d1654bd35ee8a8b173 (patch) | |
| tree | f34361051d1602e9cbd00ace9459072319ad31dc /bin/addons/__init__.py | |
| parent | dfcd25ff4d4c2418f2793cc7c7a6699dc2e81296 (diff) | |
[FIX] __init__.py corrected for processing of .sql files
lp bug: https://launchpad.net/bugs/610938 fixed
bzr revid: jvo@tinyerp.com-20100728183447-vx9nmxlodo62jvfp
Diffstat (limited to 'bin/addons/__init__.py')
| -rw-r--r-- | bin/addons/__init__.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/addons/__init__.py b/bin/addons/__init__.py index c8ef1719b3a..320e689984a 100644 --- a/bin/addons/__init__.py +++ b/bin/addons/__init__.py @@ -590,7 +590,7 @@ log = logging.getLogger('init') def load_module_graph(cr, graph, status=None, perform_checks=True, **kwargs): - def process_sql_file(cr, file): + def process_sql_file(cr, fp): queries = fp.read().split(';') for query in queries: new_query = ' '.join(query.split()) @@ -655,7 +655,7 @@ def load_module_graph(cr, graph, status=None, perform_checks=True, **kwargs): file = tools.file_open(pathname) # TODO manage .csv file with noupdate == (kind == 'init') if ext == '.sql': - process_sql_file(cr, fp) + process_sql_file(cr, file) elif ext == '.csv': noupdate = (kind == 'init') tools.convert_csv_import(cr, module_name, pathname, file.read(), id_map, mode, noupdate) |
