Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
6542 Lượt xem

i am trying to add field x_supervisor ( with Store = True ) in model res.users from Technical -> Models when save, it is showing Validation Error:

Unable to order by name: fields used for ordering must be present on the model and stored.


how to resolve this problem? please help.

regards

Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

now the problem has been resolved.

for juniors like me:

I was trying to add field through Technical -> Model and it was showing error

when i added same field through Technical -> Fields it has been successfully done.

please keep in mind for future development.

regards

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hello, you can create a field on res.users from the frontend without having to indulge in python code using the method below:

  • Go to Settings->Technical ->Database Structure ->Models and find the model User (res.users).
  • Click on New button to create a new field.
  • Now go ahead and fill up the necessary fields like Field Name, Field Label and Field Type. Guessing from your scenario it will be a Many2one field. (If it is a Many2one field you will need to specify the related model for the field). 
  • Ensure the model of the field is set to User. 
  • Go ahead and save your record. The field should have been created!

If you face any weird errors, try refreshing the page or restarting the services.

Have a nice day :)​​​​​​

Ảnh đại diện
Huỷ bỏ
Tác giả

thanks @Muhammad Azham
i already have taken all steps you have mentioned including refreshing but it is showing the error.

Bài viết liên quan Trả lời Lượt xem Hoạt động
4
thg 5 25
2587
2
thg 5 25
5971
1
thg 3 25
1721
4
thg 3 25
4579
3
thg 2 25
5586