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
Labels
Merge Requests
141
Merge Requests
141
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
Jobs
Commits
Open sidebar
nexedi
erp5
Commits
9000e64f
Commit
9000e64f
authored
Apr 10, 2024
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixup! py2/py3: import cStringIO from six.moves.
parent
431c3cde
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
bt5/erp5_document_scanner/SkinTemplateItem/portal_skins/erp5_document_scanner/Base_uploadDocumentFromCamera.py
...ns/erp5_document_scanner/Base_uploadDocumentFromCamera.py
+3
-3
No files found.
bt5/erp5_document_scanner/SkinTemplateItem/portal_skins/erp5_document_scanner/Base_uploadDocumentFromCamera.py
View file @
9000e64f
from
six.moves
import
cStringIO
as
String
IO
from
io
import
Bytes
IO
class
StringIOWithFileName
(
String
IO
):
class
BytesIOWithFileName
(
Bytes
IO
):
filename
=
"{}.pdf"
.
format
(
kw
.
get
(
"title"
)
or
DateTime
().
strftime
(
'%d-%m-%Y_%Hh%M'
))
...
...
@@ -9,7 +9,7 @@ active_process = portal.restrictedTraverse(str(active_process_url))
pdf_data_list
=
context
.
Base_getTempImageList
(
active_process
,
image_list
)
pdf_data
=
context
.
ERP5Site_mergePDFList
(
pdf_data_list
=
pdf_data_list
)
file_object
=
String
IOWithFileName
(
pdf_data
)
file_object
=
Bytes
IOWithFileName
(
pdf_data
)
context
.
Base_contribute
(
file
=
file_object
,
...
...
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