From 511e78e6faa7d00b279aaf1d7f20d9dabc050676 Mon Sep 17 00:00:00 2001 From: Albert Cervera i Areny Date: Tue, 5 Mar 2013 00:15:03 +0100 Subject: [PATCH] Consider that reference fields may be of tuple type in menu. review699002 --- trytond/ir/ui/menu.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/trytond/ir/ui/menu.py b/trytond/ir/ui/menu.py index e0a253e0a0..3f5b9fa575 100644 --- a/trytond/ir/ui/menu.py +++ b/trytond/ir/ui/menu.py @@ -220,7 +220,10 @@ class UIMenu(ModelSQL, ModelView): if action_keywords: with Transaction().set_context(_timestamp=False): ActionKeyword.delete(action_keywords) - action_type, action_id = value.split(',') + if isinstance(value, basestring): + action_type, action_id = value.split(',') + else: + action_type, action_id = value if not int(action_id): return Action = pool.get(action_type)