This commit is contained in:
2026-03-17 20:04:11 +01:00
parent 24c8cd8075
commit 01777f1536
3 changed files with 16 additions and 0 deletions

View File

@@ -98,6 +98,19 @@ class AutomationDocument(ModelSQL, ModelView, Workflow):
ShipmentIn.save(sh)
doc.notes = (doc.notes or "") + "Id returned: " + request_id
so_payload = {
"ServiceOrderKey": sh.service_order_key,
"ID_Number": request_id
}
response = requests.post(
"http://automation-service:8006/service-order-update",
json=so_payload,
timeout=10
)
response.raise_for_status()
doc.notes = (doc.notes or "") + "SO updated: " + response.json()
except Exception as e:
doc.state = "error"
doc.notes = (doc.notes or "") + f"OCR error: {e}\n"