From cdfd5911adfddd72be328a3f84b1db809e1e1443 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 8 Oct 2008 11:17:00 +0200 Subject: [PATCH] Fix selection to use unicode keys and set str in gtk for issue422 --- tryton/common/common.py | 2 +- tryton/plugin.py | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/tryton/common/common.py b/tryton/common/common.py index ac0e47c1a4..cf8c6ed85d 100644 --- a/tryton/common/common.py +++ b/tryton/common/common.py @@ -156,7 +156,7 @@ def selection(title, values, parent, alwaysask=False): keys = values.keys() keys.sort() for val in keys: - model.append([val]) + model.append([str(val)]) sel_tree.set_model(model) sel_tree.connect('row-activated', diff --git a/tryton/plugin.py b/tryton/plugin.py index 3edd2f21af..eb34a49727 100644 --- a/tryton/plugin.py +++ b/tryton/plugin.py @@ -21,8 +21,6 @@ def execute(datas, parent): for module in MODULES: try: for name, func in module.get_plugins(datas['model']): - # Use str as key to use in the ListStore of common.selection - name = name.encode('utf-8') result[name] = func except Exception, exception: continue