Hello,
I faced this issue in Odoo 15, and I was investigating for the cause of it, I suspected that it was a customization made which caused it so took a backup and I began to uninstall all custom modules but the error still pop up. I created a new database installing the native modules I am using but the error did not pop up which is very strange, on debugging the code I found that on creating a new company the partner_id is created with a company_id equal 1 not the id of the company which is being created, honestly I do not know why? as the regular behavior to be equal False or equal to the id of the company being created.
Finally I fixed this issue by overriding the create method of the res.company:
class Company(models.Model):
_inherit = "res.company"
@api.model
def create(self, vals):
company = super(Company, self).create(vals)
# Add the following line to avoid user error: Incompatible companies on records.
company.partner_id.company_id = company.id # or you can make it = False
return company
I hope it helps someone.
Hi!! Same error while creating a new company!! Any news?
Hello Iman,
Kindly, check the product configuration.
Like selected product allow for a single company or multiple company?