From afce1a29aec2b9dfcec5ab918ed200429bfcc768 Mon Sep 17 00:00:00 2001 From: Sergi Almacellas Abellana Date: Wed, 8 Jun 2016 10:08:03 +0200 Subject: [PATCH] Return the calling keyword in get_keywords issue5612 review22081002 --- CHANGELOG | 1 + trytond/ir/action.py | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index b6d8eea971..9b4edc16c8 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,4 @@ +* Return the calling keyword in ActionKeyword.get_keywords * Add customizable login process * Allow to customize the substitutions used on sequence * Allow PYSON in tree_invisible attribute diff --git a/trytond/ir/action.py b/trytond/ir/action.py index 40970b09a4..275fde50a5 100644 --- a/trytond/ir/action.py +++ b/trytond/ir/action.py @@ -227,7 +227,9 @@ class ActionKeyword(ModelSQL, ModelView): type_ = action_keyword.action.type types[type_].append(action_keyword.action.id) for type_, action_ids in types.iteritems(): - keywords.extend(Action.get_action_values(type_, action_ids)) + for value in Action.get_action_values(type_, action_ids): + value['keyword'] = keyword + keywords.append(value) keywords.sort(key=itemgetter('name')) cls._get_keyword_cache.set(key, keywords) return keywords