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

Cómo deshabilitar la ordenación por en una vista de árbol 'One2many'

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

Hi,

Here you can use the '_order ' attribute of odoo which is used to sort the recordset in list view either in ascending or descending.

Go to the class definition python code of your co-model of the One2many field, there we can set the attributes _name, _description, _rec_name, etc. Like that, _order can also be given as

_order = "sequence"
If you want to sort in descending order, give

_order = "sequence desc"

Hope it helps

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
3
أبريل 25
11891
1
سبتمبر 21
3129
3
مايو 16
9391
1
أبريل 16
4453
1
أغسطس 25
553