← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 740331] [NEW] Upgrade fails on current 6.0 branch

 

Public bug reported:

I have no idea how this happened but when I tried to update my modules I got this error
Traceback (most recent call last):
  File "/opt/openerp/openobject-client/bin/widget/view/form.py", line 227, in _action
    self.screen.reload()
  File "/opt/openerp/openobject-client/bin/widget/screen/screen.py", line 732, in reload
    self.current_model.reload()
  File "/opt/openerp/openobject-client/bin/widget/model/record.py", line 265, in reload
    return self._reload(self.mgroup.mfields.keys() + [CONCURRENCY_CHECK_FIELD])
  File "/opt/openerp/openobject-client/bin/widget/model/record.py", line 273, in _reload
    res = self.rpc.read([self.id], fields, c)
  File "/opt/openerp/openobject-client/bin/rpc.py", line 372, in __call__
    return session.rpc_exec_auth('/object', 'execute', self.object, self.func, *args)
  File "/opt/openerp/openobject-client/bin/rpc.py", line 186, in rpc_exec_auth
    return sock.exec_auth(method, *args)
  File "/opt/openerp/openobject-client/bin/rpc.py", line 120, in exec_auth
    res = self.execute(method, self._uid, self._passwd, *args)
  File "/opt/openerp/openobject-client/bin/rpc.py", line 137, in execute
    raise e
tiny_socket.Myexception: ('cannot alter type of a column used by a view or rule\nDETAIL:  rule _RETURN on view report_account_invoice_product depends on column "discount"\n', 'Traceback (most recent call last):\n  File "/opt/openerp/server/bin/netsvc.py", line 489, in dispatch\n    result = ExportService.getService(service_name).dispatch(method, auth, params)\n  File "/opt/openerp/server/bin/service/web_services.py", line 596, in dispatch\n    security.check(db,uid,passwd)\n  File "/opt/openerp/server/bin/service/security.py", line 43, in check\n    pool = pooler.get_pool(db)\n  File "/opt/openerp/server/bin/pooler.py", line 79, in get_pool\n    pool = get_db_and_pool(db_name, force_demo, status, update_module)[1]\n  File "/opt/openerp/server/bin/pooler.py", line 39, in get_db_and_pool\n    addons.load_modules(db, force_demo, status, update_module)\n  File "/opt/openerp/server/bin/addons/__init__.py", line 883, in load_modules\n    processed_modules.extend(load_module_graph(cr, graph, status, report=report, skip_modules=processed_modules))\n  File "/opt/openerp/server/bin/addons/__init__.py", line 719, in load_module_graph\n    init_module_objects(cr, package.name, modules)\n  File "/opt/openerp/server/bin/addons/__init__.py", line 414, in init_module_objects\n    result = obj._auto_init(cr, {\'module\': module_name})\n  File "/opt/openerp/addons/magentoerpconnect/sale.py", line 294, in _auto_init\n    cr.execute("ALTER TABLE account_invoice_line ALTER COLUMN discount TYPE numeric(16,6);")\n  File "/opt/openerp/server/bin/sql_db.py", line 78, in wrapper\n    return f(self, *args, **kwargs)\n  File "/opt/openerp/server/bin/sql_db.py", line 131, in execute\n    res = self._obj.execute(query, params)\nNotSupportedError: cannot alter type of a column used by a view or rule\nDETAIL:  rule _RETURN on view report_account_invoice_product depends on column "discount"\n\n')


I had to comment out the 2 alter statement lines, it was caught in an infinite loop and I couldnt cancel the update even when restarting the server it kept trying over and over again. I didnt change anything, especially in addons modules. Not sure how this could have happened.

** Affects: magentoerpconnect
     Importance: Undecided
         Status: New

-- 
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/740331

Title:
  Upgrade fails on current  6.0 branch

Status in Magento Open ERP Connector:
  New

Bug description:
  I have no idea how this happened but when I tried to update my modules I got this error
  Traceback (most recent call last):
    File "/opt/openerp/openobject-client/bin/widget/view/form.py", line 227, in _action
      self.screen.reload()
    File "/opt/openerp/openobject-client/bin/widget/screen/screen.py", line 732, in reload
      self.current_model.reload()
    File "/opt/openerp/openobject-client/bin/widget/model/record.py", line 265, in reload
      return self._reload(self.mgroup.mfields.keys() + [CONCURRENCY_CHECK_FIELD])
    File "/opt/openerp/openobject-client/bin/widget/model/record.py", line 273, in _reload
      res = self.rpc.read([self.id], fields, c)
    File "/opt/openerp/openobject-client/bin/rpc.py", line 372, in __call__
      return session.rpc_exec_auth('/object', 'execute', self.object, self.func, *args)
    File "/opt/openerp/openobject-client/bin/rpc.py", line 186, in rpc_exec_auth
      return sock.exec_auth(method, *args)
    File "/opt/openerp/openobject-client/bin/rpc.py", line 120, in exec_auth
      res = self.execute(method, self._uid, self._passwd, *args)
    File "/opt/openerp/openobject-client/bin/rpc.py", line 137, in execute
      raise e
  tiny_socket.Myexception: ('cannot alter type of a column used by a view or rule\nDETAIL:  rule _RETURN on view report_account_invoice_product depends on column "discount"\n', 'Traceback (most recent call last):\n  File "/opt/openerp/server/bin/netsvc.py", line 489, in dispatch\n    result = ExportService.getService(service_name).dispatch(method, auth, params)\n  File "/opt/openerp/server/bin/service/web_services.py", line 596, in dispatch\n    security.check(db,uid,passwd)\n  File "/opt/openerp/server/bin/service/security.py", line 43, in check\n    pool = pooler.get_pool(db)\n  File "/opt/openerp/server/bin/pooler.py", line 79, in get_pool\n    pool = get_db_and_pool(db_name, force_demo, status, update_module)[1]\n  File "/opt/openerp/server/bin/pooler.py", line 39, in get_db_and_pool\n    addons.load_modules(db, force_demo, status, update_module)\n  File "/opt/openerp/server/bin/addons/__init__.py", line 883, in load_modules\n    processed_modules.extend(load_module_graph(cr, graph, status, report=report, skip_modules=processed_modules))\n  File "/opt/openerp/server/bin/addons/__init__.py", line 719, in load_module_graph\n    init_module_objects(cr, package.name, modules)\n  File "/opt/openerp/server/bin/addons/__init__.py", line 414, in init_module_objects\n    result = obj._auto_init(cr, {\'module\': module_name})\n  File "/opt/openerp/addons/magentoerpconnect/sale.py", line 294, in _auto_init\n    cr.execute("ALTER TABLE account_invoice_line ALTER COLUMN discount TYPE numeric(16,6);")\n  File "/opt/openerp/server/bin/sql_db.py", line 78, in wrapper\n    return f(self, *args, **kwargs)\n  File "/opt/openerp/server/bin/sql_db.py", line 131, in execute\n    res = self._obj.execute(query, params)\nNotSupportedError: cannot alter type of a column used by a view or rule\nDETAIL:  rule _RETURN on view report_account_invoice_product depends on column "discount"\n\n')

  
  I had to comment out the 2 alter statement lines, it was caught in an infinite loop and I couldnt cancel the update even when restarting the server it kept trying over and over again. I didnt change anything, especially in addons modules. Not sure how this could have happened.



Follow ups

References