← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 732613] Re: typo in server break _read_flat() when using "security by fields".

 

** Patch added: "fix read on 'security by field'"
   https://bugs.launchpad.net/bugs/732613/+attachment/1898790/+files/fix-read-on-security-by-field.patch

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/732613

Title:
  typo in server break _read_flat() when using "security by fields".

Status in OpenERP Server:
  New

Bug description:
  When declaring the field like this:
  ...
  _columns ={
    'test_field': fields.text('Test', read=['base.group_user']),
  }
  ...

  the server traceback:

  [2011-03-10 15:27:44,976][test] ERROR:web-services:Uncaught exception
  Traceback (most recent call last):
    File "/home/dex/pp/c/test/server/bin/osv/osv.py", line 122, in wrapper
      return f(self, dbname, *args, **kwargs)
    File "/home/dex/pp/c/test/server/bin/osv/osv.py", line 176, in execute
      res = self.execute_cr(cr, uid, obj, method, *args, **kw)
    File "/home/dex/pp/c/test/server/bin/osv/osv.py", line 167, in execute_cr
      return getattr(object, method)(cr, uid, *args, **kw)
    File "/home/dex/pp/c/test/server/bin/osv/orm.py", line 2940, in read
      result = self._read_flat(cr, user, select, fields, context, load)
    File "/home/dex/pp/c/test/server/bin/osv/orm.py", line 3082, in _read_flat
      (grp, module, 'res.groups', user))
  TypeError: 'str' object is not callable
  [2011-03-10 15:27:44,983][test] DEBUG:web-services:netrpc: rpc-dispatching exception
  Traceback (most recent call last):
    File "/home/dex/pp/c/test/server/bin/service/netrpc_server.py", line 70, in run
      result = self.dispatch(msg[0], msg[1], msg[2:])
    File "/home/dex/pp/c/test/server/bin/netsvc.py", line 499, in dispatch
      raise OpenERPDispatcherException(e, tb_s)
  OpenERPDispatcherException

  Versions:
  Server: 6.0 / r3361

  Missing ',' (coma) at end of line, see patch attached for a fix.

  Cheers,
  Xavier



References