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

I added a new field inside my custom model using the following steps:

Activate developer mode 
Go to Settings -> Technical -> Database Structure -> Models and search for your table name and add new fields in the table
Go to Settings -> Technical -> User Interface -> Views and search for your view name(tree, form, search or kanban etc) and add the fields in the view

However, I removed the custom field i created, and save it without removing first the UI I added in the corresponding view, and now it just return an error pasted below. I tried to find the xml that should cause the error but can't find it on the xml it should be located. 

ERROR: openerp.addons.base.ir.ir_ui_view: Field `x_second_address` does not exist

Any ideas how to solve this? Thanks


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

Hi, 

You can find out the corresponding view by going into Settings -> Technical -> User Interface -> Views, and search for this field inside the View Architecture, ie, enter x_second_address in the search bar and make it search inside the Architecture, then you will get the corresponding view, then you can open the view and remove the field from it.

See this:  How can I retrieve all views using a particular field of a model?

Thanks

Ảnh đại diện
Huỷ bỏ
Tác giả

I thought about doing this but I cant access the UI because it already returning 500 Server Error. I think I fixed it already though by adding it in models.py and restarting the service. Thanks for your help!

Tác giả Câu trả lời hay nhất

Nevermind haha. I just fixed it.

I just need to add the deleted field to the models.py and restart the service. 

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 6 23
2325
1
thg 4 23
11405
1
thg 6 22
2680
1
thg 11 19
5682
1
thg 6 19
6958