[FIX] base: show char field size in form view
The char field has a size attribute that is displayed in the interface: - if the field is added with code, the size is always 0 even tough the size limit is set correctly in the database. - if the field is a custom field, the size is correct and can be updated With this commit, a base field show the correct size. opw-1869282 closes #26204
This commit is contained in:
@@ -750,6 +750,7 @@ class IrModelFields(models.Model):
|
||||
'readonly': bool(field.readonly),
|
||||
'required': bool(field.required),
|
||||
'selectable': bool(field.search or field.store),
|
||||
'size': getattr(field, 'size', None),
|
||||
'translate': bool(field.translate),
|
||||
'relation_field': field.inverse_name if field.type == 'one2many' else None,
|
||||
'relation_table': field.relation if field.type == 'many2many' else None,
|
||||
|
||||
Reference in New Issue
Block a user