From 5a8c313cc1dc045f55fceceff889e5a9f3625ed8 Mon Sep 17 00:00:00 2001 From: Sergi Almacellas Abellana Date: Thu, 13 Oct 2016 17:05:55 +0200 Subject: [PATCH] Use the same src text for boolean in ScreenContainer and in DomainParser Otherwise the translated value may return a different value and then it's comparison will fail. issue5904 review30541002 --- tryton/common/domain_parser.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tryton/common/domain_parser.py b/tryton/common/domain_parser.py index 2d6758c2e3..eb071104d6 100644 --- a/tryton/common/domain_parser.py +++ b/tryton/common/domain_parser.py @@ -232,7 +232,8 @@ def convert_value(field, value, context=None): def convert_boolean(): if isinstance(value, basestring): return any(test.decode('utf-8').lower().startswith(value.lower()) - for test in (_('y'), _('yes'), _('true'), _('t'), '1')) + for test in ( + _('y'), _('Yes'), _('True'), _('t'), '1')) else: return bool(value)