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

Hello,


On the inventory "listing view" page I want to sort the field "Lot/Serial number" from lowest to highest, but the field seems to be a "text" so it sorts wrong: 1,10,100, etc instead of 1,2,3,4...etc.

is there a way to sort it well?


I am on the Odoo 15.0+e Enterprise Version with little access to the code.


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

The "Sequence" may have been changed, but default it is setup to provide seven "digit" character based numbers padded on the left with 0's (as @Yann explains):


Find the Sequences Menu when Developer Mode is active.

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

Hi
The Lot/Serial number field is a Char.
So, Odoo use the alpha order.
If you want to have a list in a numeric order, you should prefixe your number with the same number of 0 :
 00001,  00010, 00100
 

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
1
ديسمبر 23
2761
2
أغسطس 23
2406
1
ديسمبر 23
4215
1
يوليو 23
3019
0
مايو 23
2951