Due to global ir.rules applied on res.company, a user should only be able to see the child companies of the company he is currently working in. However this needs to be bypassed when the user is changing to a different company through user preferences. It is safe to perform this check using super-user to bypass all ir.rules. bzr revid: odo@openerp.com-20110506093704-1vwxsqyz63lq40a1