Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Hamza
erp5
Commits
c68d253f
Commit
c68d253f
authored
Dec 15, 2017
by
Nicolas Wavrant
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_base: create an Internet Message Post whenever an Email is sent
parent
958f600b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
3 deletions
+32
-3
bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Entity_sendEmail.py
...inTemplateItem/portal_skins/erp5_base/Entity_sendEmail.py
+15
-1
bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/MailMessage_send.py
...inTemplateItem/portal_skins/erp5_base/MailMessage_send.py
+17
-2
No files found.
bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Entity_sendEmail.py
View file @
c68d253f
...
@@ -29,4 +29,18 @@ mail_message = portal.Base_createMailMessageAsString(
...
@@ -29,4 +29,18 @@ mail_message = portal.Base_createMailMessageAsString(
embedded_file_list
=
embedded_file_list
,
embedded_file_list
=
embedded_file_list
,
extra_header_dict
=
extra_header_dict
)
extra_header_dict
=
extra_header_dict
)
event
.
sendMailHostMessage
(
mail_message
)
internet_message_post_module
=
portal
.
getDefaultModuleValue
(
'Internet Message Post'
,
None
)
if
internet_message_post_module
is
not
None
:
# erp5_interface_post is installed, so it is needed to track outgoing emails
internet_message_post
=
internet_message_post_module
.
newContent
(
portal_type
=
'Internet Message Post'
,
title
=
"Internet Message for %s"
%
event
.
getTitle
(),
reference
=
event
.
getReference
(),
data
=
mail_message
,
)
internet_message_post
.
allowExport
()
event_aggregate_list
=
event
.
getAggregateList
()
event_aggregate_list
.
append
(
internet_message_post
.
getRelativeUrl
())
event
.
setAggregateList
(
event_aggregate_list
)
else
:
event
.
sendMailHostMessage
(
mail_message
)
bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/MailMessage_send.py
View file @
c68d253f
...
@@ -79,6 +79,21 @@ if download or not use_activity:
...
@@ -79,6 +79,21 @@ if download or not use_activity:
embedded_file_list
=
embedded_file_list
,
embedded_file_list
=
embedded_file_list
,
extra_header_dict
=
extra_header_dict
)
extra_header_dict
=
extra_header_dict
)
internet_message_post_module
=
portal
.
getDefaultModuleValue
(
'Internet Message Post'
,
None
)
if
internet_message_post_module
is
not
None
:
# erp5_interface_post is installed, so it is needed to track outgoing emails
internet_message_post
=
internet_message_post_module
.
newContent
(
portal_type
=
'Internet Message Post'
,
title
=
"Internet Message for %s"
%
context
.
getTitle
(),
reference
=
context
.
getReference
(),
data
=
mail_message
,
)
internet_message_post
.
allowExport
()
mail_aggregate_list
=
context
.
getAggregateList
()
mail_aggregate_list
.
append
(
internet_message_post
.
getRelativeUrl
())
context
.
setAggregateList
(
mail_aggregate_list
)
else
:
if
not
use_activity
:
if
not
use_activity
:
context
.
activate
(
activity
=
'SQLQueue'
).
sendMailHostMessage
(
mail_message
)
context
.
activate
(
activity
=
'SQLQueue'
).
sendMailHostMessage
(
mail_message
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment