Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
5583 มุมมอง

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.

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

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

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

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

อวตาร
ละทิ้ง
ผู้เขียน

I mean separate completely like accounting for example

Yes, Record Rules are how Odoo separates companies.

Related Posts ตอบกลับ มุมมอง กิจกรรม
0
พ.ย. 21
2575
1
ธ.ค. 20
9032
2
มิ.ย. 20
5473
1
เม.ย. 20
9592
8
มี.ค. 20
5268