I think what I would like to do is to keep using OCA groups, and to handle the provider error message. But in order to handle the error message properly, I need to know the order.ID that the provider quotes in the error message. I want to do something like this:
Code:
OnError (.., orderid, ..) {
// handle provider errors
// ignore routine OCA cancellation orders
if (errcode == 202) { // order cancelled - reason
// ignore OCA cancellations
if (error.ID == <one of my OCA order numbers>)
return; // ignore routine OCA cancels
// else it was one of my real orders that was cancelled
// for some significant reason
< print an error message, or something intelligent>
}
// .. handle other provider errors
}
The problem I have with this desired approach is that I don't know the order id of my OCA orders, because I created them with LimitOrder and StopOrder and cannot find out the order id. So I cannot compare my list of order ids with the id in the 202 error message.