Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
2 Odpowiedzi
5077 Widoki

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".



Awatar
Odrzuć
Autor Najlepsza odpowiedź

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

Awatar
Odrzuć
Najlepsza odpowiedź

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

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
0
lut 20
2
0
cze 23
6761
0
maj 23
5
2
kwi 21
13008
4
lis 20
5491