Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
1771 มุมมอง

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

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
3
เม.ย. 25
11885
1
ก.ย. 21
3127
3
พ.ค. 16
9390
1
เม.ย. 16
4452
1
ส.ค. 25
553