Errors creating drop down lists - stops customisation

Bug #631547 reported by mrmango
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Server (MOVED TO GITHUB)
Status tracked in Trunk
5.0
Won't Fix
Undecided
Unassigned
Trunk
Fix Released
Low
OpenERP's Framework R&D

Bug Description

When editing the res.partners.contact object within the web client or gtk client, the below error occurs. However this only seems to occur after adding a selection field within any selection values example being the default []. I expect an error like that, however if you go back to edit the same field, enter some values like [('select1','select1')], saving the object re produces the same error. Checking all fields with selection a\s the type, making sure all have values to select, does not make any difference. Upgrading to the latest version does not resolve this.

Environment Information :
System : Windows-Vista-6.1.7600
OS Name : nt
Operating System Release : Vista
Operating System Version : 6.1.7600
Operating System Architecture : 32bit
Operating System Locale : en_GB.cp1252
Python Version : 2.5.2
OpenERP-Client Version : 5.0.12
Last revision No. & ID :Bazaar Package not Found !Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/openerp-server/netsvc.py", line 247, in dispatch
    result = LocalService(service_name)(method, *params)
  File "/usr/lib/python2.5/site-packages/openerp-server/netsvc.py", line 76, in __call__
    return getattr(self, method)(*params)
  File "/usr/lib/python2.5/site-packages/openerp-server/service/web_services.py", line 577, in execute
    res = service.execute(db, uid, object, method, *args)
  File "/usr/lib/python2.5/site-packages/openerp-server/osv/osv.py", line 58, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/usr/lib/python2.5/site-packages/openerp-server/osv/osv.py", line 119, in execute
    res = pool.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/usr/lib/python2.5/site-packages/openerp-server/osv/osv.py", line 111, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/usr/lib/python2.5/site-packages/openerp-server/addons/base/ir/ir_model.py", line 77, in write
    return super(ir_model,self).write(cr, user, ids, vals, context)
  File "/usr/lib/python2.5/site-packages/openerp-server/osv/orm.py", line 2659, in write
    result += self._columns[field].set(cr, self, id, field, vals[field], user, context=rel_context) or []
  File "/usr/lib/python2.5/site-packages/openerp-server/osv/fields.py", line 445, in set
    id_new = obj.create(cr, user, act[2], context=context)
  File "/usr/lib/python2.5/site-packages/openerp-server/addons/base/ir/ir_model.py", line 271, in create
    self.pool.get(vals['model'])._auto_init(cr, ctx)
  File "/usr/lib/python2.5/site-packages/openerp-server/osv/orm.py", line 1885, in _auto_init
    f_obj_type = get_pg_type(f) and get_pg_type(f)[0]
  File "/usr/lib/python2.5/site-packages/openerp-server/osv/orm.py", line 297, in get_pg_type
    if isinstance(f.selection, list) and isinstance(f.selection[0][0], (str, unicode)):
IndexError: list index out of range

Related branches

Changed in openobject-server:
status: New → Confirmed
Changed in openobject-server:
importance: Undecided → Low
Revision history for this message
Jamin Shah(OpenERP) (jamin-openerp) wrote :

Hello,

Our R&D Teams are focused on the latest OpenERP version, and this issue does not affect it.

We stand of course ready to backport the change to stable releases if it has an impact on any customer. In this case please report it to our maintenance team via the OpenERP Publisher's Warranty. They will quickly help solve the issue and backport the fix if needed.

Thank you for your understanding!

Revision history for this message
Yogesh (SerpentCS) (yogesh-serpentcs) wrote :

Hello,

It has been fixed into https://code.launchpad.net/~openerp-dev/openobject-server/ysa-server-framework branch by:
Revision ID: <email address hidden>
Revno: 3052

Thanks.

Revision history for this message
Olivier Dony (Odoo) (odo-openerp) wrote :

Resetting to 'In progress' as the proposed patch does not fix completely the problem, namely the fact that the error persists after correcting the selection attribute value.

Revision history for this message
Olivier Dony (Odoo) (odo-openerp) wrote :

This should not be fully fixed, and alterations to other attributes of custom fields will now work as well.
Please update to the latest server version, after 3235 <email address hidden> to get the fix.

Revision history for this message
Olivier Dony (Odoo) (odo-openerp) wrote :

I meant of course: "this should _now_ be fully fixed", in comment #4 ;-)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.