[FIX] orm deprecated: added a list cast because we may receive tuples (as seen on runbot).

bzr revid: tde@openerp.com-20120814094142-b79hn5xgduhc7w15
This commit is contained in:
Thibault Delavallée 2012-08-14 11:41:42 +02:00
parent 7c0a0a0158
commit e4185c910f
1 changed files with 2 additions and 1 deletions

View File

@ -3598,7 +3598,8 @@ class BaseModel(object):
record[f] = []
# Warn about deprecated fields now that fields_pre and fields_post are computed
for f in fields_pre + fields_post:
# Explicitly use list() because we may receive tuples
for f in list(fields_pre) + list(fields_post):
field_column = self._all_columns.get(f) and self._all_columns.get(f).column
if field_column and field_column.deprecated:
_logger.warning('Field %s.%s is deprecated: %s', self._name, f, field_column.deprecated)