From 2dcc33260bd6b1cb3ec095b1b5a6af48e1361d02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sat, 20 Dec 2008 21:52:01 +0100 Subject: [PATCH] Always add email subject for issue692 --- tryton/gui/window/view_form/view/form.py | 5 +++-- tryton/gui/window/view_form/view/list.py | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/tryton/gui/window/view_form/view/form.py b/tryton/gui/window/view_form/view/form.py index 472400708b..f2f5a78be3 100644 --- a/tryton/gui/window/view_form/view/form.py +++ b/tryton/gui/window/view_form/view/form.py @@ -152,12 +152,13 @@ class ViewForm(ParserView): message(_('You must save this record ' \ 'to use the action button!'), self.window) return False + email = {} if 'email' in action: email = self.screen.current_model.expr_eval(action['email']) if not email: email = {} - email['subject'] = action['name'].replace('_', '') - act['email'] = email + email['subject'] = action['name'].replace('_', '') + act['email'] = email self.screen.display() if atype == 'relate': obj_id = self.screen.current_model \ diff --git a/tryton/gui/window/view_form/view/list.py b/tryton/gui/window/view_form/view/list.py index 0eb7648e84..2a432cb8be 100644 --- a/tryton/gui/window/view_form/view/list.py +++ b/tryton/gui/window/view_form/view/list.py @@ -260,12 +260,13 @@ class ViewList(ParserView): if not obj_ids and not obj_id: message(_('No record selected!'), self.window) return False + email = {} if 'email' in action: email = self.screen.current_model.expr_eval(action['email']) if not email: email = {} - email['subject'] = action['name'].replace('_', '') - act['email'] = email + email['subject'] = action['name'].replace('_', '') + act['email'] = email data = { 'model': self.screen.name, 'id': obj_id,