Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
5393 Widoki

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 :

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


Awatar
Odrzuć
Autor

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

Najlepsza odpowiedź

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

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
2
paź 25
2313
5
wrz 25
23336
3
sie 25
3498
1
maj 25
3375
1
kwi 25
4281