Always add email subject for issue692

This commit is contained in:
Cédric Krier committed 2008-12-20 21:52:01 +01:00
1 parent 9017f74a90
commit 2dcc33260b
2 files changed
+6 -4

No files matched your search

+3 -2
View File
@@ -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 \
+3 -2
View File
@@ -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,