Skip to Content
Menu
This question has been flagged
2 Replies
3838 Views

When I try to edit the SEO details on the /shop page I get the error below. Forum post suggested that these could be remains of uninstalled apps. Is there a database cleanup method to fix this? 

2019-05-23 11:26:31,297 3820 ERROR jpkconsulting odoo.sql_db: bad query: b'DELETE FROM ir_ui_view WHERE id IN (1838)'
ERROR: update or delete on table "ir_ui_view" violates foreign key constraint "ir_ui_view_inherit_id_fkey" on table "ir_ui_view"
DETAIL:  Key (id)=(1838) is still referenced from table "ir_ui_view".



Avatar
Discard
Author Best Answer

Thanks Yenthe, 

I tried to install the module, I stopped the installation after more than an hour. So I'll try the queries. 

Update: 

I have tried  to delete the row: 

delete from ir_ui_view where id = 1838; 

Gives me the same error. 

What I don't understand is the foreign key in the same table. 

BR, 

Johan

Avatar
Discard
Best Answer

Hi JPK,

There have actually been a few fixes in the last weeks/months that solved issues like this. Sadly enough those won't be fixing the current cases you have right now though.
OCA has a cleanup module with which you can cleanup database records. Have a look at https://github.com/OCA/server-tools/tree/11.0/database_cleanup for this module.
It is not available for V12 right now but I assume that the V11 module will actually work out of the box on V12 too.

Alternatively you can do queries on your database yourself to delete the records that are coming up in your log. For example:

delete from ir_ui_view where id = 1838;


Regards,
Yenthe

Avatar
Discard
Related Posts Replies Views Activity
0
Feb 20
2
0
Jun 23
3673
0
May 23
5
2
Apr 21
10352
4
Nov 20
3617