Could not delete obsolete record with id

Asked by Réal Carbonneau

I get a large number (approx 350) of very similar errors. The upgrade complains that it can't delete an obsolete entry because there is missing a related entry in ir.property. Maybe I am doing something wrong since I did not see any other posts related to these types of errors. Or maybe this can simply be ignored even if there is ERROR indicated?

--------------------------------

2012-09-27 02:53:19,805 4120 INFO OpenUpgrade61 openerp.addons.base.ir.ir_model: Deleting <email address hidden>
2012-09-27 02:53:19,806 4120 ERROR OpenUpgrade61 openerp.sql_db: bad query: SELECT "ir_property".id FROM "ir_property" WHERE (ir_property."res_id" IS NULL AND (ir_property."value_reference"$
Traceback (most recent call last):
  File "/opt/openupgrade-server/openerp/sql_db.py", line 212, in execute
    res = self._obj.execute(query, params)
InternalError: current transaction is aborted, commands ignored until end of transaction block

2012-09-27 02:53:19,806 4120 WARNING OpenUpgrade61 openerp.addons.base.ir.ir_model: Could not delete obsolete record with id: 217 of model ir.ui.view
There should be some relation that points to this resource
You should manually fix this and restart with --update=module
2012-09-27 02:53:19,806 4120 INFO OpenUpgrade61 openerp.addons.base.ir.ir_model: Deleting <email address hidden>
2012-09-27 02:53:19,807 4120 ERROR OpenUpgrade61 openerp.sql_db: bad query: SELECT "ir_property".id FROM "ir_property" WHERE (ir_property."res_id" IS NULL AND (ir_property."value_reference"$
Traceback (most recent call last):
  File "/opt/openupgrade-server/openerp/sql_db.py", line 212, in execute
    res = self._obj.execute(query, params)
InternalError: current transaction is aborted, commands ignored until end of transaction block

2012-09-27 02:53:19,807 4120 WARNING OpenUpgrade61 openerp.addons.base.ir.ir_model: Could not delete obsolete record with id: 218 of model ir.ui.view
There should be some relation that points to this resource
You should manually fix this and restart with --update=module
2012-09-27 02:53:19,807 4120 INFO OpenUpgrade61 openerp.addons.base.ir.ir_model: Deleting <email address hidden>act_window
2012-09-27 02:53:19,808 4120 ERROR OpenUpgrade61 openerp.sql_db: bad query: SELECT "ir_property".id FROM "ir_property" WHERE (ir_property."res_id" IS NULL AND (ir_property."value_reference"$
Traceback (most recent call last):
  File "/opt/openupgrade-server/openerp/sql_db.py", line 212, in execute
    res = self._obj.execute(query, params)
InternalError: current transaction is aborted, commands ignored until end of transaction block

2012-09-27 02:53:19,808 4120 WARNING OpenUpgrade61 openerp.addons.base.ir.ir_model: Could not delete obsolete record with id: 111 of model ir.actions.act_window
There should be some relation that points to this resource
You should manually fix this and restart with --update=module
2012-09-27 02:53:19,808 4120 INFO OpenUpgrade61 openerp.addons.base.ir.ir_model: Deleting <email address hidden>act_window
2012-09-27 02:53:19,809 4120 ERROR OpenUpgrade61 openerp.sql_db: bad query: SELECT "ir_property".id FROM "ir_property" WHERE (ir_property."res_id" IS NULL AND (ir_property."value_reference"$
Traceback (most recent call last):
  File "/opt/openupgrade-server/openerp/sql_db.py", line 212, in execute
    res = self._obj.execute(query, params)
InternalError: current transaction is aborted, commands ignored until end of transaction block

2012-09-27 02:53:19,809 4120 WARNING OpenUpgrade61 openerp.addons.base.ir.ir_model: Could not delete obsolete record with id: 113 of model ir.actions.act_window
There should be some relation that points to this resource
You should manually fix this and restart with --update=module
2012-09-27 02:53:19,809 4120 INFO OpenUpgrade61 openerp.addons.base.ir.ir_model: Deleting <email address hidden>
2012-09-27 02:53:19,809 4120 ERROR OpenUpgrade61 openerp.sql_db: bad query: SELECT "ir_property".id FROM "ir_property" WHERE (ir_property."res_id" IS NULL AND (ir_property."value_reference"$
Traceback (most recent call last):
  File "/opt/openupgrade-server/openerp/sql_db.py", line 212, in execute
    res = self._obj.execute(query, params)
InternalError: current transaction is aborted, commands ignored until end of transaction block

2012-09-27 02:53:19,810 4120 WARNING OpenUpgrade61 openerp.addons.base.ir.ir_model: Could not delete obsolete record with id: 149 of model ir.model.access
There should be some relation that points to this resource
You should manually fix this and restart with --update=module

Question information

Language:
English Edit question
Status:
Solved
For:
OpenUpgrade Addons Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:

This question was originally filed as bug #1057284.

Revision history for this message
Réal Carbonneau (real-carbonneau) said :
#1

When the other issues were resolved, these seemed to have dissapeared...

Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) said :
#2

Hi Réal,

it is not clear to me what the 'other issues' are that you are refering too, but if I understand correctly from your second post you have managed to solve this problem. I will reject this question therefore. Please reopen if you still encounter this problem.

Best regards,
Stefan.

Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) said :
#3

As per last comment

Revision history for this message
Réal Carbonneau (real-carbonneau) said :
#4

There were other errors. One was a duplicate key for a new unique index on stock_picking for name and company_id and another was a duplicate key on a new unique index for taxes on the field name and company_id (I don't have the exact names with me at the moment). In both cases, I had to change the values of name to make them unique.

I also manually delete a few of the obsolete records, but then decided to re-run the upgrade just in case because it was taking very long to do manually. When I re-ran the upgrade from a new copy of the data, it worked and did not give me those errors anymore.

Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) said :
#5

Hi Réal,

thank you for your detailed explanation! I am removing the 'invalid' status so that this will be easier to find for people encountering the same error messages.

Best regards,
Stefan.