use of com.axelor.apps.supplychain.db.Mrp in project axelor-open-suite by axelor.
the class MrpController method undoManualChanges.
public void undoManualChanges(ActionRequest request, ActionResponse response) {
Mrp mrp = request.getContext().asType(Mrp.class);
MrpService mrpService = Beans.get(MrpService.class);
MrpRepository mrpRepository = Beans.get(MrpRepository.class);
try {
mrpService.undoManualChanges(mrpRepository.find(mrp.getId()));
} catch (Exception e) {
TraceBackService.trace(response, e);
mrpService.reset(mrpRepository.find(mrp.getId()));
} finally {
response.setReload(true);
}
}
use of com.axelor.apps.supplychain.db.Mrp in project axelor-open-suite by axelor.
the class MrpLineController method selectAll.
@Transactional(rollbackOn = { Exception.class })
public void selectAll(ActionRequest request, ActionResponse response) {
try {
Mrp mrp = request.getContext().getParent().asType(Mrp.class);
mrp = Beans.get(MrpRepository.class).find(mrp.getId());
Beans.get(MrpService.class).massUpdateProposalToProcess(mrp, true);
response.setAttr("mrpLinePanel", "refresh", true);
} catch (Exception e) {
TraceBackService.trace(response, e);
}
}
use of com.axelor.apps.supplychain.db.Mrp in project axelor-open-suite by axelor.
the class MrpManagementRepository method copy.
@Override
public Mrp copy(Mrp entity, boolean deep) {
Mrp copy = super.copy(entity, deep);
copy.setMrpSeq(null);
return copy;
}
Aggregations