Commit 5a67ccf5 authored by Gabriel Monnerat's avatar Gabriel Monnerat

erp5_document_scanner: Simplify code

parent 9821abea
from base64 import decodestring
from Products.CMFActivity.ActiveResult import ActiveResult
portal = context.getPortalObject()
active_result = ActiveResult(
detail=decodestring(document_scanner_gadget)
)
if not active_process_url:
active_process = portal.portal_activities.newActiveProcess()
......@@ -12,6 +8,6 @@ if not active_process_url:
else:
active_process = portal.restrictedTraverse(active_process_url)
active_process.postResult(active_result)
active_process.postActiveResult(detail=decodestring(document_scanner_gadget))
return context.Base_renderForm('Base_viewUploadDocumentFromCameraDialog',
message='Captured')
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment