use of com.axelor.apps.sale.service.saleorder.SaleOrderService in project axelor-open-suite by axelor.
the class SaleOrderController method validateChanges.
/**
* Called from sale order form view, on clicking validate change button. Call {@link
* SaleOrderService#validateChanges(SaleOrder)}.
*
* @param request
* @param response
*/
public void validateChanges(ActionRequest request, ActionResponse response) {
try {
SaleOrder saleOrderView = request.getContext().asType(SaleOrder.class);
SaleOrder saleOrder = Beans.get(SaleOrderRepository.class).find(saleOrderView.getId());
Beans.get(SaleOrderService.class).validateChanges(saleOrder);
response.setReload(true);
} catch (Exception e) {
TraceBackService.trace(response, e);
}
}
Aggregations