Hello,
I have a model like this:
class Main(models.Model):
_name ='main'
name = fields.Char(string='Name')
relation_id = fields.Many2one(string='Relation', comodel_name='relation')
I have one 'relation' record for each 'main' record.
Of course, I can merge the two tables.
But it is possible to have a XML file like this which create the 'main' record as well as the 'relation' record at the same time ?
<odoo>
<record id="my_id" model="ir.ui.view">
<field name="name">main.form.view</field>
<field name="model">main</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form>
<sheet>
<group>
<field name="name"/>
</group>
<notebook>
<page string="relation">
<field name="relation_id">
<form>
<field name="name_relation"/>
<field name="second_field"/>
</form>
</field>
</page>
</notebook>
</sheet>
</form>
</field>
</record>
</odoo>
Thanks in advance,
Boris
Can your nested form node not just simply become a list? I don't really get what you are trying to achieve with this setup, hence also can't tell you what you may do for the moment.
Christoph Farnleitne ,I merge the two table and solve my problem.