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
Xiaowu Zhang
erp5
Commits
62b15df5
Commit
62b15df5
authored
Sep 29, 2021
by
Xiaowu Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_corporate_identity: add new parameter to get document after save
parent
57463f30
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
2 deletions
+6
-2
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/Base_viewAsReport.py
...portal_skins/erp5_corporate_identity/Base_viewAsReport.py
+2
-0
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_finishPdfCreation.py
...kins/erp5_corporate_identity/WebPage_finishPdfCreation.py
+3
-1
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_finishPdfCreation.xml
...ins/erp5_corporate_identity/WebPage_finishPdfCreation.xml
+1
-1
No files found.
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/Base_viewAsReport.py
View file @
62b15df5
...
...
@@ -51,6 +51,7 @@ doc = context
doc_prefix
=
pref
.
getPreferredCorporateIdentityTemplateReportDocumentPrefix
()
or
"Report."
doc_download
=
None
#XXX not yet implemented
doc_save
=
int
(
kw
.
get
(
'document_save'
)
or
0
)
get_doc_after_save
=
int
(
kw
.
get
(
'get_doc_after_save'
)
or
0
)
doc_display_header
=
int
(
kw
.
get
(
'display_header'
)
or
0
)
doc_display_comment
=
int
(
kw
.
get
(
'display_comment'
)
or
0
)
doc_display_detail
=
int
(
kw
.
get
(
'display_detail'
)
or
0
)
...
...
@@ -279,6 +280,7 @@ if doc_format == "pdf":
return
doc
.
WebPage_finishPdfCreation
(
doc_download
=
doc_download
,
doc_save
=
doc_save
,
get_doc_after_save
=
get_doc_after_save
,
doc_version
=
override_document_version
or
doc_version
or
"001"
,
doc_title
=
doc_title
,
doc_aggregate_list
=
doc_aggregate_list
,
...
...
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_finishPdfCreation.py
View file @
62b15df5
...
...
@@ -19,7 +19,7 @@ Save, download or return generated PDF Document
from
io
import
BytesIO
if
doc_save
:
if
doc_save
or
get_doc_after_save
:
dms_module
=
getattr
(
context
,
'document_module'
,
None
)
if
dms_module
is
not
None
:
document
=
dms_module
.
newContent
(
...
...
@@ -56,6 +56,8 @@ if doc_save:
# XXX redirect = true?
if
context
.
getWebSiteValue
():
context
.
getPortalObject
().
portal_skins
.
changeSkin
(
'HalRestricted'
)
if
get_doc_after_save
:
return
document
return
document
.
Base_redirect
(
form_id
=
'view'
,
keep_items
=
dict
(
portal_status_message
=
message
)
)
...
...
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_finishPdfCreation.xml
View file @
62b15df5
...
...
@@ -50,7 +50,7 @@
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
doc_download=None, doc_aggregate_list=None, doc_title=None, doc_save=None, doc_version=None, doc_relative_url=None, doc_language=None, doc_modification_date=None, doc_reference=None, doc_full_reference=None, doc_pdf_file=None
</string>
</value>
<value>
<string>
doc_download=None, doc_aggregate_list=None, doc_title=None, doc_save=None, doc_version=None, doc_relative_url=None, doc_language=None, doc_modification_date=None, doc_reference=None, doc_full_reference=None, doc_pdf_file=None
, get_doc_after_save = None
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
...
...
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