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

hello

Am working on multi-company project

In product information the cost is 0 , and i need to share the cost (standard_price ) from the parent company because its the same to all

can you help me with this ??

Ảnh đại diện
Huỷ bỏ

Hi,
did you find a good way to do that?
I have the same issue at the moment

Thanks a lot
Thomas

Câu trả lời hay nhất

Odoo support told me that this behavior is expected because standard_price is a company-dependent field. But I found a workaround with automated actions that did the trick for me:


companies = [1,2,4] # all companies that should get the same standard_price
companies.remove(env.company.id) # remove the active company from list
for target in companies:
targetrecord = record.with_company(target)
if targetrecord.standard_price != record.standard_price:
targetrecord['standard_price'] = record['standard_price']
Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

If you create a product with company field empty, this product will be used from every company. This rule is valid for every model in Odoo. So, if you want to share something between companies, leave the company field empty.

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 3 21
3024
0
thg 5 17
2779
2
thg 12 23
17248
0
thg 3 15
3655
1
thg 10 24
1016