You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Go to settings -> Technical-> Database Structure->Models.
Search for res.users and open it.
Try to add a new field.
Once click on the save button, getting the below error:
Unable to order by name: fields used for ordering must be present on the model and stored.
The `name' field in res.users is inherited (not stored) from res.partner and used in res.users order fields and the below code check if the fields used in the order is not stored then raise the error I got.
for field in order_fields:
if field not in stored_fields:
raise ValidationError(_("Unable to order by %s: fields used for ordering must be present on the model and stored.", field))
Note: This issue happened with models copied from other models (Delegation inheritance) and use related field (not stored) in new copied model order for example res.users , product.product
Current behavior:
Can't add a new field to res.users
Expected behavior:
Add ability to add a new field to res.users.
Video/Screenshot link (optional):
Support ticket number submitted via odoo.com/help (optional):
The text was updated successfully, but these errors were encountered:
Impacted versions:
15.0
Steps to reproduce:
Once click on the save button, getting the below error:
Unable to order by name: fields used for ordering must be present on the model and stored.
The `name' field in res.users is inherited (not stored) from res.partner and used in res.users order fields and the below code check if the fields used in the order is not stored then raise the error I got.
https://github.com/odoo/odoo/blob/15.0/odoo/addons/base/models/ir_model.py#L231
Note: This issue happened with models copied from other models (Delegation inheritance) and use related field (not stored) in new copied model order for example res.users , product.product
Current behavior:
Can't add a new field to res.users
Expected behavior:
Add ability to add a new field to res.users.
Video/Screenshot link (optional):
Support ticket number submitted via odoo.com/help (optional):
The text was updated successfully, but these errors were encountered: