[FIX] base: ir.ui.view field names in attributes

Make sure that `True`, `False` and `None` are not considered as field names.
This commit is contained in:
Raphael Collet
2017-12-12 17:06:51 +01:00
parent 24a9d1dee5
commit d574c82f91
+16 -3
View File
@@ -872,9 +872,22 @@ actual arch.
def get_attrs_symbols(self):
""" Return a set of predefined symbols for evaluating attrs. """
return {'self', 'parent', 'id', 'uid', 'context', 'context_today',
'active_id', 'active_ids', 'active_model',
'time', 'datetime', 'relativedelta', 'current_date'}
return {
'True', 'False', 'None', # those are identifiers in Python 2.7
'self',
'parent',
'id',
'uid',
'context',
'context_today',
'active_id',
'active_ids',
'active_model',
'time',
'datetime',
'relativedelta',
'current_date',
}
def get_attrs_field_names(self, arch):
""" Retrieve the field names appearing in context, domain and attrs, and