Search in sources :

Example 6 with ActionResponse

use of com.axelor.rpc.ActionResponse in project axelor-open-suite by axelor.

the class ManufOrderController method partialFinish.

public void partialFinish(ActionRequest request, ActionResponse response) {
    try {
        ManufOrder manufOrder = request.getContext().asType(ManufOrder.class);
        manufOrder = Beans.get(ManufOrderRepository.class).find(manufOrder.getId());
        // we have to inject TraceBackService to use non static methods
        TraceBackService traceBackService = Beans.get(TraceBackService.class);
        long tracebackCount = traceBackService.countMessageTraceBack(manufOrder);
        if (!Beans.get(ManufOrderWorkflowService.class).partialFinish(manufOrder)) {
            response.setNotify(I18n.get(IExceptionMessage.MANUF_ORDER_EMAIL_NOT_SENT));
        } else if (traceBackService.countMessageTraceBack(manufOrder) > tracebackCount) {
            traceBackService.findLastMessageTraceBack(manufOrder).ifPresent(traceback -> response.setNotify(String.format(I18n.get(com.axelor.apps.message.exception.IExceptionMessage.SEND_EMAIL_EXCEPTION), traceback.getMessage())));
        }
        response.setReload(true);
    } catch (Exception e) {
        TraceBackService.trace(response, e);
    }
}
Also used : IExceptionMessage(com.axelor.apps.production.exceptions.IExceptionMessage) AppProductionService(com.axelor.apps.production.service.app.AppProductionService) BirtException(org.eclipse.birt.core.exception.BirtException) CostSheetRepository(com.axelor.apps.production.db.repo.CostSheetRepository) ProductRepository(com.axelor.apps.base.db.repo.ProductRepository) ActionView(com.axelor.meta.schema.actions.ActionView) ProdProductRepository(com.axelor.apps.production.db.repo.ProdProductRepository) LoggerFactory(org.slf4j.LoggerFactory) ArrayList(java.util.ArrayList) LinkedHashMap(java.util.LinkedHashMap) BigDecimal(java.math.BigDecimal) AxelorException(com.axelor.exception.AxelorException) ActionResponse(com.axelor.rpc.ActionResponse) I18n(com.axelor.i18n.I18n) ManufOrderService(com.axelor.apps.production.service.manuforder.ManufOrderService) ActionRequest(com.axelor.rpc.ActionRequest) ProdProductProductionRepository(com.axelor.apps.production.service.ProdProductProductionRepository) ProdProduct(com.axelor.apps.production.db.ProdProduct) StringTool(com.axelor.apps.tool.StringTool) ManufOrderPrintService(com.axelor.apps.production.service.manuforder.ManufOrderPrintService) Logger(org.slf4j.Logger) TraceBackRepository(com.axelor.exception.db.repo.TraceBackRepository) MethodHandles(java.lang.invoke.MethodHandles) CostSheet(com.axelor.apps.production.db.CostSheet) TraceBackService(com.axelor.exception.service.TraceBackService) IOException(java.io.IOException) AppBaseService(com.axelor.apps.base.service.app.AppBaseService) Collectors(java.util.stream.Collectors) ManufOrderWorkflowService(com.axelor.apps.production.service.manuforder.ManufOrderWorkflowService) List(java.util.List) IReport(com.axelor.apps.production.report.IReport) CostSheetService(com.axelor.apps.production.service.costsheet.CostSheetService) ReportSettings(com.axelor.apps.report.engine.ReportSettings) Beans(com.axelor.inject.Beans) Product(com.axelor.apps.base.db.Product) ManufOrder(com.axelor.apps.production.db.ManufOrder) ReportFactory(com.axelor.apps.ReportFactory) LocalDate(java.time.LocalDate) ObjectUtils(com.axelor.common.ObjectUtils) ManufOrderRepository(com.axelor.apps.production.db.repo.ManufOrderRepository) Context(com.axelor.rpc.Context) ManufOrderStockMoveService(com.axelor.apps.production.service.manuforder.ManufOrderStockMoveService) Singleton(com.google.inject.Singleton) TraceBackService(com.axelor.exception.service.TraceBackService) 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 ActionResponse

