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
Gabriel Monnerat
erp5
Commits
25e74888
Commit
25e74888
authored
Feb 04, 2020
by
Gabriel Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_document_scanner: Use portal_ids to generate ids in order
parent
3ba804f5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
12 deletions
+11
-12
bt5/erp5_document_scanner/SkinTemplateItem/portal_skins/erp5_document_scanner/Base_postDataToActiveResult.py
...kins/erp5_document_scanner/Base_postDataToActiveResult.py
+8
-10
bt5/erp5_document_scanner/SkinTemplateItem/portal_skins/erp5_document_scanner/Base_postDataToActiveResult.xml
...ins/erp5_document_scanner/Base_postDataToActiveResult.xml
+1
-1
bt5/erp5_document_scanner/SkinTemplateItem/portal_skins/erp5_document_scanner/Base_storeNewImageCropped.py
..._skins/erp5_document_scanner/Base_storeNewImageCropped.py
+2
-1
No files found.
bt5/erp5_document_scanner/SkinTemplateItem/portal_skins/erp5_document_scanner/Base_postDataToActiveResult.py
View file @
25e74888
...
...
@@ -5,14 +5,6 @@
import
string
import
random
reference
=
str
(
DateTime
().
millis
())
+
'-'
+
''
.
join
(
random
.
sample
(
string
.
letters
+
string
.
digits
,
random
.
randint
(
6
,
10
)
)
)
portal
=
context
.
getPortalObject
()
if
REQUEST
:
...
...
@@ -23,5 +15,11 @@ if active_process_url:
else
:
active_process
=
portal
.
portal_activities
.
newActiveProcess
()
active_process
.
postActiveResult
(
detail
=
detail
,
reference
=
reference
)
return
active_process
,
reference
if
generate_new_uid
:
id_group
=
(
'document_scanner_js'
,
active_process
.
getUid
())
new_uid
=
portal
.
portal_ids
.
generateNewId
(
id_group
=
id_group
,
default
=
0
)
else
:
new_uid
=
None
active_process
.
postActiveResult
(
detail
=
detail
,
reference
=
new_uid
)
return
active_process
,
new_uid
bt5/erp5_document_scanner/SkinTemplateItem/portal_skins/erp5_document_scanner/Base_postDataToActiveResult.xml
View file @
25e74888
...
...
@@ -50,7 +50,7 @@
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
active_process_url, detail, REQUEST=None, **kw
</string>
</value>
<value>
<string>
active_process_url, detail,
generate_new_uid=False,
REQUEST=None, **kw
</string>
</value>
</item>
<item>
<key>
<string>
_proxy_roles
</string>
</key>
...
...
bt5/erp5_document_scanner/SkinTemplateItem/portal_skins/erp5_document_scanner/Base_storeNewImageCropped.py
View file @
25e74888
import
json
_
,
uuid
=
context
.
Base_postDataToActiveResult
(
active_process_url
,
input_value
)
active_process_url
,
input_value
,
generate_new_uid
=
True
)
return
json
.
dumps
({
"uuid"
:
uuid
})
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