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

During development I have on occasion decided to remove a model from an addon for a variety of reasons. When I restart my server and update my addon I see a warning.

Model addon_name.model_name is declared but cannot be loaded!

The above is a shortened version of the warning but those of you who have seen this know what I am referring to.

The cause as far as I know is a reference to the removed model in the ir_model table which can be easily removed by executing the following sql command.

delete from ir_model where name='addon_name.model_name';


What is the preferred way to deprecate a model? Should some variation of the above sql be included in a migration script? 

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 7 23
2467
3
thg 6 25
1234
2
thg 3 15
6884
0
thg 3 25
2
1
thg 5 25
2277