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
Paul Graydon
erp5
Commits
66986320
Commit
66986320
authored
Nov 20, 2018
by
Jérome Perrin
Committed by
Aurel
Nov 20, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
deferred_style: minor style changes
parent
97135d13
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
9 deletions
+6
-9
bt5/erp5_deferred_style/SkinTemplateItem/portal_skins/erp5_deferred_style_core/ERP5Site_notifyReportComplete.py
...erp5_deferred_style_core/ERP5Site_notifyReportComplete.py
+6
-9
No files found.
bt5/erp5_deferred_style/SkinTemplateItem/portal_skins/erp5_deferred_style_core/ERP5Site_notifyReportComplete.py
View file @
66986320
from
Products.PythonScripts.standard
import
newline_to_br
,
html_quote
portal
=
context
.
getPortalObject
()
portal
=
context
.
getPortalObject
()
prefs
=
portal
.
portal_preferences
prefs
=
portal
.
portal_preferences
report_item_list
=
[]
report_item_list
=
[]
from
Products.PythonScripts.standard
import
newline_to_br
,
html_quote
message_text_format
=
"text/plain"
message_text_format
=
"text/plain"
if
prefs
.
getPreferredDeferredReportStoredAsDocument
():
if
prefs
.
getPreferredDeferredReportStoredAsDocument
():
...
@@ -11,12 +11,10 @@ if prefs.getPreferredDeferredReportStoredAsDocument():
...
@@ -11,12 +11,10 @@ if prefs.getPreferredDeferredReportStoredAsDocument():
publication_section
=
prefs
.
getPreferredDeferredReportPublicationSection
(),
publication_section
=
prefs
.
getPreferredDeferredReportPublicationSection
(),
classification
=
prefs
.
getPreferredDeferredReportClassification
(),
classification
=
prefs
.
getPreferredDeferredReportClassification
(),
filename
=
attachment
[
'name'
],
filename
=
attachment
[
'name'
],
#title=attachment['name'],
)
)
document
.
share
()
document
.
share
()
report_item_list
.
append
(
report_item_list
.
append
(
(
attachment
.
get
(
'title'
,
document
.
getStandardFilename
(
format
=
format
)),
#attachment['name']),
(
attachment
.
get
(
'title'
,
document
.
getStandardFilename
(
format
=
format
)),
document
.
getRelativeUrl
()))
document
.
getRelativeUrl
()))
url_base
=
portal
.
ERP5Site_getAbsoluteUrl
()
url_base
=
portal
.
ERP5Site_getAbsoluteUrl
()
report_url_text
=
'<br/>'
.
join
([
report_url_text
=
'<br/>'
.
join
([
...
@@ -29,19 +27,18 @@ if prefs.getPreferredDeferredReportStoredAsDocument():
...
@@ -29,19 +27,18 @@ if prefs.getPreferredDeferredReportStoredAsDocument():
notification_message
=
portal
.
portal_notifications
.
getDocumentValue
(
reference
=
notification_message_reference
)
notification_message
=
portal
.
portal_notifications
.
getDocumentValue
(
reference
=
notification_message_reference
)
if
notification_message
is
None
:
if
notification_message
is
None
:
raise
ValueError
(
'Notification message not found by %r'
%
prefs
.
getPreferredDeferredReportNotificationMessageReference
())
raise
ValueError
(
'Notification message not found by %r'
%
prefs
.
getPreferredDeferredReportNotificationMessageReference
())
notification_mapping_dict
=
{
notification_mapping_dict
=
{
'report_link_list'
:
report_url_text
,
'report_link_list'
:
report_url_text
,
}
}
if
notification_message
.
getContentType
()
==
"text/html"
:
if
notification_message
.
getContentType
()
==
"text/html"
:
message
=
notification_message
.
asEntireHTML
(
message
=
notification_message
.
asEntireHTML
(
safe_substitute
=
False
,
safe_substitute
=
False
,
substitution_method_parameter_dict
=
{
'mapping_dict'
:
notification_mapping_dict
})
substitution_method_parameter_dict
=
{
'mapping_dict'
:
notification_mapping_dict
})
else
:
else
:
message_text_format
=
"text/plain"
message_text_format
=
"text/plain"
message
=
notification_message
.
asText
(
message
=
notification_message
.
asText
(
safe_substitute
=
False
,
safe_substitute
=
False
,
substitution_method_parameter_dict
=
{
'mapping_dict'
:
notification_mapping_dict
})
substitution_method_parameter_dict
=
{
'mapping_dict'
:
notification_mapping_dict
})
portal
.
portal_notifications
.
activate
(
activity
=
'SQLQueue'
).
sendMessage
(
portal
.
portal_notifications
.
activate
(
activity
=
'SQLQueue'
).
sendMessage
(
recipient
=
user_name
,
recipient
=
user_name
,
...
...
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