base: introduce Person.initUserId
Person.setUserId does expensive checks to ensure that user ids are uniques, but the default id generator already guarantees unicity, so when default id generator is used we don't need Person.setUserId unicity checks. Now when generating user ids, we only consider user id conflict with existing users, because it's not so expensive and might still happen, for example if user ids have been migrated from person references when erp5_users PAS plugin was used. person.setUserId still performs the expensive checks to prevent duplications against other transactions using person.setUserId, but not against other transactions using person.initUserId
Showing