← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 704051] Re: [6.0] critical regression: inheriting ir_model_data will now destroy your database!

 

** Branch linked: lp:openobject-server

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

Title:
   [6.0] critical regression: inheriting ir_model_data will now destroy
  your database!

Status in OpenObject Server:
  In Progress

Bug description:
  Hello,

  sorry to shout that one loudly, but I know that v6 "stable" is about
  to be release, so I want to make sure you take a look to it:

  A change introduced recently in the server (after rev #3224 I think),
  will now destroy important database records in the update process if
  you have any object inheriting the ir.model.data object.

  Simple code like this one will trigger the bug, it's attached as a
  "kaboom" module so you can test:

  class ir_model_data(osv.osv):
      _inherit = "ir.model.data"

  ir_model_data()

  After loading such code, if you restart the server with option --update=all --database=your_base,
  your database will be broken, for instance all your menu will be broken at the next login. You can also see that in the console with logs such as:
  [2011-01-17 15:24:43,983][magento] INFO:addons.base.ir.model.data:Deleting 23@ir.actions.act_window
  [2011-01-17 15:24:43,991][magento] INFO:addons.base.ir.model.data:Deleting 13@ir.model.access
  [2011-01-17 15:24:43,997][magento] INFO:addons.base.ir.model.data:Deleting 21@xxxxxxxxxx
  [2011-01-17 15:24:44,004][magento] INFO:addons.base.ir.model.data:Deleting 5@ir.actions.wizard
  [2011-01-17 15:24:44,009][magento] INFO:addons.base.ir.model.data:Deleting 43@ir.model.access
  [2011-01-17 15:24:44,015][magento] INFO:addons.base.ir.model.data:Deleting 127@xxxxxxxxxx
  [2011-01-17 15:24:44,022][magento] INFO:addons.base.ir.model.data:Deleting 11@xxxxxxxxxx
  [2011-01-17 15:24:44,028][magento] INFO:addons.base.ir.model.data:Deleting 2@res.groups
  ...

  
  An important consequence of that bug is that the magentoerpconnect certified module is now broken:
  https://bugs.launchpad.net/magentoerpconnect/+bug/701644
  We really need to override or_model_data in the base_external_referentials module, if you don't fix what triggers this behavior in the server, it would be pretty hard to make base_external_referentials and dependent connectors work again without patch...





References