c2c-oerpscenario team mailing list archive
-
c2c-oerpscenario team
-
Mailing list archive
-
Message #13069
[Bug 704276] Re: TypeError when trying to view "Products by Category"
Hello snook,
Fixed in trunk.
4375 noz@xxxxxxxxxxx-20110118072439-esxmap4iqhf88juu
Please update your code.
Thanks.
** Changed in: openobject-client-web
Status: Confirmed => In Progress
** Changed in: openobject-client-web
Status: In Progress => Fix Released
** Changed in: openobject-client-web
Milestone: None => 6.0
--
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/704276
Title:
TypeError when trying to view "Products by Category"
Status in OpenObject Web Client:
Fix Released
Bug description:
server revno: 3293
web client revno: 4370
Demo database installed.
In web client, navigating to "Products/Products by Category" then
clicking on a "Sellable" then "Computer Stuff" then "PC"
BOOM !! with the following exception:
<type 'exceptions.TypeError'> Python 2.6.5: /home/openerp/openerp-virt/bin/python
Tue Jan 18 13:58:41 2011
A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.
/home/openerp/openerp-virt/lib/python2.6/site-packages/cherrypy/_cprequest.py in respond(self=<cherrypy._cprequest.Request object>, path_info='/openerp/execute')
604 if self.handler:
605 self.stage = 'handler'
606 cherrypy.response.body = self.handler()
607
608 self.stage = 'before_finalize'
global cherrypy = <module 'cherrypy' from '/home/openerp/openerp-v...b/python2.6/site-packages/cherrypy/__init__.pyc'>, cherrypy.response = <cherrypy._ThreadLocalProxy object>, cherrypy.response.body = [], self = <cherrypy._cprequest.Request object>, self.handler = <cherrypy._cpdispatch.LateParamPageHandler object>
/home/openerp/openerp-virt/lib/python2.6/site-packages/cherrypy/_cpdispatch.py in __call__(self=<cherrypy._cpdispatch.LateParamPageHandler object>)
23 def __call__(self):
24 try:
25 return self.callable(*self.args, **self.kwargs)
26 except TypeError, x:
27 test_callable_spec(self.callable, self.args, self.kwargs)
self = <cherrypy._cpdispatch.LateParamPageHandler object>, self.callable = <bound method Root.default of <openobject.controllers._root.Root object>>, self.args = ('openerp', 'execute'), self.kwargs = {'action': '{"groups_id": [], "domain": "[(\'categ_id\',\'child... "usage": false, "type": "ir.actions.act_window"}', 'data': '{"context": {"lang": "en_US", "tz": false, "sect...ry", "id": 10, "report_type": "pdf", "ids": [10]}'}
/home/openerp/openerp-virt/lib/python2.6/site-packages/openerp_web-6.0.0_rc2-py2.6.egg/openobject/tools/_expose.py in func_wrapper(*args=(<openobject.controllers._root.Root object>, 'openerp', 'execute'), **kw={'_': '1295330321518', 'action': '{"groups_id": [], "domain": "[(\'categ_id\',\'child... "usage": false, "type": "ir.actions.act_window"}', 'data': '{"context": {"lang": "en_US", "tz": false, "sect...ry", "id": 10, "report_type": "pdf", "ids": [10]}'})
180 raise cherrypy.HTTPError(405)
181
182 res = func(*args, **kw)
183 if format == 'json' or (allow_json and 'allow_json' in cherrypy.request.params):
184 cherrypy.response.headers['Content-Type'] = 'text/javascript'
global res = '/home/openerp/openerp-virt/lib/python2.6/site-pa...enerp_web-6.0.0_rc2-py2.6.egg/doc/openerp-web.cfg', func = <function default>, args = (<openobject.controllers._root.Root object>, 'openerp', 'execute'), kw = {'_': '1295330321518', 'action': '{"groups_id": [], "domain": "[(\'categ_id\',\'child... "usage": false, "type": "ir.actions.act_window"}', 'data': '{"context": {"lang": "en_US", "tz": false, "sect...ry", "id": 10, "report_type": "pdf", "ids": [10]}'}
/home/openerp/openerp-virt/lib/python2.6/site-packages/openerp_web-6.0.0_rc2-py2.6.egg/openobject/controllers/_root.py in default(self=<openobject.controllers._root.Root object>, *args=('openerp', 'execute'), **kw={'_': '1295330321518', 'action': '{"groups_id": [], "domain": "[(\'categ_id\',\'child... "usage": false, "type": "ir.actions.act_window"}', 'data': '{"context": {"lang": "en_US", "tz": false, "sect...ry", "id": 10, "report_type": "pdf", "ids": [10]}'})
85 request.handler = cherrypy.NotFound()
86
87 return request.handler()
88
89 def find_handler(self):
request = <cherrypy._ThreadLocalProxy object>, request.handler = <cherrypy._cpdispatch.LateParamPageHandler object>
/home/openerp/openerp-virt/lib/python2.6/site-packages/cherrypy/_cpdispatch.py in __call__(self=<cherrypy._cpdispatch.LateParamPageHandler object>)
23 def __call__(self):
24 try:
25 return self.callable(*self.args, **self.kwargs)
26 except TypeError, x:
27 test_callable_spec(self.callable, self.args, self.kwargs)
self = <cherrypy._cpdispatch.LateParamPageHandler object>, self.callable = <function index>, self.args = (), self.kwargs = {'action': '{"groups_id": [], "domain": "[(\'categ_id\',\'child... "usage": false, "type": "ir.actions.act_window"}', 'data': '{"context": {"lang": "en_US", "tz": false, "sect...ry", "id": 10, "report_type": "pdf", "ids": [10]}'}
/home/openerp/openerp-virt/lib/python2.6/site-packages/openerp_web-6.0.0_rc2-py2.6.egg/addons/openerp/controllers/utils.py in wrapper(*args=(), **kw={'action': '{"groups_id": [], "domain": "[(\'categ_id\',\'child... "usage": false, "type": "ir.actions.act_window"}', 'data': '{"context": {"lang": "en_US", "tz": false, "sect...ry", "id": 10, "report_type": "pdf", "ids": [10]}'})
110 # User is logged in; allow access
111 clear_login_fields(kw)
112 return fn(*args, **kw)
113 else:
114 action = kw.get('login_action', '')
fn = <bound method Execute.index of <openerp.controllers.execute.Execute object>>, args = (), kw = {'action': '{"groups_id": [], "domain": "[(\'categ_id\',\'child... "usage": false, "type": "ir.actions.act_window"}', 'data': '{"context": {"lang": "en_US", "tz": false, "sect...ry", "id": 10, "report_type": "pdf", "ids": [10]}'}
/home/openerp/openerp-virt/lib/python2.6/site-packages/openerp_web-6.0.0_rc2-py2.6.egg/openobject/tools/_expose.py in func_wrapper(*args=(<openerp.controllers.execute.Execute object>,), **kw={'action': '{"groups_id": [], "domain": "[(\'categ_id\',\'child... "usage": false, "type": "ir.actions.act_window"}', 'data': '{"context": {"lang": "en_US", "tz": false, "sect...ry", "id": 10, "report_type": "pdf", "ids": [10]}'})
180 raise cherrypy.HTTPError(405)
181
182 res = func(*args, **kw)
183 if format == 'json' or (allow_json and 'allow_json' in cherrypy.request.params):
184 cherrypy.response.headers['Content-Type'] = 'text/javascript'
global res = '/home/openerp/openerp-virt/lib/python2.6/site-pa...enerp_web-6.0.0_rc2-py2.6.egg/doc/openerp-web.cfg', func = <function index>, args = (<openerp.controllers.execute.Execute object>,), kw = {'action': '{"groups_id": [], "domain": "[(\'categ_id\',\'child... "usage": false, "type": "ir.actions.act_window"}', 'data': '{"context": {"lang": "en_US", "tz": false, "sect...ry", "id": 10, "report_type": "pdf", "ids": [10]}'}
/home/openerp/openerp-virt/lib/python2.6/site-packages/openerp_web-6.0.0_rc2-py2.6.egg/addons/openerp/controllers/execute.py in index(self=<openerp.controllers.execute.Execute object>, action='{"groups_id": [], "domain": "[(\'categ_id\',\'child... "usage": false, "type": "ir.actions.act_window"}', data='{"context": {"lang": "en_US", "tz": false, "sect...ry", "id": 10, "report_type": "pdf", "ids": [10]}')
13 def index(self, action, data):
14 return actions.execute(
15 simplejson.loads(action),
16 **dict((key.encode('ascii'), value) for key, value in simplejson.loads(data).iteritems())
17 )
builtin dict = <type 'dict'>, key undefined, value undefined, global simplejson = <module 'simplejson' from '/home/openerp/openerp...python2.6/site-packages/simplejson/__init__.pyc'>, simplejson.loads = <function loads>, data = '{"context": {"lang": "en_US", "tz": false, "sect...ry", "id": 10, "report_type": "pdf", "ids": [10]}', ).iteritems undefined
/home/openerp/openerp-virt/lib/python2.6/site-packages/openerp_web-6.0.0_rc2-py2.6.egg/addons/openerp/controllers/actions.py in execute(action={'auto_refresh': 0, 'auto_search': True, 'context': "{'categ_id':active_id}", 'display_menu_tip': True, 'domain': "[('categ_id','child_of',[active_id])]", 'filter': False, 'groups_id': [], 'help': False, 'id': 120, 'limit': 80, ...}, **data={'context': {'categ_id': False, 'client': 'web', 'lang': 'en_US', 'section_id': False, 'tz': False}, 'id': 10, 'ids': [10], 'limit': 20, 'model': 'product.category', 'report_type': 'pdf', 'res_id': None, 'res_model': 'product.product', 'search_view': None, 'view_mode': 'tree,form', ...})
370
371 action_executor = ACTIONS_BY_TYPE[action['type']]
372 return action_executor(action, data)
373
374 def execute_url(**data):
action_executor = <function act_window>, action = {'auto_refresh': 0, 'auto_search': True, 'context': "{'categ_id':active_id}", 'display_menu_tip': True, 'domain': "[('categ_id','child_of',[active_id])]", 'filter': False, 'groups_id': [], 'help': False, 'id': 120, 'limit': 80, ...}, data = {'context': {'categ_id': False, 'client': 'web', 'lang': 'en_US', 'section_id': False, 'tz': False}, 'id': 10, 'ids': [10], 'limit': 20, 'model': 'product.category', 'report_type': 'pdf', 'res_id': None, 'res_model': 'product.product', 'search_view': None, 'view_mode': 'tree,form', ...}
/home/openerp/openerp-virt/lib/python2.6/site-packages/openerp_web-6.0.0_rc2-py2.6.egg/addons/openerp/controllers/actions.py in act_window(action={'auto_refresh': 0, 'auto_search': True, 'context': "{'categ_id':active_id}", 'display_menu_tip': True, 'domain': "[('categ_id','child_of',[active_id])]", 'filter': False, 'groups_id': [], 'help': False, 'id': 120, 'limit': 80, ...}, data={'context': {'categ_id': False, 'client': 'web', 'lang': 'en_US', 'section_id': False, 'tz': False}, 'id': 10, 'ids': [10], 'limit': 20, 'model': 'product.category', 'report_type': 'pdf', 'res_id': None, 'res_model': 'product.product', 'search_view': None, 'view_mode': 'tree,form', ...})
209 search_view_id = rpc.RPCProxy('ir.ui.view').search([('type','=', 'search'), ('model','=',action['res_model'])], 0, 0, 0, rpc.session.context)
210 if search_view_id:
211 action['context']['search_view'] = search_view_id[0]
212
213 view_ids = False
action = {'auto_refresh': 0, 'auto_search': True, 'context': "{'categ_id':active_id}", 'display_menu_tip': True, 'domain': "[('categ_id','child_of',[active_id])]", 'filter': False, 'groups_id': [], 'help': False, 'id': 120, 'limit': 80, ...}, search_view_id = [225, 620]
<type 'exceptions.TypeError'>: 'str' object does not support item assignment
args = ("'str' object does not support item assignment",)
message = "'str' object does not support item assignment"
References