diff options
| author | Raphael Collet <rco@odoo.com> | 2017-12-12 16:17:46 +0100 |
|---|---|---|
| committer | Raphael Collet <rco@odoo.com> | 2017-12-12 17:06:51 +0100 |
| commit | d574c82f915b5c18236251ec11a37ea18ec0d52f (patch) | |
| tree | e45ede1dba5645e3e26686e75b6bbd6b26765fec | |
| parent | 24a9d1dee544a0df8ace3f4e5d39cd7b277ae246 (diff) | |
[FIX] base: `ir.ui.view` field names in attributes
Make sure that `True`, `False` and `None` are not considered as field names.
| -rw-r--r-- | odoo/addons/base/ir/ir_ui_view.py | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/odoo/addons/base/ir/ir_ui_view.py b/odoo/addons/base/ir/ir_ui_view.py index 69398b1250a..1c76eaacec7 100644 --- a/odoo/addons/base/ir/ir_ui_view.py +++ b/odoo/addons/base/ir/ir_ui_view.py @@ -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 |
