Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
5590 Lượt xem

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.

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Tác giả

I mean separate completely like accounting for example

Yes, Record Rules are how Odoo separates companies.

Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 11 21
2576
1
thg 12 20
9034
2
thg 6 20
5475
1
thg 4 20
9594
8
thg 3 20
5293