add Validated By User Account Move

This commit is contained in:
walid seghier
2023-04-09 17:49:32 +01:00
parent f7ed749d5c
commit 96787c0529
2 changed files with 4 additions and 1 deletions

View File

@@ -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());
}
}

View File

@@ -36,7 +36,8 @@
<boolean name="autoYearClosureMove" title="Year closure move"/>
<many-to-many name="batchSet" ref="com.axelor.apps.base.db.Batch" title="Batchs"/>
<integer name="functionalOriginSelect" title="Functional origin" readonly="true" selection="iaccount.move.functional.origin.select"/>
<many-to-one name="validatedByUser" ref="com.axelor.auth.db.User" readonly="true" title="Validated by"/>
<unique-constraint columns="reference,company"/>
<extra-code><![CDATA[