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
Ludovic Kiefer
erp5
Commits
4bc22d6c
Commit
4bc22d6c
authored
Oct 18, 2018
by
Xiaowu Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_corporate_identity: check if it's module before access attribute
parent
e8ee581e
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
8 deletions
+15
-8
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/Base_finishWebPageCreation.py
...ins/erp5_corporate_identity/Base_finishWebPageCreation.py
+2
-1
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/Base_viewAsReport.py
...portal_skins/erp5_corporate_identity/Base_viewAsReport.py
+12
-6
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_finishPdfCreation.py
...kins/erp5_corporate_identity/WebPage_finishPdfCreation.py
+1
-1
No files found.
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/Base_finishWebPageCreation.py
View file @
4bc22d6c
...
...
@@ -32,6 +32,7 @@ if doc_save:
web_page
.
edit
(
text_content
=
doc_html_file
)
if
not
context
.
isModuleType
():
context
.
setAggregate
(
web_page
.
getRelativeUrl
())
message
=
context
.
Base_translateString
(
'%(portal_type)s created successfully as Web Page.'
%
{
...
...
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/Base_viewAsReport.py
View file @
4bc22d6c
...
...
@@ -111,12 +111,18 @@ doc_content, report_override_doc_title, report_override_doc_subtitle = doc_repor
report_title
=
doc_translated_title
,
override_batch_mode
=
override_batch_mode
)
doc_reference
=
html_quote
(
override_document_reference
)
if
override_document_reference
else
doc
.
getReference
()
or
blank
doc_short_title
=
translateText
(
report_override_doc_subtitle
if
report_override_doc_subtitle
else
html_quote
(
doc_report_title
)
if
doc_report_title
else
doc
.
getShortTitle
()
or
blank
)
doc_version
=
html_quote
(
override_document_version
)
if
override_document_version
else
getattr
(
doc
,
"version"
,
None
)
or
"001"
doc_title
=
translateText
(
html_quote
(
override_document_title
)
if
override_document_title
else
report_override_doc_title
if
report_override_doc_title
else
doc
.
getTitle
()
or
blank
)
doc_language
=
html_quote
(
override_document_language
)
if
override_document_language
else
doc_language
if
doc
.
isModuleType
():
doc_reference
=
html_quote
(
override_document_reference
)
if
override_document_reference
else
blank
doc_short_title
=
translateText
(
report_override_doc_subtitle
if
report_override_doc_subtitle
else
html_quote
(
doc_report_title
)
if
doc_report_title
else
blank
)
doc_version
=
html_quote
(
override_document_version
)
if
override_document_version
else
getattr
(
doc
,
"version"
,
None
)
or
"001"
doc_title
=
translateText
(
html_quote
(
override_document_title
)
if
override_document_title
else
report_override_doc_title
if
report_override_doc_title
else
blank
)
doc_language
=
html_quote
(
override_document_language
)
if
override_document_language
else
doc_language
else
:
doc_reference
=
html_quote
(
override_document_reference
)
if
override_document_reference
else
doc
.
getReference
()
or
blank
doc_short_title
=
translateText
(
report_override_doc_subtitle
if
report_override_doc_subtitle
else
html_quote
(
doc_report_title
)
if
doc_report_title
else
doc
.
getShortTitle
()
or
blank
)
doc_version
=
html_quote
(
override_document_version
)
if
override_document_version
else
getattr
(
doc
,
"version"
,
None
)
or
"001"
doc_title
=
translateText
(
html_quote
(
override_document_title
)
if
override_document_title
else
report_override_doc_title
if
report_override_doc_title
else
doc
.
getTitle
()
or
blank
)
doc_language
=
html_quote
(
override_document_language
)
if
override_document_language
else
doc_language
# test overrides
if
override_batch_mode
:
...
...
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_finishPdfCreation.py
View file @
4bc22d6c
...
...
@@ -36,7 +36,7 @@ if doc_save:
document
.
setContentType
(
"application/pdf"
)
# setting aggregate in case context is an event
if
context
.
portal_type
!=
'Web Page'
:
if
context
.
portal_type
!=
'Web Page'
and
not
context
.
isModuleType
()
:
context
.
setAggregate
(
document
.
getRelativeUrl
())
# try setting predecessor/related document to later distinguish this
...
...
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