use of com.axelor.apps.quality.db.QualityProcess in project axelor-open-suite by axelor.
the class QualityControlController method preFillOperations.
/**
* Copy control point model to control point of selected quality process.
*
* @param request
* @param response
* @throws AxelorException
*/
@SuppressWarnings("unchecked")
public void preFillOperations(ActionRequest request, ActionResponse response) throws AxelorException {
LinkedHashMap<String, Object> qualityProcessMap = (LinkedHashMap<String, Object>) request.getContext().get("qualityProcess");
LinkedHashMap<String, Object> qualityControlMap = (LinkedHashMap<String, Object>) request.getContext().get("_qualityControl");
QualityProcess qualityProcess = Beans.get(QualityProcessRepository.class).find(((Integer) qualityProcessMap.get("id")).longValue());
QualityControl qualityControl = Beans.get(QualityControlRepository.class).find(((Integer) qualityControlMap.get("id")).longValue());
Beans.get(QualityControlService.class).preFillOperations(qualityControl, qualityProcess);
response.setCanClose(true);
}
Aggregations