Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5-Boxiang
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
Hamza
erp5-Boxiang
Commits
d22573a4
Commit
d22573a4
authored
May 29, 2018
by
Xiaowu Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_corporate_identity: no need to hardcoded converison url
parent
477868b0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
21 deletions
+7
-21
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/Document_createScreenshot.py
...kins/erp5_corporate_identity/Document_createScreenshot.py
+7
-21
No files found.
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/Document_createScreenshot.py
View file @
d22573a4
...
...
@@ -18,25 +18,11 @@ if context.getId().find("template_") == -1:
pdf_page
=
context
portal
=
pdf_page
.
getPortalObject
()
system_preference
=
(
portal
.
portal_preferences
.
getActiveSystemPreference
()
_
,
bmp_data
=
pdf_page
.
convert
(
"bmp"
,
frame
=
frame
)
image
=
portal
.
portal_catalog
(
portal_type
=
"Image"
,
id
=
doc_id
,
limit
=
1
)
preferred_document_conversion_server_url
=
(
system_preference
.
getPreferredDocumentConversionServerUrl
()
)
try
:
system_preference
.
edit
(
preferred_document_conversion_server_url
=
"https://cloudooo.erp5.net/"
)
_
,
bmp_data
=
pdf_page
.
convert
(
"bmp"
,
frame
=
frame
)
image
=
portal
.
portal_catalog
(
portal_type
=
"Image"
,
id
=
doc_id
,
limit
=
1
)
image
[
0
].
edit
(
data
=
bmp_data
)
return
"Screenshot updated."
finally
:
system_preference
.
edit
(
preferred_document_conversion_server_url
=
preferred_document_conversion_server_url
,
)
image
[
0
].
edit
(
data
=
bmp_data
)
return
"Screenshot updated."
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