Comment 2 for bug 764745

Revision history for this message
Leigh Willard (leigh) wrote :

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.