Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
2 Replies
5068 Tampilan

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
Buang
Penulis Jawaban Terbai

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
Buang
Jawaban Terbai

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
Buang
Post Terkait Replies Tampilan Aktivitas
0
Feb 20
2
0
Jun 23
6758
0
Mei 23
5
2
Apr 21
13007
4
Nov 20
5491