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

I have created a custom module which shows summary of records from Account/Invoices menu.
But I have multiple companies in my DB and I want to display data of company which is currently active or selected.
But, currently my module shows data of all companies together so I want to create custom filter for it.

Like this :

----------------


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

I got the solution earlier, but Thank you :) .

أفضل إجابة

Hi,

Create a field for the company as a many2one in the model for which you want to filter records and also added record rule for that .

EG:- 

['|',('company_id','!=', False),('company_id','=', user.company_id.id)]

Regards

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
2
يوليو 25
1765
1
مايو 25
2215
1
أبريل 25
3267
1
أبريل 25
4083
1
أبريل 25
1567