Skip to Content
Menú
This question has been flagged
2 Respostes
5602 Vistes

I created a odoo custom module using python

The problem is that the records created in one company can be seen from another company 

how to make the records accruable by the company that created them only.

Avatar
Descartar
Best Answer

Hi, 

You can see following for this, it has complete explanation for company_dependent fields alongwith access restriction and python code:

https://youtu.be/GkNgc-fZO-I

Hope it helps,

Thanks

Avatar
Descartar
Best Answer

Normally, you should have a Global Record Rule like this:

['|',
('company_id','in', company_ids),
('company_id','=',False)]
You will find this Record Rule exists for many Models in Odoo.


This might also be helpful: https://www.odoo.com/documentation/13.0/howtos/company.html

Avatar
Descartar
Autor

I mean separate completely like accounting for example

Yes, Record Rules are how Odoo separates companies.

Related Posts Respostes Vistes Activitat
0
de nov. 21
2585
1
de des. 20
9048
2
de juny 20
5478
1
d’abr. 20
9614
8
de març 20
5303