Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5_fork
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Eteri
erp5_fork
Commits
50cf125a
Commit
50cf125a
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
376ccfd9
Changes
3
Hide 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 @
50cf125a
...
@@ -51,6 +51,7 @@ doc = context
...
@@ -51,6 +51,7 @@ doc = context
doc_prefix
=
pref
.
getPreferredCorporateIdentityTemplateReportDocumentPrefix
()
or
"Report."
doc_prefix
=
pref
.
getPreferredCorporateIdentityTemplateReportDocumentPrefix
()
or
"Report."
doc_download
=
None
#XXX not yet implemented
doc_download
=
None
#XXX not yet implemented
doc_save
=
int
(
kw
.
get
(
'document_save'
)
or
0
)
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_header
=
int
(
kw
.
get
(
'display_header'
)
or
0
)
doc_display_comment
=
int
(
kw
.
get
(
'display_comment'
)
or
0
)
doc_display_comment
=
int
(
kw
.
get
(
'display_comment'
)
or
0
)
doc_display_detail
=
int
(
kw
.
get
(
'display_detail'
)
or
0
)
doc_display_detail
=
int
(
kw
.
get
(
'display_detail'
)
or
0
)
...
@@ -279,6 +280,7 @@ if doc_format == "pdf":
...
@@ -279,6 +280,7 @@ if doc_format == "pdf":
return
doc
.
WebPage_finishPdfCreation
(
return
doc
.
WebPage_finishPdfCreation
(
doc_download
=
doc_download
,
doc_download
=
doc_download
,
doc_save
=
doc_save
,
doc_save
=
doc_save
,
get_doc_after_save
=
get_doc_after_save
,
doc_version
=
override_document_version
or
doc_version
or
"001"
,
doc_version
=
override_document_version
or
doc_version
or
"001"
,
doc_title
=
doc_title
,
doc_title
=
doc_title
,
doc_aggregate_list
=
doc_aggregate_list
,
doc_aggregate_list
=
doc_aggregate_list
,
...
...
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_finishPdfCreation.py
View file @
50cf125a
...
@@ -19,7 +19,7 @@ Save, download or return generated PDF Document
...
@@ -19,7 +19,7 @@ Save, download or return generated PDF Document
from
io
import
BytesIO
from
io
import
BytesIO
if
doc_save
:
if
doc_save
or
get_doc_after_save
:
dms_module
=
getattr
(
context
,
'document_module'
,
None
)
dms_module
=
getattr
(
context
,
'document_module'
,
None
)
if
dms_module
is
not
None
:
if
dms_module
is
not
None
:
document
=
dms_module
.
newContent
(
document
=
dms_module
.
newContent
(
...
@@ -56,6 +56,8 @@ if doc_save:
...
@@ -56,6 +56,8 @@ if doc_save:
# XXX redirect = true?
# XXX redirect = true?
if
context
.
getWebSiteValue
():
if
context
.
getWebSiteValue
():
context
.
getPortalObject
().
portal_skins
.
changeSkin
(
'HalRestricted'
)
context
.
getPortalObject
().
portal_skins
.
changeSkin
(
'HalRestricted'
)
if
get_doc_after_save
:
return
document
return
document
.
Base_redirect
(
form_id
=
'view'
,
return
document
.
Base_redirect
(
form_id
=
'view'
,
keep_items
=
dict
(
portal_status_message
=
message
)
keep_items
=
dict
(
portal_status_message
=
message
)
)
)
...
...
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_finishPdfCreation.xml
View file @
50cf125a
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
_params
</string>
</key>
<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>
<item>
<item>
<key>
<string>
id
</string>
</key>
<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