Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
4626 Visualizzazioni

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
Abbandona
Autore

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

Risposta migliore

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
Abbandona
Post correlati Risposte Visualizzazioni Attività
2
mag 25
1588
1
mag 25
1915
1
apr 25
2970
1
apr 25
3758
1
apr 25
1321