Search in sources :

Example 11 with LogisticalForm

use of com.axelor.apps.stock.db.LogisticalForm in project axelor-open-suite by axelor.

the class LogisticalFormController method setStockMoveDomain.

public void setStockMoveDomain(ActionRequest request, ActionResponse response) {
    try {
        LogisticalForm logisticalForm = request.getContext().asType(LogisticalForm.class);
        String domain = Beans.get(LogisticalFormService.class).getStockMoveDomain(logisticalForm);
        response.setAttr("$stockMove", "domain", domain);
        if (logisticalForm.getDeliverToCustomerPartner() == null) {
            response.setNotify(I18n.get("Deliver to customer is not set."));
        }
    } catch (Exception e) {
        TraceBackService.trace(response, e);
    }
}
Also used : LogisticalForm(com.axelor.apps.stock.db.LogisticalForm) LogisticalFormService(com.axelor.apps.stock.service.LogisticalFormService)

Example 12 with LogisticalForm

use of com.axelor.apps.stock.db.LogisticalForm in project axelor-open-suite by axelor.

the class LogisticalFormController method refreshProductNetMass.

public void refreshProductNetMass(ActionRequest request, ActionResponse response) {
    try {
        LogisticalForm logisticalForm = request.getContext().asType(LogisticalForm.class);
        LogisticalFormService logisticalFormService = Beans.get(LogisticalFormService.class);
        logisticalFormService.updateProductNetMass(logisticalForm);
        response.setValue("logisticalFormLineList", logisticalForm.getLogisticalFormLineList());
        response.setValue("totalNetMass", logisticalForm.getTotalNetMass());
    } catch (Exception e) {
        TraceBackService.trace(response, e);
    }
}
Also used : LogisticalForm(com.axelor.apps.stock.db.LogisticalForm) LogisticalFormService(com.axelor.apps.stock.service.LogisticalFormService)

Aggregations

LogisticalForm (com.axelor.apps.stock.db.LogisticalForm)12 LogisticalFormService (com.axelor.apps.stock.service.LogisticalFormService)7 LogisticalFormError (com.axelor.apps.stock.exception.LogisticalFormError)5 StockMoveLine (com.axelor.apps.stock.db.StockMoveLine)4 BigDecimal (java.math.BigDecimal)4 ArrayList (java.util.ArrayList)4 LogisticalFormLine (com.axelor.apps.stock.db.LogisticalFormLine)3 StockMove (com.axelor.apps.stock.db.StockMove)3 StockMoveRepository (com.axelor.apps.stock.db.repo.StockMoveRepository)3 IExceptionMessage (com.axelor.apps.stock.exception.IExceptionMessage)3 LogisticalFormWarning (com.axelor.apps.stock.exception.LogisticalFormWarning)3 StringTool (com.axelor.apps.tool.StringTool)3 I18n (com.axelor.i18n.I18n)3 Beans (com.axelor.inject.Beans)3 ScriptHelper (com.axelor.script.ScriptHelper)3 AppFilter (com.axelor.app.internal.AppFilter)2 Product (com.axelor.apps.base.db.Product)2 ProductRepository (com.axelor.apps.base.db.repo.ProductRepository)2 FreightCarrierCustomerAccountNumber (com.axelor.apps.stock.db.FreightCarrierCustomerAccountNumber)2 StockConfig (com.axelor.apps.stock.db.StockConfig)2