[FIX] caldav: fix

bzr revid: hmo@tinyerp.com-20100911114442-egfc63paqr93rdpc
This commit is contained in:
Harry (OpenERP) 2010-09-11 17:14:42 +05:30
parent 44963c74f5
commit 8431b70597
1 changed files with 2 additions and 0 deletions

View File

@ -186,6 +186,8 @@ def map_data(cr, uid, obj, context=None):
if field_type == 'selection':
if not map_val:
continue
if type(map_val) == list and len(map_val): #TOFIX: why need to check this
map_val = map_val[0]
mapping = obj.__attribute__[map_dict].get('mapping', False)
if mapping:
map_val = mapping.get(map_val.lower(), False)