Search in sources :

Example 6 with StockMoveService

use of com.axelor.apps.stock.service.StockMoveService in project axelor-open-suite by axelor.

the class StockMoveController method updateStocks.

/**
 * Called from stock move form view on save. Call {@link
 * StockMoveService#updateStocks(StockMove)}.
 *
 * @param request
 * @param response
 */
public void updateStocks(ActionRequest request, ActionResponse response) {
    try {
        StockMove stockMove = request.getContext().asType(StockMove.class);
        Beans.get(StockMoveService.class).updateStocks(Beans.get(StockMoveRepository.class).find(stockMove.getId()));
    } catch (Exception e) {
        TraceBackService.trace(response, e);
    }
}
Also used : StockMove(com.axelor.apps.stock.db.StockMove) StockMoveService(com.axelor.apps.stock.service.StockMoveService) AxelorException(com.axelor.exception.AxelorException)

Aggregations

StockMove (com.axelor.apps.stock.db.StockMove)6 StockMoveService (com.axelor.apps.stock.service.StockMoveService)6 AxelorException (com.axelor.exception.AxelorException)5 Transactional (com.google.inject.persist.Transactional)5 Product (com.axelor.apps.base.db.Product)3 StockMoveRepository (com.axelor.apps.stock.db.repo.StockMoveRepository)3 Invoice (com.axelor.apps.account.db.Invoice)2 Company (com.axelor.apps.base.db.Company)2 AppBaseService (com.axelor.apps.base.service.app.AppBaseService)2 ProdProduct (com.axelor.apps.production.db.ProdProduct)2 StockConfigProductionService (com.axelor.apps.production.service.config.StockConfigProductionService)2 OperationOrderStockMoveService (com.axelor.apps.production.service.operationorder.OperationOrderStockMoveService)2 SaleOrder (com.axelor.apps.sale.db.SaleOrder)2 StockConfig (com.axelor.apps.stock.db.StockConfig)2 StockLocation (com.axelor.apps.stock.db.StockLocation)2 StockMoveLine (com.axelor.apps.stock.db.StockMoveLine)2 StockMoveLineService (com.axelor.apps.stock.service.StockMoveLineService)2 CancelReason (com.axelor.apps.base.db.CancelReason)1 Sequence (com.axelor.apps.base.db.Sequence)1 Unit (com.axelor.apps.base.db.Unit)1