use of com.axelor.rpc.ActionResponse in project axelor-open-suite by axelor.

the class InvoiceController method massPaymentOnSupplierInvoices.

public void massPaymentOnSupplierInvoices(ActionRequest request, ActionResponse response) {
    try {
        Context context = request.getContext();
        if (!ObjectUtils.isEmpty(context.get("_ids"))) {
            List<Long> invoiceIdList = (List) (((List) context.get("_ids")).stream().filter(ObjectUtils::notEmpty).map(input -> Long.parseLong(input.toString())).collect(Collectors.toList()));
            List<Long> invoiceToPay = Beans.get(InvoicePaymentCreateService.class).getInvoiceIdsToPay(invoiceIdList);
            if (invoiceToPay.isEmpty()) {
                response.setError(I18n.get(IExceptionMessage.INVOICE_NO_INVOICE_TO_PAY));
            }
            response.setView(ActionView.define(I18n.get("Register a mass payment")).model(InvoicePayment.class.getName()).add("form", "invoice-payment-mass-form").param("popup", "reload").param("show-toolbar", "false").param("show-confirm", "false").param("popup-save", "false").param("forceEdit", "true").context("_invoices", invoiceToPay).map());
        }
    } catch (Exception e) {
        TraceBackService.trace(response, e, ResponseMessageType.ERROR);
    }
}
Also used : Context(com.axelor.rpc.Context) AppAccountService(com.axelor.apps.account.service.app.AppAccountService) PartnerService(com.axelor.apps.base.service.PartnerService) LoggerFactory(org.slf4j.LoggerFactory) PaymentCondition(com.axelor.apps.account.db.PaymentCondition) BankDetailsService(com.axelor.apps.base.service.BankDetailsService) Pair(org.apache.commons.lang3.tuple.Pair) ActionResponse(com.axelor.rpc.ActionResponse) Map(java.util.Map) InvoicePaymentCreateService(com.axelor.apps.account.service.payment.invoice.payment.InvoicePaymentCreateService) Function(com.google.common.base.Function) MethodHandles(java.lang.invoke.MethodHandles) Collection(java.util.Collection) Set(java.util.Set) InvoiceService(com.axelor.apps.account.service.invoice.InvoiceService) Collectors(java.util.stream.Collectors) Currency(com.axelor.apps.base.db.Currency) InvoiceToolService(com.axelor.apps.account.service.invoice.InvoiceToolService) List(java.util.List) ObjectUtils(com.axelor.common.ObjectUtils) PriceList(com.axelor.apps.base.db.PriceList) AccountingSituationService(com.axelor.apps.account.service.AccountingSituationService) Partner(com.axelor.apps.base.db.Partner) Joiner(com.google.common.base.Joiner) Singleton(com.google.inject.Singleton) Company(com.axelor.apps.base.db.Company) InvoicePrintService(com.axelor.apps.account.service.invoice.print.InvoicePrintService) LanguageRepository(com.axelor.apps.base.db.repo.LanguageRepository) ActionView(com.axelor.meta.schema.actions.ActionView) AddressService(com.axelor.apps.base.service.AddressService) PrintingSettings(com.axelor.apps.base.db.PrintingSettings) ArrayList(java.util.ArrayList) IExceptionMessage(com.axelor.apps.account.exception.IExceptionMessage) InvoicePayment(com.axelor.apps.account.db.InvoicePayment) AccountingSituation(com.axelor.apps.account.db.AccountingSituation) AxelorException(com.axelor.exception.AxelorException) IrrecoverableService(com.axelor.apps.account.service.IrrecoverableService) I18n(com.axelor.i18n.I18n) Wizard(com.axelor.apps.base.db.Wizard) ActionRequest(com.axelor.rpc.ActionRequest) ResponseMessageType(com.axelor.exception.ResponseMessageType) ActionViewBuilder(com.axelor.meta.schema.actions.ActionView.ActionViewBuilder) StringTool(com.axelor.apps.tool.StringTool) JPA(com.axelor.db.JPA) Logger(org.slf4j.Logger) TraceBackRepository(com.axelor.exception.db.repo.TraceBackRepository) PartnerPriceListService(com.axelor.apps.base.service.PartnerPriceListService) TraceBackService(com.axelor.exception.service.TraceBackService) PartnerRepository(com.axelor.apps.base.db.repo.PartnerRepository) Invoice(com.axelor.apps.account.db.Invoice) TradingNameService(com.axelor.apps.base.service.TradingNameService) InvoiceRepository(com.axelor.apps.account.db.repo.InvoiceRepository) Beans(com.axelor.inject.Beans) PaymentMode(com.axelor.apps.account.db.PaymentMode) BankDetails(com.axelor.apps.base.db.BankDetails) Context(com.axelor.rpc.Context) List(java.util.List) PriceList(com.axelor.apps.base.db.PriceList) ArrayList(java.util.ArrayList) ObjectUtils(com.axelor.common.ObjectUtils) InvoicePaymentCreateService(com.axelor.apps.account.service.payment.invoice.payment.InvoicePaymentCreateService) AxelorException(com.axelor.exception.AxelorException)

