Company ignored after editing Preferences
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Web Client |
Fix Released
|
Medium
|
OpenERP R&D Web Team |
Bug Description
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\
if not (values[
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[
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.
Related branches
Changed in openobject-client-web: | |
status: | In Progress → Fix Released |
Hello Nicolas,
Your analysis is correct, and your patch is not bad, but the problem is larger, and not limited to changing the company. For example if you try to turn off the 'menu tips' in the preferences you will see that it fails too.
This is the trace of a sample RPC call from the web client when changing the preferences:
['test_00_1', project_ id': '', section_ id': '',
1,
'*',
'res.users',
'write',
[1],
{'company_id': '3',
'context_lang': 'en_US',
'context_
'context_
'context_tz': '',
'menu_tips': '1',
'signature': 'Administrator',
'user_email': '',
'view': 'extended'}]
As you can see, the company_id and menu_tips values are passed as strings instead of, respectively, integer and boolean.
This is a problem in the web client, and applying your suggested patch on the server would indeed be a workaround for the company setting, but we need solve the root cause as well.
This issue is under investigation by the web client team.
Thanks for reporting!