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

How do I hide fields in one2many's view?

I will explain my question:

I have created a new module that should add to each employee's card its list of children.

The module is inherited from hr.employees and contains two models:

* A new model (children) that creates the children's table when each child has several parameters and one of them is the parent's ID.

* Another model inherited from hr.employees that also contains a one2many field that is linked to the children's model.


So far everything is working fine, and I can view the fields I want from the model.

My problem is in creating a new child, a popup opens for me where I have to fill in all the child's data, and among them also select (in the dropdown) the parent.

I do not want to present this field, in particular that what is actually stored in DB is the employee for whom I created the child, regardless of the parent I chose.

How can I remove this field from view?

The pop-up view is something automatic, which I did not create but probably comes from the one2many setting, and of course I cannot remove the parent_id field from the model - this is the field that links it to the parent.


Is there a way to solve this?

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

Create your own form view without that field.

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
3
thg 4 15
4764
2
thg 4 15
4161
2
thg 12 23
10248
1
thg 12 19
4906
0
thg 6 18
3241