Can not create product category

Bug #299891 reported by EdbO
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenERP
Fix Released
Undecided
Unassigned

Bug Description

Used software: Downloaded OpenERP 5.0 alpha from website.

Showing the categories works in both list and form view. Pressing the "new"-button doesn't do anything.
So, creating a new product category don't work. Server log gives no data, but the client log does:

Traceback (most recent call last):
  File "/home/harjan/ERP/openerp-client-5.0.0-alpha/bin/modules/gui/main.py", line 994, in _sig_child_call
    res = wid.handlers[button_name]()
  File "/home/harjan/ERP/openerp-client-5.0.0-alpha/bin/modules/gui/window/form.py", line 259, in sig_new
    self.screen.new()
  File "/home/harjan/ERP/openerp-client-5.0.0-alpha/bin/widget/screen/screen.py", line 361, in new
    model = self.models.model_new(default, self.domain, ctx)
  File "/home/harjan/ERP/openerp-client-5.0.0-alpha/bin/widget/model/group.py", line 238, in model_new
    newmod.default_get(domain, ctx)
  File "/home/harjan/ERP/openerp-client-5.0.0-alpha/bin/widget/model/record.py", line 138, in default_get
    self.set_default(val)
  File "/home/harjan/ERP/openerp-client-5.0.0-alpha/bin/widget/model/record.py", line 183, in set_default
    self.mgroup.mfields[fieldname].set_default(self, value)
  File "/home/harjan/ERP/openerp-client-5.0.0-alpha/bin/widget/model/field.py", line 104, in set_default
    res = self.set(model, value)
  File "/home/harjan/ERP/openerp-client-5.0.0-alpha/bin/widget/model/field.py", line 252, in set
    model.value[self.name] = result[0]
IndexError: list index out of range

Revision history for this message
Christophe Simonis (OpenERP) (kangol) wrote :

fixed in trunk (r1867)

Changed in openerp:
status: New → Fix Released
Revision history for this message
David L (david-labbe-hotmail) wrote :
Download full text (56.7 KiB)

Hi,

got a similar problem:

OpenERp 5.0 on WinXP new install.

Minimal Config + project related modules + hr related modules + product modules + account modules and a base uk CoA

When going to Products > Configuration > Product Categories > New then:
 + on the client -> cannot save anything
 + on the web client -> crash with following error:

============================================================================================

<type 'exceptions.IndexError'> Python 2.5.4: C:\Program Files\OpenERP AllInOne\Web\python25\python.exe
Thu Feb 26 17:33:34 2009

A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.
 C:\Program Files\OpenERP AllInOne\Web\python25\lib\site-packages\cherrypy-2.3.0-py2.5.egg\cherrypy\_cphttptools.py in _run(self=<cherrypy._cphttptools.Request object at 0x0162EB30>)
  119 applyFilters('before_main')
  120 if self.execute_main:
  121 self.main()
  122 break
  123 except cherrypy.InternalRedirect, ir:
self = <cherrypy._cphttptools.Request object at 0x0162EB30>, self.main = <bound method Request.main of <cherrypy._cphttptools.Request object at 0x0162EB30>>
 C:\Program Files\OpenERP AllInOne\Web\python25\lib\site-packages\cherrypy-2.3.0-py2.5.egg\cherrypy\_cphttptools.py in main(self=<cherrypy._cphttptools.Request object at 0x0162EB30>, path='/form/edit')
  262 self.object_path = '/' + '/'.join(object_path[1:])
  263 try:
  264 body = page_handler(*virtual_path, **self.params)
  265 except Exception, x:
  266 if hasattr(x, "args"):
body undefined, page_handler = <function edit at 0x03126730>, virtual_path = [], self = <cherrypy._cphttptools.Request object at 0x0162EB30>, self.params = {'context': u"{'_view_name': u'Products Categories', 'active_i...3], '_terp_target': u'current', 'active_id': 133}", 'count': u'0', 'domain': u'[]', 'id': u'False', 'ids': u'None', 'limit': u'80', 'model': u'product.category', 'offset': u'0', 'search_domain': u'None', 'view_ids': u'[152, False]', ...}
 C:\Program Files\OpenERP AllInOne\Web\python25\lib\site-packages\openerp_web-5.0.0_3-py2.5.egg\openerp\tinyres.py in wrapper(*args=(), **kw={'context': u"{'_view_name': u'Products Categories', 'active_i...3], '_terp_target': u'current', 'active_id': 133}", 'count': u'0', 'domain': u'[]', 'id': u'False', 'ids': u'None', 'limit': u'80', 'model': u'product.category', 'offset': u'0', 'search_domain': u'None', 'view_ids': u'[152, False]', ...})
   87 # User is logged in; allow access
   88 clear_login_fields(kw)
   89 return fn(*args, **kw)
   90 else:
   91 # User isn't logged in yet.
fn = <bound method Form.edit of <openerp.subcontrollers.form.Form object at 0x014D1590>>, args = (), kw = {'context': u"{'_view_name': u'Products Categories', 'active_i...3], '_terp_target': u'current', 'active_id': 133}", 'count': u'0', 'domain': u'[]', 'id': u'False', 'ids': u'None', 'limit': u'80', 'model': u'product.category', 'offset': u'0...

Revision history for this message
David L (david-labbe-hotmail) wrote :

By the way, the OpenERP version is the latest stable one.

The client log for the error mentionned above gives out the following:

==========================================
Traceback (most recent call last):
  File "modules\gui\main.pyo", line 1287, in _sig_child_call
  File "modules\gui\window\form.pyo", line 261, in sig_new
  File "widget\screen\screen.pyo", line 381, in new
  File "widget\screen\screen.pyo", line 291, in switch_view
  File "widget\screen\screen.pyo", line 384, in new
  File "widget\model\group.pyo", line 239, in model_new
  File "widget\model\record.pyo", line 162, in default_get
  File "widget\model\record.pyo", line 207, in set_default
  File "widget\model\field.pyo", line 104, in set_default
  File "widget\model\field.pyo", line 262, in set
IndexError: list index out of range
==========================================

Changed in openerp:
status: Fix Released → New
Revision history for this message
Fabien (Open ERP) (fp-tinyerp) wrote :

seems fixed in trunk. it works fine for me.
Please redwonload from lp and retest.

Changed in openerp:
status: New → 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.