Search in sources :

Example 1 with ContractBatch

use of com.axelor.apps.contract.db.ContractBatch in project axelor-open-suite by axelor.

the class ContractBatchController method runBatch.

public void runBatch(ActionRequest request, ActionResponse response) {
    try {
        ContractBatch contractBatch = request.getContext().asType(ContractBatch.class);
        contractBatch = Beans.get(ContractBatchRepository.class).find(contractBatch.getId());
        Batch batch = Beans.get(BatchContract.class).run(contractBatch);
        response.setFlash(batch.getComments());
        response.setReload(true);
    } catch (Exception e) {
        TraceBackService.trace(response, e);
    }
}
Also used : Batch(com.axelor.apps.base.db.Batch) ContractBatch(com.axelor.apps.contract.db.ContractBatch) BatchContract(com.axelor.apps.contract.batch.BatchContract) ContractBatch(com.axelor.apps.contract.db.ContractBatch)

Example 2 with ContractBatch

use of com.axelor.apps.contract.db.ContractBatch in project axelor-open-suite by axelor.

the class ContractBatchContractRepository method copy.

@Override
public ContractBatch copy(ContractBatch entity, boolean deep) {
    ContractBatch copy = super.copy(entity, deep);
    copy.clearBatchList();
    return copy;
}
Also used : ContractBatch(com.axelor.apps.contract.db.ContractBatch)

Aggregations

ContractBatch (com.axelor.apps.contract.db.ContractBatch)2 Batch (com.axelor.apps.base.db.Batch)1 BatchContract (com.axelor.apps.contract.batch.BatchContract)1