[v6 RC1] domain sent as text instead of list in res_user.py

Bug #664407 reported by Carlos Ch.
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Server (MOVED TO GITHUB)
Fix Released
Undecided
Dhruti Shastri(OpenERP)

Bug Description

with the GTK client:
I was trying to access the groups (administration-> users-> groups), then I clicked on "Internal user" group and got this error:

LSB Version: core-2.0-ia32:core-2.0-noarch:core-3.0-ia32:core-3.0-noarch:core-3.1-ia32:core-3.1-noarch:core-3.2-ia32:core-3.2-noarch:core-4.0-ia32:core-4.0-noarch:cxx-3.0-ia32:cxx-3.0-noarch:cxx-3.1-ia32:cxx-3.1-noarch:cxx-3.2-ia32:cxx-3.2-noarch:cxx-4.0-ia32:cxx-4.0-noarch:desktop-3.1-ia32:desktop-3.1-noarch:desktop-3.2-ia32:desktop-3.2-noarch:desktop-4.0-ia32:desktop-4.0-noarch:graphics-2.0-ia32:graphics-2.0-noarch:graphics-3.0-ia32:graphics-3.0-noarch:graphics-3.1-ia32:graphics-3.1-noarch:graphics-3.2-ia32:graphics-3.2-noarch:graphics-4.0-ia32:graphics-4.0-noarch:printing-3.2-ia32:printing-3.2-noarch:printing-4.0-ia32:printing-4.0-noarch:qt4-3.1-ia32:qt4-3.1-noarch
Distributor ID: Ubuntu
Description: Ubuntu 10.04.1 LTS
Release: 10.04
Codename: lucid
Operating System Release : 2.6.32-25-generic
Operating System Version : #45-Ubuntu SMP Sat Oct 16 19:48:22 UTC 2010
Operating System Architecture : 32bit
Operating System Locale : en_GB.UTF8
Python Version : 2.6.5
OpenERP-Client Version : 6.0.0-rc1
Last revision No. & ID :1641 <email address hidden>
Traceback (most recent call last):
  File "/home/cache/dev/trunk/openobject-server/bin/netsvc.py", line 489, in dispatch
    result = ExportService.getService(service_name).dispatch(method, auth, params)
  File "/home/cache/dev/trunk/openobject-server/bin/service/web_services.py", line 586, in dispatch
    res = fn(db, uid, *params)
  File "/home/cache/dev/trunk/openobject-server/bin/osv/osv.py", line 57, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/home/cache/dev/trunk/openobject-server/bin/osv/osv.py", line 140, in execute
    res = pool.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/home/cache/dev/trunk/openobject-server/bin/osv/osv.py", line 130, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/home/cache/dev/trunk/openobject-server/bin/osv/orm.py", line 2965, in read
    result = self._read_flat(cr, user, select, fields, context, load)
  File "/home/cache/dev/trunk/openobject-server/bin/osv/orm.py", line 3119, in _read_flat
    res2 = self._columns[f].get(cr, self, ids, f, user, context=context, values=res)
  File "/home/cache/dev/trunk/openobject-server/bin/osv/fields.py", line 567, in get
    ids2 = obj.search(cr, user, self._domain + [('id', '=', r[0])], context=context)
TypeError: cannot concatenate 'str' and 'list' objects

but it works well with the web client

to fix it you have to remove the quotes form line number 40 in res_user.py
which looks like this: 'group_id', 'rule_group_id', 'Rules', domain="[('global', '<>', True)]")
and should be : 'group_id', 'rule_group_id', 'Rules', domain=[('global', '<>', True)]),

the domain sent as text is admitted in the web client, but not in the GTK client

thnx

Revision history for this message
Carlos Ch. (solracch) wrote :

and here's the patch

Changed in openobject-server:
assignee: nobody → DHS(OpenERP) (dhs-openerp)
Changed in openobject-server:
status: New → Confirmed
Changed in openobject-server:
milestone: none → 6.0-rc2
Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

It has been fixed by revision <email address hidden>.
Thanks.

Changed in openobject-server:
status: Confirmed → Fix Released
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.