Use new pyson_email on report

This commit is contained in:
Cédric Krier committed 2011-03-22 12:07:16 +01:00
1 parent 693ddd4859
commit 1de4f131f0
2 files changed
+5 -4

No files matched your search

+3 -2
View File
@@ -121,8 +121,9 @@ class ViewForm(ParserView):
'to be able to use the action button!'), self.window)
return False
email = {}
if 'email' in action:
email = self.screen.current_record.expr_eval(action['email'])
if 'pyson_email' in action:
email = self.screen.current_record.expr_eval(
action['pyson_email'])
if not email:
email = {}
email['subject'] = action['name'].replace('_', '')
+2 -2
View File
@@ -285,8 +285,8 @@ class ViewList(ParserView):
message(_('No record selected!'), self.window)
return False
email = {}
if action.get('email'):
email = self.screen.current_record.expr_eval(action['email'])
if action.get('pyson_email'):
email = self.screen.current_record.expr_eval(action['pyson_email'])
if not email:
email = {}
email['subject'] = action['name'].replace('_', '')