odoo/odoo — pull request #2036 by RoelAdriaans-B-informed (2014-08-27 20:02:21+00:00)
Title: [FIX] Add company_ids to the new user, fixes multicompany issues

In a multi-company setup, creating a user sets the company_ids to the company_id of the admin user. If the admin user is in a different company then conf['company'] creating the user fails. This patch sets the allowed company to the same company as the user is in.