fix scrollup on click action in TCO
This commit is contained in:
@@ -75,6 +75,16 @@ public class PurchaseOrderSupplierLineService {
|
|||||||
poSupplierLineRepo.save(purchaseOrderSupplierLine);
|
poSupplierLineRepo.save(purchaseOrderSupplierLine);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Transactional(rollbackOn = {Exception.class})
|
||||||
|
public void refuse(PurchaseOrderSupplierLine purchaseOrderSupplierLine) throws AxelorException {
|
||||||
|
purchaseOrderSupplierLine.setStateSelect(PurchaseOrderSupplierLineRepository.STATE_NOT_ACCEPTED);
|
||||||
|
// sophal add acceptedOn and By TCO
|
||||||
|
purchaseOrderSupplierLine.setRefusalDate(appPurchaseService.getTodayDate());
|
||||||
|
purchaseOrderSupplierLine.setRefusedByUser(AuthUtils.getUser());;
|
||||||
|
|
||||||
|
poSupplierLineRepo.save(purchaseOrderSupplierLine);
|
||||||
|
}
|
||||||
|
|
||||||
public PurchaseOrderSupplierLine create(Partner supplierPartner, BigDecimal price) {
|
public PurchaseOrderSupplierLine create(Partner supplierPartner, BigDecimal price) {
|
||||||
|
|
||||||
return new PurchaseOrderSupplierLine(
|
return new PurchaseOrderSupplierLine(
|
||||||
|
|||||||
@@ -78,7 +78,19 @@ public class PurchaseOrderSupplierLineController {
|
|||||||
// sophal refresh purchase order price
|
// sophal refresh purchase order price
|
||||||
Beans.get(PurchaseOrderService.class).computePurchaseOrder(order);
|
Beans.get(PurchaseOrderService.class).computePurchaseOrder(order);
|
||||||
Beans.get(PurchaseOrderService.class).updateCostPrice(order);
|
Beans.get(PurchaseOrderService.class).updateCostPrice(order);
|
||||||
response.setReload(true);
|
// response.setReload(true);
|
||||||
|
} catch (Exception e) {
|
||||||
|
TraceBackService.trace(response, e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void refuse(ActionRequest request, ActionResponse response) {
|
||||||
|
|
||||||
|
PurchaseOrderSupplierLine purchaseOrderSupplierLine =
|
||||||
|
Beans.get(PurchaseOrderSupplierLineRepository.class)
|
||||||
|
.find(request.getContext().asType(PurchaseOrderSupplierLine.class).getId());
|
||||||
|
try {
|
||||||
|
Beans.get(PurchaseOrderSupplierLineService.class).refuse(purchaseOrderSupplierLine);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
TraceBackService.trace(response, e);
|
TraceBackService.trace(response, e);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user