[FIX] Custom field may not be found on the first go
authorJay (OpenERP) <jvo@tinyerp.com>
Mon, 6 Sep 2010 14:45:15 +0000 (20:15 +0530)
committerJay (OpenERP) <jvo@tinyerp.com>
Mon, 6 Sep 2010 14:45:15 +0000 (20:15 +0530)
bzr revid: jvo@tinyerp.com-20100906144515-3seeoz8hmbwzlode

bin/osv/orm.py

index 5344cfe..86d6a27 100644 (file)
@@ -386,7 +386,7 @@ class orm_template(object):
                 if context.get('field_name','') == k:
                     vals['select_level'] = context.get('select','0')
                 #setting value to let the problem NOT occur next time
-                else:
+                elif k in cols:
                     vals['select_level'] = cols[k]['select_level']
             
             if k not in cols: