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

As in the image https://imgur.com/a/lZP9Gg5


I am in Invoice Module. In the Tree View, The table(rows) are not sorting When i click on Related Patient 

Same is happening in my custom(Appointment) Module When i click on the Patient Name(partner_id).

This is the Appointment Model and Patient is with Many2one relation

Patient Model is inherited from res.partner

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

Hello Muhammad Awais,

You have to set the _order option into your specific models
For that you can arrange the fields on Ascending and Descending Order using ASC & Desc keywords

For Example :
class AccountInvoice(models.Model):
_inherit = "account.invoice"
_order = "partner_id asc, related_patient asc"

related_patient field must be storable field if you are using as related field

class Appoinment(models.Model):
_name = "appoinment.appoinment"
_order = "partner_id asc"

partner_id field must be storable field if you are using as related field

If the changes have been not reflect into list view then upgrade the your module properly in your database

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
0
يوليو 23
2239
1
فبراير 22
4863
1
أبريل 25
136
0
نوفمبر 24
757
0
مارس 23
1427