Search in sources :

Example 6 with ManufOrderService

use of com.axelor.apps.production.service.manuforder.ManufOrderService in project axelor-open-suite by axelor.

the class ManufOrderController method updatePlannedQty.

/**
 * Called from manuf order wizard view. Call {@link
 * ManufOrderService#updatePlannedQty(ManufOrder)}
 *
 * @param request
 * @param response
 */
public void updatePlannedQty(ActionRequest request, ActionResponse response) {
    try {
        ManufOrder manufOrder = request.getContext().asType(ManufOrder.class);
        manufOrder = Beans.get(ManufOrderRepository.class).find(manufOrder.getId());
        Beans.get(ManufOrderService.class).updatePlannedQty(manufOrder);
        response.setReload(true);
        response.setCanClose(true);
    } catch (Exception e) {
        TraceBackService.trace(response, e);
    }
}
Also used : ManufOrderService(com.axelor.apps.production.service.manuforder.ManufOrderService) BirtException(org.eclipse.birt.core.exception.BirtException) AxelorException(com.axelor.exception.AxelorException) IOException(java.io.IOException) ManufOrder(com.axelor.apps.production.db.ManufOrder)

Example 7 with ManufOrderService

use of com.axelor.apps.production.service.manuforder.ManufOrderService in project axelor-open-suite by axelor.

the class ManufOrderController method preFillOperations.

public void preFillOperations(ActionRequest request, ActionResponse response) throws AxelorException {
    try {
        ManufOrder manufOrder = request.getContext().asType(ManufOrder.class);
        ManufOrderService moService = Beans.get(ManufOrderService.class);
        manufOrder = Beans.get(ManufOrderRepository.class).find(manufOrder.getId());
        moService.preFillOperations(manufOrder);
        response.setReload(true);
    } catch (Exception e) {
        TraceBackService.trace(response, e);
    }
}
Also used : ManufOrderService(com.axelor.apps.production.service.manuforder.ManufOrderService) BirtException(org.eclipse.birt.core.exception.BirtException) AxelorException(com.axelor.exception.AxelorException) IOException(java.io.IOException) ManufOrder(com.axelor.apps.production.db.ManufOrder)

Example 8 with ManufOrderService

use of com.axelor.apps.production.service.manuforder.ManufOrderService in project axelor-open-suite by axelor.

the class ManufOrderController method checkConsumedStockMoveLineList.

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

Aggregations

ManufOrderService (com.axelor.apps.production.service.manuforder.ManufOrderService)8 ManufOrder (com.axelor.apps.production.db.ManufOrder)7 AxelorException (com.axelor.exception.AxelorException)7 IOException (java.io.IOException)7 BirtException (org.eclipse.birt.core.exception.BirtException)7 ManufOrderRepository (com.axelor.apps.production.db.repo.ManufOrderRepository)2 SequenceService (com.axelor.apps.base.service.administration.SequenceService)1 OperationOrder (com.axelor.apps.production.db.OperationOrder)1 AppProductionService (com.axelor.apps.production.service.app.AppProductionService)1 Transactional (com.google.inject.persist.Transactional)1 BigDecimal (java.math.BigDecimal)1