تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
1278 أدوات العرض

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

الصورة الرمزية
إهمال
أفضل إجابة

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

الصورة الرمزية
إهمال
الكاتب

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

المنشورات ذات الصلة الردود أدوات العرض النشاط
2
نوفمبر 22
3324
2
أبريل 15
16248
2
مارس 24
1554
0
أكتوبر 20
3169
3
ديسمبر 19
4187