for printing different typs of customer receipt for an order-record (example invoice or offer) I defined an own printing screen which is called from the standard cuba list-screen.
Via params map I am passing the GroupDatasource-object to the print-popup.
I am using jasperreport as the reporting-tool and so it is necessary to write informations (for example the date of printing) before the execution of the report can happen, into the order-record and make an GroupDatasource.commit (otherwise it cannot be used in the report).
This is working one time. When the report is done without problems, I want to set an order-field “closed” to true and GroupDatasource.commit once again.
Here is the problem: On the second commit(), I am getting an exception with the info:
Object order was changed from another transaction.
I tried to refresh the groupdatasource after the first commit, but I got the same result.
What is wrong ?