Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
1 Balas
4989 Tampilan

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 :

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


Avatar
Buang
Penulis

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

Jawaban Terbai

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

Avatar
Buang
Post Terkait Replies Tampilan Aktivitas
2
Jul 25
1855
3
Agu 25
2516
1
Mei 25
2593
1
Apr 25
3555
1
Apr 25
4407