[FIX] import of boolean fields in csv files.
lp bug: https://launchpad.net/bugs/415257 fixed lp bug: https://launchpad.net/bugs/406945 fixed bzr revid: christophe@tinyerp.com-20090818154334-blcft3nkwidckjz3
This commit is contained in:
parent
e036492669
commit
eb15785f7b
|
@ -662,7 +662,7 @@ class orm_template(object):
|
|||
if fields_def[field[len(prefix)]]['type'] == 'integer':
|
||||
res = line[i] and int(line[i])
|
||||
elif fields_def[field[len(prefix)]]['type'] == 'boolean':
|
||||
res = line[i] and bool(line[i])
|
||||
res = line[i].lower() not in ('0', 'false', 'off')
|
||||
elif fields_def[field[len(prefix)]]['type'] == 'float':
|
||||
res = line[i] and float(line[i])
|
||||
elif fields_def[field[len(prefix)]]['type'] == 'selection':
|
||||
|
|
Loading…
Reference in New Issue