← Back to team overview

openerp-dev-web team mailing list archive

[Bug 702568] [NEW] Company ignored after editing Preferences

 

Olivier Dony (OpenERP) (odo) has assigned this bug to you for OpenObject Web Client:

While testing multi-company functionality on my OpenERP 6.0 RC2 (on
Windows 7), I see that nothing happens when I try to switch companies
from the EDIT PREFERENCES window.

Upon closer look to the source code, I find that there is indeed a validation that checks whether the selected company is assigned to the logged user in \addons\base\res\res_user.py (line 368):
       if not (values['company_id'] in self.read(cr, uid, uid, ['company_ids'], context=context)['company_ids']):

However, the selected company IS assigned to me, which I can confirm by simply watching the variables used in this code line. I find that by simply converting the id from the 'values' list to integer, the condintion works correctly:
       if not (int(values['company_id']) in self.read(cr, uid, uid, ['company_ids'], context=context)['company_ids']):

After introducing this change to my RC2 installation, the modified
company is saved correctly (although the web page's header doesn't
reflect the change even after refreshing it, something I should probably
report in the WebServer project)

Hope I got this right, as I am new to OpenERP. Thanks.

** Affects: openobject-client-web
     Importance: Medium
     Assignee: OpenERP SA's Web Client R&D (openerp-dev-web)
         Status: Confirmed


** Tags: company multi preferences
-- 
Company ignored after editing Preferences
https://bugs.launchpad.net/bugs/702568
You received this bug notification because you are a member of OpenERP SA's Web Client R&D, which is a bug assignee.