I confirm that on latest trunk (rev. 4072) trying to rename a custom m2m column does not work and causes the following traceback. However the importance of this bug should be corrected, it is at best a Low priority issue, and rather a Wishlist.
Renaming of custom columns is experimental, especially for many2many fields. The fix might involve returning a clear error message that explains this is not supported, and the custom column should instead be dropped and re-added.
Server Traceback (most recent call last):
File "/home/odoo/runbot/static/openerp-dev-trunk-3243/server/openerp/addons/web/common/http.py", line 592, in send
result = openerp.netsvc.dispatch_rpc(service_name, method, args)
File "/home/odoo/runbot/static/openerp-dev-trunk-3243/server/openerp/netsvc.py", line 360, in dispatch_rpc
result = ExportService.getService(service_name).dispatch(method, params)
File "/home/odoo/runbot/static/openerp-dev-trunk-3243/server/openerp/service/web_services.py", line 572, in dispatch
res = fn(db, uid, *params)
File "/home/odoo/runbot/static/openerp-dev-trunk-3243/server/openerp/osv/osv.py", line 167, in execute_kw
return self.execute(db, uid, obj, method, *args, **kw or {})
File "/home/odoo/runbot/static/openerp-dev-trunk-3243/server/openerp/osv/osv.py", line 121, in wrapper
return f(self, dbname, *args, **kwargs)
File "/home/odoo/runbot/static/openerp-dev-trunk-3243/server/openerp/osv/osv.py", line 176, in execute
res = self.execute_cr(cr, uid, obj, method, *args, **kw)
File "/home/odoo/runbot/static/openerp-dev-trunk-3243/server/openerp/addons/audittrail/audittrail.py", line 495, in execute_cr
return fct_src(cr, uid, model, method, *args)
File "/home/odoo/runbot/static/openerp-dev-trunk-3243/server/openerp/osv/osv.py", line 164, in execute_cr
return getattr(object, method)(cr, uid, *args, **kw)
File "/home/odoo/runbot/static/openerp-dev-trunk-3243/server/openerp/addons/base/ir/ir_model.py", line 153, in write
return super(ir_model,self).write(cr, user, ids, vals, context)
File "/home/odoo/runbot/static/openerp-dev-trunk-3243/server/openerp/osv/orm.py", line 3920, in write
result += self._columns[field].set(cr, self, id, field, vals[field], user, context=rel_context) or []
File "/home/odoo/runbot/static/openerp-dev-trunk-3243/server/openerp/osv/fields.py", line 567, in set
obj.write(cr, user, [act[1]], act[2], context=context)
File "/home/odoo/runbot/static/openerp-dev-trunk-3243/server/openerp/addons/base/ir/ir_model.py", line 400, in write
cr.execute('ALTER TABLE "%s" RENAME COLUMN "%s" TO "%s"' % column_rename[1])
File "/home/odoo/runbot/static/openerp-dev-trunk-3243/server/openerp/sql_db.py", line 152, in wrapper
return f(self, *args, **kwargs)
File "/home/odoo/runbot/static/openerp-dev-trunk-3243/server/openerp/sql_db.py", line 212, in execute
res = self._obj.execute(query, params)
ProgrammingError: column "x_test_ids" does not exist
I confirm that on latest trunk (rev. 4072) trying to rename a custom m2m column does not work and causes the following traceback. However the importance of this bug should be corrected, it is at best a Low priority issue, and rather a Wishlist.
Renaming of custom columns is experimental, especially for many2many fields. The fix might involve returning a clear error message that explains this is not supported, and the custom column should instead be dropped and re-added.
Server Traceback (most recent call last): odoo/runbot/ static/ openerp- dev-trunk- 3243/server/ openerp/ addons/ web/common/ http.py" , line 592, in send netsvc. dispatch_ rpc(service_ name, method, args) odoo/runbot/ static/ openerp- dev-trunk- 3243/server/ openerp/ netsvc. py", line 360, in dispatch_rpc getService( service_ name).dispatch( method, params) odoo/runbot/ static/ openerp- dev-trunk- 3243/server/ openerp/ service/ web_services. py", line 572, in dispatch odoo/runbot/ static/ openerp- dev-trunk- 3243/server/ openerp/ osv/osv. py", line 167, in execute_kw odoo/runbot/ static/ openerp- dev-trunk- 3243/server/ openerp/ osv/osv. py", line 121, in wrapper odoo/runbot/ static/ openerp- dev-trunk- 3243/server/ openerp/ osv/osv. py", line 176, in execute odoo/runbot/ static/ openerp- dev-trunk- 3243/server/ openerp/ addons/ audittrail/ audittrail. py", line 495, in execute_cr odoo/runbot/ static/ openerp- dev-trunk- 3243/server/ openerp/ osv/osv. py", line 164, in execute_cr odoo/runbot/ static/ openerp- dev-trunk- 3243/server/ openerp/ addons/ base/ir/ ir_model. py", line 153, in write model,self) .write( cr, user, ids, vals, context) odoo/runbot/ static/ openerp- dev-trunk- 3243/server/ openerp/ osv/orm. py", line 3920, in write field]. set(cr, self, id, field, vals[field], user, context= rel_context) or [] odoo/runbot/ static/ openerp- dev-trunk- 3243/server/ openerp/ osv/fields. py", line 567, in set odoo/runbot/ static/ openerp- dev-trunk- 3243/server/ openerp/ addons/ base/ir/ ir_model. py", line 400, in write execute( 'ALTER TABLE "%s" RENAME COLUMN "%s" TO "%s"' % column_rename[1]) odoo/runbot/ static/ openerp- dev-trunk- 3243/server/ openerp/ sql_db. py", line 152, in wrapper odoo/runbot/ static/ openerp- dev-trunk- 3243/server/ openerp/ sql_db. py", line 212, in execute execute( query, params)
File "/home/
result = openerp.
File "/home/
result = ExportService.
File "/home/
res = fn(db, uid, *params)
File "/home/
return self.execute(db, uid, obj, method, *args, **kw or {})
File "/home/
return f(self, dbname, *args, **kwargs)
File "/home/
res = self.execute_cr(cr, uid, obj, method, *args, **kw)
File "/home/
return fct_src(cr, uid, model, method, *args)
File "/home/
return getattr(object, method)(cr, uid, *args, **kw)
File "/home/
return super(ir_
File "/home/
result += self._columns[
File "/home/
obj.write(cr, user, [act[1]], act[2], context=context)
File "/home/
cr.
File "/home/
return f(self, *args, **kwargs)
File "/home/
res = self._obj.
ProgrammingError: column "x_test_ids" does not exist