The fix for this is in line 368 of base/res/res_user.py
Change:
if not (values['company_id'] in self.read(cr, uid, uid, ['company_ids'], context=context)['company_ids']):
To be:
if not (values['company_id'] in self.read(cr, 1, uid, ['company_ids'], context=context)['company_ids']):
Because it is doing the read in the context of the current company id of the user, whereas it needs to see all of the companies of the user.
The fix for this is in line 368 of base/res/ res_user. py
Change:
if not (values[ 'company_ id'] in self.read(cr, uid, uid, ['company_ids'], context= context) ['company_ ids']):
To be:
if not (values[ 'company_ id'] in self.read(cr, 1, uid, ['company_ids'], context= context) ['company_ ids']):
Because it is doing the read in the context of the current company id of the user, whereas it needs to
see all of the companies of the user.