From 96787c0529b5093cb482c32416b5ed8eab622469 Mon Sep 17 00:00:00 2001 From: walid seghier Date: Sun, 9 Apr 2023 17:49:32 +0100 Subject: [PATCH] add Validated By User Account Move --- .../axelor/apps/account/service/move/MoveValidateService.java | 2 ++ .../axelor-account/src/main/resources/domains/Move.xml | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/axelor-open-suite/axelor-account/src/main/java/com/axelor/apps/account/service/move/MoveValidateService.java b/modules/axelor-open-suite/axelor-account/src/main/java/com/axelor/apps/account/service/move/MoveValidateService.java index 83af0b5e..c875cd53 100644 --- a/modules/axelor-open-suite/axelor-account/src/main/java/com/axelor/apps/account/service/move/MoveValidateService.java +++ b/modules/axelor-open-suite/axelor-account/src/main/java/com/axelor/apps/account/service/move/MoveValidateService.java @@ -29,6 +29,7 @@ import com.axelor.apps.base.db.Company; import com.axelor.apps.base.db.Partner; import com.axelor.apps.base.db.repo.PartnerRepository; import com.axelor.apps.base.db.repo.PeriodRepository; +import com.axelor.auth.AuthUtils; import com.axelor.common.ObjectUtils; import com.axelor.db.JPA; import com.axelor.db.Query; @@ -296,6 +297,7 @@ public class MoveValidateService { } else { move.setStatusSelect(MoveRepository.STATUS_VALIDATED); move.setValidationDate(LocalDate.now()); + move.setValidatedByUser(AuthUtils.getUser()); } } diff --git a/modules/axelor-open-suite/axelor-account/src/main/resources/domains/Move.xml b/modules/axelor-open-suite/axelor-account/src/main/resources/domains/Move.xml index a7843b1d..de13c5d9 100644 --- a/modules/axelor-open-suite/axelor-account/src/main/resources/domains/Move.xml +++ b/modules/axelor-open-suite/axelor-account/src/main/resources/domains/Move.xml @@ -36,7 +36,8 @@ - + +