use of com.axelor.apps.production.service.BillOfMaterialService in project axelor-open-suite by axelor.
the class BillOfMaterialController method print.
public void print(ActionRequest request, ActionResponse response) throws AxelorException {
BillOfMaterial billOfMaterial = request.getContext().asType(BillOfMaterial.class);
BillOfMaterialService billOfMaterialService = Beans.get(BillOfMaterialService.class);
String language = ReportSettings.getPrintingLocale(null);
String name = billOfMaterialService.getFileName(billOfMaterial);
String fileLink = billOfMaterialService.getReportLink(billOfMaterial, name, language, ReportSettings.FORMAT_PDF);
LOG.debug("Printing " + name);
response.setView(ActionView.define(name).add("html", fileLink).map());
}
Aggregations