use of com.axelor.apps.sale.service.PackLineService in project axelor-open-suite by axelor.
the class PackLineController method getProductInformation.
public void getProductInformation(ActionRequest request, ActionResponse response) {
Context context = request.getContext();
PackLine packLine = context.asType(PackLine.class);
Pack pack = this.getPack(context);
Product product = packLine.getProduct();
PackLineService packLineService = Beans.get(PackLineService.class);
if (product == null) {
packLine = packLineService.resetProductInformation(packLine);
response.setValues(packLine);
return;
}
try {
packLine = packLineService.computeProductInformation(pack, packLine);
response.setValues(packLine);
} catch (Exception e) {
TraceBackService.trace(response, e);
}
}
Aggregations