From d574c82f915b5c18236251ec11a37ea18ec0d52f Mon Sep 17 00:00:00 2001 From: Raphael Collet Date: Tue, 12 Dec 2017 16:17:46 +0100 Subject: [PATCH] [FIX] base: `ir.ui.view` field names in attributes Make sure that `True`, `False` and `None` are not considered as field names. --- odoo/addons/base/ir/ir_ui_view.py | 19 ++++++++++++++++--- 1 file 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