Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
5081 Lượt xem

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



Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 2 20
2
0
thg 6 23
6763
0
thg 5 23
5
2
thg 4 21
13009
4
thg 11 20
5492