Search in sources :

Example 1 with OperationOrderService

use of com.axelor.apps.production.service.operationorder.OperationOrderService in project axelor-open-suite by axelor.

the class OperationOrderController method checkConsumedStockMoveLineList.

/**
 * Called from operation order form, on consumed stock move line change. Call {@link
 * OperationOrderService#checkConsumedStockMoveLineList(OperationOrder, OperationOrder)}
 *
 * @param request
 * @param response
 */
public void checkConsumedStockMoveLineList(ActionRequest request, ActionResponse response) {
    try {
        OperationOrder operationOrder = request.getContext().asType(OperationOrder.class);
        OperationOrder oldOperationOrder = Beans.get(OperationOrderRepository.class).find(operationOrder.getId());
        Beans.get(OperationOrderService.class).checkConsumedStockMoveLineList(operationOrder, oldOperationOrder);
    } catch (Exception e) {
        TraceBackService.trace(response, e);
        response.setReload(true);
    }
}
Also used : OperationOrderService(com.axelor.apps.production.service.operationorder.OperationOrderService) OperationOrderRepository(com.axelor.apps.production.db.repo.OperationOrderRepository) OperationOrder(com.axelor.apps.production.db.OperationOrder) BirtException(org.eclipse.birt.core.exception.BirtException) IOException(java.io.IOException)

Aggregations

OperationOrder (com.axelor.apps.production.db.OperationOrder)1 OperationOrderRepository (com.axelor.apps.production.db.repo.OperationOrderRepository)1 OperationOrderService (com.axelor.apps.production.service.operationorder.OperationOrderService)1 IOException (java.io.IOException)1 BirtException (org.eclipse.birt.core.exception.BirtException)1