[7.0] mass_editing - can't search an ir.model.fields

Bug #1207671 reported by Lorenzo Battistini
28
This bug affects 6 people
Affects Status Importance Assigned to Milestone
Server Environment And Tools
New
Undecided
Unassigned

Bug Description

server-env-tools/7.0 revno 39

steps

 - install mass_editing and email_template
 - go to settings, technical, email, templates
 - open a template, go to 'field' field and click 'search more'

Get

2013-08-02 08:51:31,513 6071 ERROR test_70 openerp.osv.osv: Uncaught exception
Traceback (most recent call last):
  File "/home/elbati/workspace/openerp/7.0/server/openerp/osv/osv.py", line 131, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/home/elbati/workspace/openerp/7.0/server/openerp/osv/osv.py", line 197, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/home/elbati/workspace/openerp/7.0/server/openerp/osv/osv.py", line 185, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/home/elbati/workspace/openerp/7.0/server/openerp/addons/mass_editing/mass_editing.py", line 34, in search
    model_domain += [('model_id', 'in', map(int, domain[2][1:-1].split(',')))]
TypeError: 'int' object has no attribute '__getitem__'
2013-08-02 08:51:31,514 6071 ERROR test_70 openerp.netsvc: 'int' object has no attribute '__getitem__'
Traceback (most recent call last):
  File "/home/elbati/workspace/openerp/7.0/server/openerp/netsvc.py", line 292, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
  File "/home/elbati/workspace/openerp/7.0/server/openerp/service/web_services.py", line 626, in dispatch
    res = fn(db, uid, *params)
  File "/home/elbati/workspace/openerp/7.0/server/openerp/osv/osv.py", line 188, in execute_kw
    return self.execute(db, uid, obj, method, *args, **kw or {})
  File "/home/elbati/workspace/openerp/7.0/server/openerp/osv/osv.py", line 131, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/home/elbati/workspace/openerp/7.0/server/openerp/osv/osv.py", line 197, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/home/elbati/workspace/openerp/7.0/server/openerp/osv/osv.py", line 185, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/home/elbati/workspace/openerp/7.0/server/openerp/addons/mass_editing/mass_editing.py", line 34, in search
    model_domain += [('model_id', 'in', map(int, domain[2][1:-1].split(',')))]
TypeError: 'int' object has no attribute '__getitem__'

Revision history for this message
Lorenzo Battistini (elbati) wrote :

What's the purpose of overriding the search method of ir.model.fields?
For now I fixed removing it

Revision history for this message
Yajo (yajo) wrote :

This happens in other modules too.

Revision history for this message
Med Said BARA (diassynthesis) wrote :

When under "Super Calendar configurator", when trying to do a "search More" for the fields "Duration field " and "User Field" i get the following error (see also attached files).

-------log----
File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 187, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/usr/lib/pymodules/python2.7/openerp/addons/mass_editing/mass_editing.py", line 34, in search
    model_domain += [('model_id', 'in', map(int, domain[2][1:-1].split(',')))]
TypeError: 'int' object has no attribute '__getitem__'

------Log End---------

But I get this error only with some "Models".

Revision history for this message
Francesco Apruzzese (opencode) wrote :

server-env-tools/7.0 revno 67

After 9 months the bug is here. Yet!

Revision history for this message
Pedro Manuel Baeza (pedro.baeza) wrote :

Francesco, this is a voluntary work, so nobody has the obligation of resolving any bug. If you want to have this bug solved, resolve by yourself and propose an MP against the project, or pay any developer that can resolve it to do it.

Regards.

Revision history for this message
Lorenzo Battistini (elbati) wrote :
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.