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

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?

Awatar
Odrzuć
Najlepsza odpowiedź

Create your own form view without that field.

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
3
kwi 15
4886
2
kwi 15
4311
2
gru 23
10423
1
gru 19
5021
0
cze 18
3345