Example 8 with ActionResponse

use of com.axelor.rpc.ActionResponse in project axelor-open-suite by axelor.

the class InvoiceController method showInvoice.

/**
 * Method to generate invoice as a Pdf
 */
@SuppressWarnings("unchecked")
public void showInvoice(ActionRequest request, ActionResponse response) {
    Context context = request.getContext();
    String fileLink;
    String title;
    try {
        if (!ObjectUtils.isEmpty(request.getContext().get("_ids"))) {
            List<Long> ids = (List) (((List) context.get("_ids")).stream().filter(ObjectUtils::notEmpty).map(input -> Long.parseLong(input.toString())).collect(Collectors.toList()));
            fileLink = Beans.get(InvoicePrintService.class).printInvoices(ids);
            title = I18n.get("Invoices");
        } else if (context.get("id") != null) {
            String format = context.get("format") != null ? context.get("format").toString() : "pdf";
            Integer reportType = context.get("reportType") != null ? Integer.parseInt(context.get("reportType").toString()) : null;
            Map languageMap = reportType != null && (reportType == 1 || reportType == 3) && context.get("language") != null ? (Map<String, Object>) request.getContext().get("language") : null;
            String locale = languageMap != null && languageMap.get("id") != null ? Beans.get(LanguageRepository.class).find(Long.parseLong(languageMap.get("id").toString())).getCode() : null;
            fileLink = Beans.get(InvoicePrintService.class).printInvoice(Beans.get(InvoiceRepository.class).find(Long.parseLong(context.get("id").toString())), false, format, reportType, locale);
            title = I18n.get("Invoice");
        } else {
            throw new AxelorException(TraceBackRepository.CATEGORY_MISSING_FIELD, I18n.get(IExceptionMessage.INVOICE_3));
        }
        response.setView(ActionView.define(title).add("html", fileLink).map());
    } catch (Exception e) {
        TraceBackService.trace(response, e);
    }
}
Also used : Context(com.axelor.rpc.Context) AppAccountService(com.axelor.apps.account.service.app.AppAccountService) PartnerService(com.axelor.apps.base.service.PartnerService) LoggerFactory(org.slf4j.LoggerFactory) PaymentCondition(com.axelor.apps.account.db.PaymentCondition) BankDetailsService(com.axelor.apps.base.service.BankDetailsService) Pair(org.apache.commons.lang3.tuple.Pair) ActionResponse(com.axelor.rpc.ActionResponse) Map(java.util.Map) InvoicePaymentCreateService(com.axelor.apps.account.service.payment.invoice.payment.InvoicePaymentCreateService) Function(com.google.common.base.Function) MethodHandles(java.lang.invoke.MethodHandles) Collection(java.util.Collection) Set(java.util.Set) InvoiceService(com.axelor.apps.account.service.invoice.InvoiceService) Collectors(java.util.stream.Collectors) Currency(com.axelor.apps.base.db.Currency) InvoiceToolService(com.axelor.apps.account.service.invoice.InvoiceToolService) List(java.util.List) ObjectUtils(com.axelor.common.ObjectUtils) PriceList(com.axelor.apps.base.db.PriceList) AccountingSituationService(com.axelor.apps.account.service.AccountingSituationService) Partner(com.axelor.apps.base.db.Partner) Joiner(com.google.common.base.Joiner) Singleton(com.google.inject.Singleton) Company(com.axelor.apps.base.db.Company) InvoicePrintService(com.axelor.apps.account.service.invoice.print.InvoicePrintService) LanguageRepository(com.axelor.apps.base.db.repo.LanguageRepository) ActionView(com.axelor.meta.schema.actions.ActionView) AddressService(com.axelor.apps.base.service.AddressService) PrintingSettings(com.axelor.apps.base.db.PrintingSettings) ArrayList(java.util.ArrayList) IExceptionMessage(com.axelor.apps.account.exception.IExceptionMessage) InvoicePayment(com.axelor.apps.account.db.InvoicePayment) AccountingSituation(com.axelor.apps.account.db.AccountingSituation) AxelorException(com.axelor.exception.AxelorException) IrrecoverableService(com.axelor.apps.account.service.IrrecoverableService) I18n(com.axelor.i18n.I18n) Wizard(com.axelor.apps.base.db.Wizard) ActionRequest(com.axelor.rpc.ActionRequest) ResponseMessageType(com.axelor.exception.ResponseMessageType) ActionViewBuilder(com.axelor.meta.schema.actions.ActionView.ActionViewBuilder) StringTool(com.axelor.apps.tool.StringTool) JPA(com.axelor.db.JPA) Logger(org.slf4j.Logger) TraceBackRepository(com.axelor.exception.db.repo.TraceBackRepository) PartnerPriceListService(com.axelor.apps.base.service.PartnerPriceListService) TraceBackService(com.axelor.exception.service.TraceBackService) PartnerRepository(com.axelor.apps.base.db.repo.PartnerRepository) Invoice(com.axelor.apps.account.db.Invoice) TradingNameService(com.axelor.apps.base.service.TradingNameService) InvoiceRepository(com.axelor.apps.account.db.repo.InvoiceRepository) Beans(com.axelor.inject.Beans) PaymentMode(com.axelor.apps.account.db.PaymentMode) BankDetails(com.axelor.apps.base.db.BankDetails) Context(com.axelor.rpc.Context) AxelorException(com.axelor.exception.AxelorException) InvoicePrintService(com.axelor.apps.account.service.invoice.print.InvoicePrintService) List(java.util.List) PriceList(com.axelor.apps.base.db.PriceList) ArrayList(java.util.ArrayList) Map(java.util.Map) ObjectUtils(com.axelor.common.ObjectUtils) AxelorException(com.axelor.exception.AxelorException)

