use of com.axelor.apps.supplychain.service.SaleOrderServiceSupplychainImpl in project axelor-open-suite by axelor.
the class SaleOrderController method onSave.
/**
* Called from sale order on save. Call {@link
* SaleOrderServiceSupplychainImpl#checkModifiedConfirmedOrder(SaleOrder, SaleOrder)}.
*
* @param request
* @param response
*/
public void onSave(ActionRequest request, ActionResponse response) {
try {
SaleOrder saleOrderView = request.getContext().asType(SaleOrder.class);
if (saleOrderView.getOrderBeingEdited()) {
SaleOrder saleOrder = Beans.get(SaleOrderRepository.class).find(saleOrderView.getId());
Beans.get(SaleOrderServiceSupplychainImpl.class).checkModifiedConfirmedOrder(saleOrder, saleOrderView);
response.setValues(saleOrderView);
}
} catch (Exception e) {
TraceBackService.trace(response, e, ResponseMessageType.ERROR);
}
}
Aggregations