Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
1277 Vistas

hi there i have an example model below in odo 16

model1 = example.version

model2 = example.group


model1 has one2many relation with model2 and it has the notebook view in its form.

in model2 master tree view, if i sort by the selection field it sort finely, but when i sort in notebook view in model1, it has a lot of bug like it didnt sort right, sometimes it doesnt even sort.

is there anyone has through the same problem?

please feel free to ask if something not clear

i have try this in odoo odoo17 also but it still the same. its just little better in odoo 17 because the sort is success but the empty value is always in the bottom

Avatar
Descartar
Mejor respuesta

Hello Muhammad 

In Odoo, selection fields provide a user-friendly way to define a set of options for a particular field in your model. However, by default, these selection fields are stored as characters (char) in the database table, regardless of whether the options contain numbers. This can lead to unexpected sorting behavior in Odoo's tree or list views, where numerical values might sort before alphabetical ones.

I have checked default odoo behaviour and it's works fine for alaphabatic value of selection sorting in list view and one2many list view as well.





Thanks & Regards,


CandidRoot Solutions Pvt. Ltd.

Mobile: (+91) 8849036209

Email: info@candidroot.com

Avatar
Descartar
Autor

yes i find it done well to IF the selection field is all fill. but what if some of them are empty and some are not? i think you will encountered the same problem as i do

Publicaciones relacionadas Respuestas Vistas Actividad
2
nov 22
3324
2
abr 15
16248
2
mar 24
1554
0
oct 20
3169
3
dic 19
4187