Example 9 with ActionResponse

use of com.axelor.rpc.ActionResponse in project axelor-open-suite by axelor.

the class InvoiceLineController method getFixedAssetCategory.

public void getFixedAssetCategory(ActionRequest request, ActionResponse response) {
    Context context = request.getContext();
    InvoiceLine invoiceLine = context.asType(InvoiceLine.class);
    Invoice invoice = this.getInvoice(context);
    Product product = invoiceLine.getProduct();
    if (invoice == null || product == null) {
        return;
    }
    FixedAssetCategory fixedAssetCategory = null;
    if (!product.getAccountManagementList().isEmpty() && (invoice.getOperationTypeSelect() == InvoiceRepository.OPERATION_TYPE_SUPPLIER_PURCHASE || invoice.getOperationTypeSelect() == InvoiceRepository.OPERATION_TYPE_SUPPLIER_REFUND)) {
        Optional<AccountManagement> optionalFixedAssetCategory = product.getAccountManagementList().stream().filter(am -> invoice.getCompany().equals(am.getCompany())).findFirst();
        fixedAssetCategory = optionalFixedAssetCategory.isPresent() ? optionalFixedAssetCategory.get().getFixedAssetCategory() : null;
    }
    response.setValue("fixedAssetCategory", fixedAssetCategory);
}
Also used : Context(com.axelor.rpc.Context) FixedAssetCategory(com.axelor.apps.account.db.FixedAssetCategory) InvoiceLineService(com.axelor.apps.account.service.invoice.InvoiceLineService) AppAccountService(com.axelor.apps.account.service.app.AppAccountService) HashMap(java.util.HashMap) AccountManagementServiceAccountImpl(com.axelor.apps.account.service.AccountManagementServiceAccountImpl) Mapper(com.axelor.db.mapper.Mapper) ArrayList(java.util.ArrayList) Strings(com.google.common.base.Strings) BigDecimal(java.math.BigDecimal) AccountTypeRepository(com.axelor.apps.account.db.repo.AccountTypeRepository) AxelorException(com.axelor.exception.AxelorException) InvoiceLine(com.axelor.apps.account.db.InvoiceLine) TaxLine(com.axelor.apps.account.db.TaxLine) ActionResponse(com.axelor.rpc.ActionResponse) Map(java.util.Map) I18n(com.axelor.i18n.I18n) FixedAssetCategory(com.axelor.apps.account.db.FixedAssetCategory) ActionRequest(com.axelor.rpc.ActionRequest) AccountManagement(com.axelor.apps.account.db.AccountManagement) InvoiceLineManagement(com.axelor.apps.account.service.invoice.generator.line.InvoiceLineManagement) ITranslation(com.axelor.apps.account.translation.ITranslation) InvoiceLineRepository(com.axelor.apps.account.db.repo.InvoiceLineRepository) TraceBackService(com.axelor.exception.service.TraceBackService) Invoice(com.axelor.apps.account.db.Invoice) Collectors(java.util.stream.Collectors) Account(com.axelor.apps.account.db.Account) InvoiceToolService(com.axelor.apps.account.service.invoice.InvoiceToolService) List(java.util.List) InvoiceRepository(com.axelor.apps.account.db.repo.InvoiceRepository) Beans(com.axelor.inject.Beans) Product(com.axelor.apps.base.db.Product) Entry(java.util.Map.Entry) Optional(java.util.Optional) Context(com.axelor.rpc.Context) Singleton(com.google.inject.Singleton) Invoice(com.axelor.apps.account.db.Invoice) InvoiceLine(com.axelor.apps.account.db.InvoiceLine) Product(com.axelor.apps.base.db.Product) AccountManagement(com.axelor.apps.account.db.AccountManagement)

