c2c-oerpscenario team mailing list archive
-
c2c-oerpscenario team
-
Mailing list archive
-
Message #07627
[Bug 689070] [NEW] [6.0] client crashes if group by field is of type relation
Public bug reported:
a custom module uses
'categ_id' : fields.related('product_id','categ_id',type="many2one",
relation="product.category", string="Category", readonly=True),
if this field is uses as group_py the client crashes
Traceback (most recent call last):
File "/sw/home/gass/OpenERP/trunk/openobject-client/bin/widget/screen/screen.py", line 267, in search_filter
self.display()
File "/sw/home/gass/OpenERP/trunk/openobject-client/bin/widget/screen/screen.py", line 826, in display
self.current_view.display()
File "/sw/home/gass/OpenERP/trunk/openobject-client/bin/widget/view/list.py", line 728, in display
self.store = AdaptModelGroup(self.screen.models, self.screen.context, self.screen.domain, self.screen.sort)
File "/sw/home/gass/OpenERP/trunk/openobject-client/bin/widget/view/list.py", line 224, in __init__
self.models = list_record(model_group, context=context, domain=self.domain, sort_order=sort_order)
File "/sw/home/gass/OpenERP/trunk/openobject-client/bin/widget/view/list.py", line 121, in __init__
self.load()
File "/sw/home/gass/OpenERP/trunk/openobject-client/bin/widget/view/list.py", line 158, in load
self.context.get('__domain', []) + (self.domain or []), self.mgroup.fields.keys(), gb, 0, False, self.context, self.get_order(gb, self.sort_order))
File "/sw/home/gass/OpenERP/trunk/openobject-client/bin/rpc.py", line 185, in rpc_exec_auth
return sock.exec_auth(method, *args)
File "/sw/home/gass/OpenERP/trunk/openobject-client/bin/rpc.py", line 119, in exec_auth
res = self.execute(method, self._uid, self._passwd, *args)
File "/sw/home/gass/OpenERP/trunk/openobject-client/bin/rpc.py", line 136, in execute
raise e
tiny_socket.Myexception: ('column "categ_id" does not exist\nLINE 1: ...car_report_location_moves.id) AS categ_id_count, categ_id,s...\n ^\n', 'Traceback (most recent call last):\n File "/home2/gass/OpenERP/trunk/openobject-server/bin/netsvc.py", line 489, in dispatch\n result = ExportService.getService(service_name).dispatch(method, auth, params)\n File "/home2/gass/OpenERP/trunk/openobject-server/bin/service/web_services.py", line 598, in dispatch\n res = fn(db, uid, *params)\n File "/home2/gass/OpenERP/trunk/openobject-server/bin/addons/audittrail/audittrail.py", line 509, in execute\n res = my_fct(db, uid, model, method, *args)\n File "/home2/gass/OpenERP/trunk/openobject-server/bin/addons/audittrail/audittrail.py", line 487, in my_fct\n return fct_src(db, uid, model, method, *args)\n File "/home2/gass/OpenERP/trunk/openobject-server/bin/osv/osv.py", line 119, in wrapper\n return f(self, dbname, *args, **kwargs)\n File "/home2/gass/OpenERP/trunk/openobject-server/bin/osv/osv.py", line 203, in execute\n res = pool.execute_cr(cr, uid, obj, method, *args, **kw)\n File "/home2/gass/OpenERP/trunk/openobject-server/bin/osv/osv.py", line 193, in execute_cr\n return getattr(object, method)(cr, uid, *args, **kw)\n File "/home2/gass/OpenERP/trunk/openobject-server/bin/osv/orm.py", line 2294, in read_group\n cr.execute(\'SELECT min(%s.id) AS id, count(%s.id) AS %s_count, \' % (self._table, self._table, group_count) + flist + \' FROM \' + from_clause + where_clause + gb + limit_str + offset_str, where_clause_params)\n File "/home2/gass/OpenERP/trunk/openobject-server/bin/sql_db.py", line 76, in wrapper\n return f(self, *args, **kwargs)\n File "/home2/gass/OpenERP/trunk/openobject-server/bin/sql_db.py", line 129, in execute\n res = self._obj.execute(query, params)\nProgrammingError: column "categ_id" does not exist\nLINE 1: ...car_report_location_moves.id) AS categ_id_count, categ_id,s...\n
** Affects: openobject-client
Importance: Undecided
Status: New
** Summary changed:
- [6.0] client crashes if group by field is of type relational
+ [6.0] client crashes if group by field is of type relation
--
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/689070
Title:
[6.0] client crashes if group by field is of type relation
Status in OpenObject GTK Client:
New
Bug description:
a custom module uses
'categ_id' : fields.related('product_id','categ_id',type="many2one", relation="product.category", string="Category", readonly=True),
if this field is uses as group_py the client crashes
Traceback (most recent call last):
File "/sw/home/gass/OpenERP/trunk/openobject-client/bin/widget/screen/screen.py", line 267, in search_filter
self.display()
File "/sw/home/gass/OpenERP/trunk/openobject-client/bin/widget/screen/screen.py", line 826, in display
self.current_view.display()
File "/sw/home/gass/OpenERP/trunk/openobject-client/bin/widget/view/list.py", line 728, in display
self.store = AdaptModelGroup(self.screen.models, self.screen.context, self.screen.domain, self.screen.sort)
File "/sw/home/gass/OpenERP/trunk/openobject-client/bin/widget/view/list.py", line 224, in __init__
self.models = list_record(model_group, context=context, domain=self.domain, sort_order=sort_order)
File "/sw/home/gass/OpenERP/trunk/openobject-client/bin/widget/view/list.py", line 121, in __init__
self.load()
File "/sw/home/gass/OpenERP/trunk/openobject-client/bin/widget/view/list.py", line 158, in load
self.context.get('__domain', []) + (self.domain or []), self.mgroup.fields.keys(), gb, 0, False, self.context, self.get_order(gb, self.sort_order))
File "/sw/home/gass/OpenERP/trunk/openobject-client/bin/rpc.py", line 185, in rpc_exec_auth
return sock.exec_auth(method, *args)
File "/sw/home/gass/OpenERP/trunk/openobject-client/bin/rpc.py", line 119, in exec_auth
res = self.execute(method, self._uid, self._passwd, *args)
File "/sw/home/gass/OpenERP/trunk/openobject-client/bin/rpc.py", line 136, in execute
raise e
tiny_socket.Myexception: ('column "categ_id" does not exist\nLINE 1: ...car_report_location_moves.id) AS categ_id_count, categ_id,s...\n ^\n', 'Traceback (most recent call last):\n File "/home2/gass/OpenERP/trunk/openobject-server/bin/netsvc.py", line 489, in dispatch\n result = ExportService.getService(service_name).dispatch(method, auth, params)\n File "/home2/gass/OpenERP/trunk/openobject-server/bin/service/web_services.py", line 598, in dispatch\n res = fn(db, uid, *params)\n File "/home2/gass/OpenERP/trunk/openobject-server/bin/addons/audittrail/audittrail.py", line 509, in execute\n res = my_fct(db, uid, model, method, *args)\n File "/home2/gass/OpenERP/trunk/openobject-server/bin/addons/audittrail/audittrail.py", line 487, in my_fct\n return fct_src(db, uid, model, method, *args)\n File "/home2/gass/OpenERP/trunk/openobject-server/bin/osv/osv.py", line 119, in wrapper\n return f(self, dbname, *args, **kwargs)\n File "/home2/gass/OpenERP/trunk/openobject-server/bin/osv/osv.py", line 203, in execute\n res = pool.execute_cr(cr, uid, obj, method, *args, **kw)\n File "/home2/gass/OpenERP/trunk/openobject-server/bin/osv/osv.py", line 193, in execute_cr\n return getattr(object, method)(cr, uid, *args, **kw)\n File "/home2/gass/OpenERP/trunk/openobject-server/bin/osv/orm.py", line 2294, in read_group\n cr.execute(\'SELECT min(%s.id) AS id, count(%s.id) AS %s_count, \' % (self._table, self._table, group_count) + flist + \' FROM \' + from_clause + where_clause + gb + limit_str + offset_str, where_clause_params)\n File "/home2/gass/OpenERP/trunk/openobject-server/bin/sql_db.py", line 76, in wrapper\n return f(self, *args, **kwargs)\n File "/home2/gass/OpenERP/trunk/openobject-server/bin/sql_db.py", line 129, in execute\n res = self._obj.execute(query, params)\nProgrammingError: column "categ_id" does not exist\nLINE 1: ...car_report_location_moves.id) AS categ_id_count, categ_id,s...\n
Follow ups
References