def METHOD_NAME(cls, user, company):
    """Add a company to the user's allowed & set to current."""
    user.write(
        {
            "company_ids": [(6, 0, (company + user.company_ids).ids)],
            "company_id": company.id,
        }
    )