Commit f3eea0b3 authored by Gabriel Monnerat's avatar Gabriel Monnerat

erp5_document_scanner: ajax must return a active process image content UUID

parent a07158d0
......@@ -80,7 +80,7 @@
function handleAsyncStore(gadget, blob_page) {
var data = new FormData();
data.append("input_value",
gadget.state['blob_url_' + blob_page].split(';')[1].split(',')[1]);
gadget.state['blob_url_' + blob_page].split(';')[1].split(',')[1]);
data.append("active_process_url", gadget.state.active_process);
return new RSVP.Queue()
.push(function () {
......@@ -93,12 +93,10 @@
}
});
})
.push(function () {
.push(function (response) {
var state_dict = {};
state_dict['blob_state_' + blob_page] = 'OK';
// XXX TODO: ajax must return a active process image content UUID
// which should be sent in the final form submittion
state_dict['blob_uuid_' + blob_page] = 'XXX';
state_dict['blob_uuid_' + blob_page] = response.uuid;
return gadget.changeState(state_dict);
}, function () {
// XXX TODO: Handle error case
......
......@@ -244,7 +244,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>981.39686.3809.47701</string> </value>
<value> <string>981.39718.56660.63334</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -262,7 +262,7 @@
</tuple>
<state>
<tuple>
<float>1580771167.45</float>
<float>1580773087.67</float>
<string>UTC</string>
</tuple>
</state>
......
import json
_, reference = context.Base_postDataToActiveResult(
_, uuid = context.Base_postDataToActiveResult(
active_process_url, input_value)
return json.dumps({"reference": reference})
return json.dumps({"uuid": uuid})
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