ids of type long fails in users.read() (res_users.py)

Bug #984976 reported by Patrick Monnerat
12
This bug affects 2 people
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

Revision history for this message
Patrick Monnerat (monnerat) wrote :
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
Revision history for this message
Patrick Monnerat (monnerat) wrote :

@Jignesh: Thanks to you for commit

Revision history for this message
Jignesh Rathod(OpenERP) (jir-openerp) wrote :

Hello Patrick ,

Thanks for your contribution.

I have applied your patch and it's solved the problem.

This issue has been fixed following branch and rev no , rev id.

lp:~openerp-dev/openobject-server/trunk-bug-984976-jir

rev no : 4350
rev id : 4350 <email address hidden>

Thanks.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.