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

We have Odoo 13 CE and it is working fine for almost 1 year now, and we now are trying to activate multi-company setup and add our second company but no matter what data we use we always get the following error:

Incompatible companies on records:
- 'test' belongs to company 'test' and 'Address' (partner_id: 'test') belongs to another company.
and in the log the following error will show:

WARNING  odoo.http: ("Incompatible companies on records:\n- 'test' belongs to company 'test' and 'Address' (partner_id: 'test') belongs to another company.", '')


Appreciate any help on this.

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

HIi @emad jaddo
I had the same error did you solve it?

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

This issue caused the default company on Address' (partner_id





so take these steps

1.1- Turn developer mode


1.3 open developer mode

 

1.2 open or create new partner/contact

1.4 .under set defaults remove the the others which belong to creating new partners


Wish you it helps


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

Hello Emad, Hope you fixed this issue. I faced same issue and find the solution.


In my case partner have assigned default company. So remove default value from company.

Original Code

class ResPartner(models.Model):
    _inherit = 'res.partner'

    company_id = fields.Many2one('res.company', 'Company', index=True, default=lambda self:self.env.user.company_id)

Updated Code:

class ResPartner(models.Model):
    _inherit = 'res.partner'

    company_id = fields.Many2one('res.company', 'Company', index=True)

Thanks

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

Hi Nikesh,
The problem is still there. Which file needs to be modified with the above code?

Hello,
This code was in my custom module. You have to check your inherited files with res.partner model

Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 9 22
2324
0
thg 2 21
2269
0
thg 1 21
2465
1
thg 1 20
1404
1
thg 11 22
3955