I'm trying to copy a company and give it a new name:
company = template_user.company_id.copy(default={'name': 'New name',})
I got this error message:
ValueError: "duplicate key value violates unique constraint "res_company_name_uniq"
DETAIL: Key (name)=(YourCompany) already exists.
YourCompany are the name of the template_users company.