If you want to customize one2many relational filed in Odoo. Then you have to go in .py file of that module then go to .xml file. For example see below code.
In xml you would have wrote code like this :
<field name="test" widget="one2many_list" colspan="4" nolabel="1">
<tree string="Details">
<field name="field1" />
<field name="field2" />
---------------------------------------------
<field name="designation" />
</tree>
</field>
//Add form section inside and mention all the fields you needed, as follow :
<field name="test" widget="one2many_list" colspan="4" nolabel="1">
<tree string="Details">
<field name="field1" />
<field name="field2" />
---------------------------------------------
<field name="designation" />
</tree>
<form string="Details" editable="bottom">
<field name="field1" />
<field name="field2" />
---------------------------------------------
<field name="designation" />
</form>
</field>
Note- In Many2one fields you have to Add form section inside and mention all the fields you needed.
0 Comment(s)