Admin readonly_fields should have a hidden field
|Reported by:||Gabriel||Owned by:||nobody|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
I customized the UserAdmin form setting readonly_fields = ('username',) but on submit the field is still being validated and failing as there is no value for username.
readonly_fields should also generate a hidden field with the current value to use on validation, or disable validation on this fields.