← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 849887] Re: Editing of custom m2m field in Object raise an error

 

** Attachment added: "add_m2m_view.png"
   https://bugs.launchpad.net/openobject-server/+bug/849887/+attachment/2426092/+files/add_m2m_view.png

** Changed in: openobject-server
       Status: Confirmed => Incomplete

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to OpenERP Project Group.
https://bugs.launchpad.net/bugs/849887

Title:
  Editing of custom m2m field in Object raise an error

Status in OpenERP Server:
  Incomplete

Bug description:
  To reproduce the issue follow the given steps :

  1). Create a object x_product.material with one char field
  2). Create a m2m field x_material_id in product.product object with object reference to x_product.material and save it.
  3). Edit the m2m x_material_id column name

  It raise the following error.

  [2011-09-14 15:30:11,081][16933] ERROR:db.cursor:Programming error: column "x_material_id" does not exist
  , in query ALTER TABLE "product_product" RENAME COLUMN "x_material_id" TO "x_dsdfsd_id"
  [2011-09-14 15:30:11,081][16933] ERROR:web-services:Uncaught exception
  Traceback (most recent call last):
    File "/home/ado/Desktop/6.0/stable-6/openobject-server/bin/osv/osv.py", line 122, in wrapper
      return f(self, dbname, *args, **kwargs)
    File "/home/ado/Desktop/6.0/stable-6/openobject-server/bin/osv/osv.py", line 176, in execute
      res = self.execute_cr(cr, uid, obj, method, *args, **kw)
    File "/home/ado/Desktop/6.0/stable-6/openobject-server/bin/osv/osv.py", line 167, in execute_cr
      return getattr(object, method)(cr, uid, *args, **kw)
    File "/home/ado/Desktop/6.0/stable-6/openobject-server/bin/addons/base/ir/ir_model.py", line 144, in write
      return super(ir_model,self).write(cr, user, ids, vals, context)
    File "/home/ado/Desktop/6.0/stable-6/openobject-server/bin/osv/orm.py", line 3438, in write
      result += self._columns[field].set(cr, self, id, field, vals[field], user, context=rel_context) or []
    File "/home/ado/Desktop/6.0/stable-6/openobject-server/bin/osv/fields.py", line 505, in set
      obj.write(cr, user, [act[1]], act[2], context=context)
    File "/home/ado/Desktop/6.0/stable-6/openobject-server/bin/addons/base/ir/ir_model.py", line 381, in write
      cr.execute('ALTER TABLE "%s" RENAME COLUMN "%s" TO "%s"' % column_rename[1])
    File "/home/ado/Desktop/6.0/stable-6/openobject-server/bin/sql_db.py", line 78, in wrapper
      return f(self, *args, **kwargs)
    File "/home/ado/Desktop/6.0/stable-6/openobject-server/bin/sql_db.py", line 131, in execute
      res = self._obj.execute(query, params)
  ProgrammingError: column "x_material_id" does not exist

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-server/+bug/849887/+subscriptions


References