Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
4717 Vistas

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
Descartar
Autor

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

Mejor respuesta

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
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
2
jul 25
1690
1
may 25
2088
1
abr 25
3166
1
abr 25
3939
1
abr 25
1475