Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
1 Vastaa
3045 Näkymät

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?

Avatar
Hylkää
Paras vastaus

Create your own form view without that field.

Avatar
Hylkää
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
3
huhtik. 15
4901
2
huhtik. 15
4316
2
jouluk. 23
10436
1
jouluk. 19
5023
0
kesäk. 18
3349