Example 10 with ActionResponse

use of com.axelor.rpc.ActionResponse in project axelor-open-suite by axelor.

the class SaleOrderController method createStockMove.

public void createStockMove(ActionRequest request, ActionResponse response) {
    SaleOrder saleOrder = request.getContext().asType(SaleOrder.class);
    try {
        if (saleOrder.getId() != null) {
            SaleOrderStockService saleOrderStockService = Beans.get(SaleOrderStockService.class);
            List<Long> stockMoveList = saleOrderStockService.createStocksMovesFromSaleOrder(Beans.get(SaleOrderRepository.class).find(saleOrder.getId()));
            if (stockMoveList != null && stockMoveList.size() == 1) {
                response.setView(ActionView.define(I18n.get("Stock move")).model(StockMove.class.getName()).add("form", "stock-move-form").add("grid", "stock-move-grid").param("search-filters", "internal-stock-move-filters").param("forceEdit", "true").domain("self.id = " + stockMoveList.get(0)).context("_showRecord", String.valueOf(stockMoveList.get(0))).context("_userType", StockMoveRepository.USER_TYPE_SALESPERSON).map());
                // we have to inject TraceBackService to use non static methods
                Beans.get(TraceBackService.class).findLastMessageTraceBack(Beans.get(StockMoveRepository.class).find(stockMoveList.get(0))).ifPresent(traceback -> response.setNotify(String.format(I18n.get(com.axelor.apps.message.exception.IExceptionMessage.SEND_EMAIL_EXCEPTION), traceback.getMessage())));
            } else if (stockMoveList != null && stockMoveList.size() > 1) {
                response.setView(ActionView.define(I18n.get("Stock move")).model(StockMove.class.getName()).add("grid", "stock-move-grid").add("form", "stock-move-form").param("search-filters", "internal-stock-move-filters").domain("self.id in (" + Joiner.on(",").join(stockMoveList) + ")").context("_userType", StockMoveRepository.USER_TYPE_SALESPERSON).map());
                // we have to inject TraceBackService to use non static methods
                TraceBackService traceBackService = Beans.get(TraceBackService.class);
                StockMoveRepository stockMoveRepository = Beans.get(StockMoveRepository.class);
                stockMoveList.stream().map(stockMoveRepository::find).map(traceBackService::findLastMessageTraceBack).filter(Optional::isPresent).map(Optional::get).findAny().ifPresent(traceback -> response.setNotify(String.format(I18n.get(com.axelor.apps.message.exception.IExceptionMessage.SEND_EMAIL_EXCEPTION), traceback.getMessage())));
            } else {
                response.setFlash(I18n.get(IExceptionMessage.SO_NO_DELIVERY_STOCK_MOVE_TO_GENERATE));
            }
        }
    } catch (Exception e) {
        TraceBackService.trace(response, e);
    }
}
Also used : IExceptionMessage(com.axelor.apps.supplychain.exception.IExceptionMessage) SaleOrderServiceSupplychainImpl(com.axelor.apps.supplychain.service.SaleOrderServiceSupplychainImpl) Mapper(com.axelor.db.mapper.Mapper) SaleOrderLineRepository(com.axelor.apps.sale.db.repo.SaleOrderLineRepository) BigDecimal(java.math.BigDecimal) SaleOrderRepository(com.axelor.apps.sale.db.repo.SaleOrderRepository) ActionResponse(com.axelor.rpc.ActionResponse) BlockingService(com.axelor.apps.base.service.BlockingService) Map(java.util.Map) SaleOrder(com.axelor.apps.sale.db.SaleOrder) StockLocationService(com.axelor.apps.stock.service.StockLocationService) PartnerSupplychainLinkTypeRepository(com.axelor.apps.supplychain.db.repo.PartnerSupplychainLinkTypeRepository) StockMove(com.axelor.apps.stock.db.StockMove) StockMoveRepository(com.axelor.apps.stock.db.repo.StockMoveRepository) SaleOrderStockService(com.axelor.apps.supplychain.service.SaleOrderStockService) Currency(com.axelor.apps.base.db.Currency) BlockingRepository(com.axelor.apps.base.db.repo.BlockingRepository) List(java.util.List) SaleOrderLine(com.axelor.apps.sale.db.SaleOrderLine) PurchaseOrder(com.axelor.apps.purchase.db.PurchaseOrder) SaleOrderPurchaseService(com.axelor.apps.supplychain.service.SaleOrderPurchaseService) LocalDate(java.time.LocalDate) PriceList(com.axelor.apps.base.db.PriceList) Optional(java.util.Optional) SaleOrderInvoiceService(com.axelor.apps.supplychain.service.SaleOrderInvoiceService) Partner(com.axelor.apps.base.db.Partner) Joiner(com.google.common.base.Joiner) Singleton(com.google.inject.Singleton) Company(com.axelor.apps.base.db.Company) ActionView(com.axelor.meta.schema.actions.ActionView) TemporalUnit(java.time.temporal.TemporalUnit) HashMap(java.util.HashMap) SaleOrderCreateServiceSupplychainImpl(com.axelor.apps.supplychain.service.SaleOrderCreateServiceSupplychainImpl) ArrayList(java.util.ArrayList) LinkedHashMap(java.util.LinkedHashMap) Strings(com.google.common.base.Strings) AxelorException(com.axelor.exception.AxelorException) StockLocation(com.axelor.apps.stock.db.StockLocation) SaleOrderReservedQtyService(com.axelor.apps.supplychain.service.SaleOrderReservedQtyService) I18n(com.axelor.i18n.I18n) Wizard(com.axelor.apps.base.db.Wizard) PartnerSupplychainLinkService(com.axelor.apps.supplychain.service.PartnerSupplychainLinkService) ActionRequest(com.axelor.rpc.ActionRequest) ResponseMessageType(com.axelor.exception.ResponseMessageType) ActionViewBuilder(com.axelor.meta.schema.actions.ActionView.ActionViewBuilder) SaleOrderLineServiceSupplyChain(com.axelor.apps.supplychain.service.SaleOrderLineServiceSupplyChain) JPA(com.axelor.db.JPA) TraceBackRepository(com.axelor.exception.db.repo.TraceBackRepository) TraceBackService(com.axelor.exception.service.TraceBackService) Invoice(com.axelor.apps.account.db.Invoice) Team(com.axelor.team.db.Team) ChronoUnit(java.time.temporal.ChronoUnit) InvoiceRepository(com.axelor.apps.account.db.repo.InvoiceRepository) Beans(com.axelor.inject.Beans) SaleOrderSupplychainService(com.axelor.apps.supplychain.service.SaleOrderSupplychainService) AppSupplychainService(com.axelor.apps.supplychain.service.app.AppSupplychainService) Context(com.axelor.rpc.Context) TraceBackService(com.axelor.exception.service.TraceBackService) StockMove(com.axelor.apps.stock.db.StockMove) Optional(java.util.Optional) StockMoveRepository(com.axelor.apps.stock.db.repo.StockMoveRepository) SaleOrder(com.axelor.apps.sale.db.SaleOrder) SaleOrderStockService(com.axelor.apps.supplychain.service.SaleOrderStockService) AxelorException(com.axelor.exception.AxelorException)

Aggregations

ActionResponse (com.axelor.rpc.ActionResponse)19 Context (com.axelor.rpc.Context)17 List (java.util.List)17 Beans (com.axelor.inject.Beans)16 ActionRequest (com.axelor.rpc.ActionRequest)16 TraceBackService (com.axelor.exception.service.TraceBackService)15 Singleton (com.google.inject.Singleton)15 I18n (com.axelor.i18n.I18n)14 ArrayList (java.util.ArrayList)14 AxelorException (com.axelor.exception.AxelorException)13 ActionView (com.axelor.meta.schema.actions.ActionView)13 BigDecimal (java.math.BigDecimal)13 Map (java.util.Map)13 Product (com.axelor.apps.base.db.Product)12 Collectors (java.util.stream.Collectors)12 TraceBackRepository (com.axelor.exception.db.repo.TraceBackRepository)11 StringTool (com.axelor.apps.tool.StringTool)10 ObjectUtils (com.axelor.common.ObjectUtils)10 MethodHandles (java.lang.invoke.MethodHandles)10 Logger (org.slf4j.Logger)10