[FIX] Store the string type function field (patch from Xavier ALT (AJM))

lp bug: https://launchpad.net/bugs/318543 fixed

bzr revid: stephane@tinyerp.com-20090119101201-20n79r2agfo03w36
This commit is contained in:
Stephane Wirtel 2009-01-19 11:12:01 +01:00
parent 7e4e42c34a
commit f987f9cccb
1 changed files with 2 additions and 0 deletions

View File

@ -281,6 +281,8 @@ def get_pg_type(f):
f_type = ('float8', 'DOUBLE PRECISION')
elif isinstance(f, fields.function) and f._type == 'selection':
f_type = ('text', 'text')
elif isinstance(f, fields.function) and f._type == 'char':
f_type = ('varchar', 'VARCHAR(%d)' % (f.size))
else:
logger = netsvc.Logger()
logger.notifyChannel("init", netsvc.LOG_WARNING, '%s type not supported!' % (type(f)))