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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Nicolas Wavrant
erp5
Commits
4a70ddda
Commit
4a70ddda
authored
Mar 19, 2018
by
Nicolas Wavrant
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixup! erp5_interface_post: action to export all exportable Letter Post in only one PDF document
parent
46c0776f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
6 deletions
+10
-6
bt5/erp5_interface_post/SkinTemplateItem/portal_skins/erp5_interface_post/LetterPostModule_exportExportableLetterPost.py
...rface_post/LetterPostModule_exportExportableLetterPost.py
+1
-1
bt5/erp5_interface_post/SkinTemplateItem/portal_skins/erp5_interface_post/LetterPostModule_exportExportableLetterPostActivity.py
...st/LetterPostModule_exportExportableLetterPostActivity.py
+9
-5
No files found.
bt5/erp5_interface_post/SkinTemplateItem/portal_skins/erp5_interface_post/LetterPostModule_exportExportableLetterPost.py
View file @
4a70ddda
...
@@ -16,7 +16,7 @@ if person_value.getDefaultEmailText('') in ('', None):
...
@@ -16,7 +16,7 @@ if person_value.getDefaultEmailText('') in ('', None):
context
.
activate
(
context
.
activate
(
tag
=
script
.
id
,
tag
=
script
.
id
,
).
LetterPostModule_exportExportableLetterPostActivity
(
user
.
getId
())
).
LetterPostModule_exportExportableLetterPostActivity
(
user
.
get
User
Id
())
return
context
.
Base_redirect
(
'view'
,
return
context
.
Base_redirect
(
'view'
,
keep_items
=
dict
(
portal_status_message
=
N_
(
"Report Started"
)))
keep_items
=
dict
(
portal_status_message
=
N_
(
"Report Started"
)))
bt5/erp5_interface_post/SkinTemplateItem/portal_skins/erp5_interface_post/LetterPostModule_exportExportableLetterPostActivity.py
View file @
4a70ddda
...
@@ -2,13 +2,17 @@ portal = context.getPortalObject()
...
@@ -2,13 +2,17 @@ portal = context.getPortalObject()
N_
=
portal
.
Base_translateString
N_
=
portal
.
Base_translateString
letter_post_list
=
context
.
searchFolder
(
simulation_state
=
'exportable'
)
letter_post_list
=
context
.
searchFolder
(
simulation_state
=
'exportable'
)
merged_pdf_content
=
None
merged_pdf_content
=
""
for
letter_post
in
letter_post_list
:
for
letter_post
in
letter_post_list
:
letter_post
=
letter_post
.
getObject
()
letter_post
=
letter_post
.
getObject
()
merged_pdf_content
=
portal
.
ERP5Site_mergePDFList
([
merged_pdf_content
,
letter_post
.
getData
()])
letter_post
.
activate
().
export
()
if
merged_pdf_content
is
None
:
merged_pdf_content
=
letter_post
.
getData
()
else
:
merged_pdf_content
=
portal
.
ERP5Site_mergePDFList
([
merged_pdf_content
,
letter_post
.
getData
()])
letter_post
.
activate
(
activity
=
'SQLQueue'
).
export
()
result_pdf
=
portal
.
document_module
.
newContent
(
result_pdf
=
portal
.
document_module
.
newContent
(
portal_type
=
'PDF'
,
portal_type
=
'PDF'
,
...
@@ -17,7 +21,7 @@ result_pdf = portal.document_module.newContent(
...
@@ -17,7 +21,7 @@ result_pdf = portal.document_module.newContent(
)
)
portal
.
portal_notifications
.
activate
(
activity
=
'SQLQueue'
).
sendMessage
(
portal
.
portal_notifications
.
activate
(
activity
=
'SQLQueue'
).
sendMessage
(
recipient
=
user_name
,
recipient
=
[
user_name
,]
,
subject
=
N_
(
'Letters to print'
),
subject
=
N_
(
'Letters to print'
),
message
=
'Please find the PDF aggregating all letters to send here : %s'
%
result_pdf
.
getAbsoluteUrl
(),
message
=
'Please find the PDF aggregating all letters to send here : %s'
%
result_pdf
.
getAbsoluteUrl
(),
message_text_format
=
'text/plain'
,
message_text_format
=
'text/plain'
,
...
...
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