Search in sources :

Example 1 with LogisticalFormWarning

use of com.axelor.apps.stock.exception.LogisticalFormWarning in project axelor-open-suite by axelor.

the class LogisticalFormController method checkLines.

public void checkLines(ActionRequest request, ActionResponse response) {
    try {
        LogisticalForm logisticalForm = request.getContext().asType(LogisticalForm.class);
        LogisticalFormService logisticalFormService = Beans.get(LogisticalFormService.class);
        logisticalFormService.sortLines(logisticalForm);
        logisticalFormService.checkLines(logisticalForm);
    } catch (LogisticalFormWarning e) {
        response.setAlert(e.getLocalizedMessage());
    } catch (LogisticalFormError e) {
        response.setError(e.getLocalizedMessage());
    } catch (Exception e) {
        TraceBackService.trace(response, e);
    }
}
Also used : LogisticalForm(com.axelor.apps.stock.db.LogisticalForm) LogisticalFormService(com.axelor.apps.stock.service.LogisticalFormService) LogisticalFormError(com.axelor.apps.stock.exception.LogisticalFormError) LogisticalFormWarning(com.axelor.apps.stock.exception.LogisticalFormWarning)

Aggregations

LogisticalForm (com.axelor.apps.stock.db.LogisticalForm)1 LogisticalFormError (com.axelor.apps.stock.exception.LogisticalFormError)1 LogisticalFormWarning (com.axelor.apps.stock.exception.LogisticalFormWarning)1 LogisticalFormService (com.axelor.apps.stock.service.LogisticalFormService)1