[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:
parent
7c0a0a0158
commit
e4185c910f
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue