ids of type long fails in users.read() (res_users.py)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Server (MOVED TO GITHUB) |
Fix Committed
|
Low
|
OpenERP's Framework R&D |
Bug Description
If an ids of type long is passed to method users.read(), the returned result is erroneous.
The problem occurs because long ids should be treated the same way as ints, but are not.
discovered in community version 6.1-1 running on Linux 64bits.
You can reproduce the error using the ldap addon (i did it with the web client) (and yes, I know users_ldap.py should be fixed too!):
1) configure the LDAP addon according to one of your ldap servers. Check the "create user" flag.
2) login to openerp with an ldap user that is not yet configured in openerp.
3) Click the "human resources" icon --> server error.
4) if you logout then login again, the error does not occur: the users_ldap addon sets an integer user_id when the user already exists, a long user_id if it has just been created.
The attached patch fixes this problem. But the proper test should probably be fully in phase with the test at the end of Models.read() (orm.py).
Related branches
- Amit Parik (community): Approve
- OpenERP Core Team: Pending requested
-
Diff: 12 lines (+1/-1)1 file modifiedopenerp/addons/base/res/res_users.py (+1/-1)
Changed in openobject-server: | |
assignee: | nobody → OpenERP's Framework R&D (openerp-dev-framework) |
importance: | Undecided → Low |
status: | New → Confirmed |
Changed in openobject-server: | |
status: | Confirmed → Fix Committed |
@Jignesh: Thanks to you for commit