Hello! I created a new table called res.country.region and added a column in res.country.state called region_id, to know to which region a state belongs to.
I also created a module which add some data to the new table res.country.region. I do this through an XML file, and it works well.
But now, I am trying to add the respective region_id to several states of res.country.state. which I am pretty sure that exist. How can I do this through a XML file?
This is an example of a XML record I used to fill in the res.country.region table:
<record model='res.country.region' id='myregionid01'>
<field name='name'>My region</field>
<field name='code'>MR</field>
<field name="country_id" ref="base.es"/> <!-- I copied this line from other file, and it points to the country, but I do not know how it does -->
</record>
This is an example of what I have now:
<record model='res.country.state' id='mystateid01'> <!-- How can I point here to an existing state in res.country.state to fill only its empty column region_id? -->
<field name="region_id" ref="¿?"/>
</record>