Odoo Help

0

0
2 Answers
1
Avatar

Yenthe Van Ginneken

--Yenthe Van Ginneken--
22087
| 9 9 12
بلجيكا
--Yenthe Van Ginneken--

My Odoo blog: http://www.odoo.yenthevg.com/

My Twitter: https://twitter.com/Yenthe666

Yenthe Van Ginneken
14‏/5‏/2019 2:16 ص

Hi Smael,


You should link to the family_geek_ids with an eval that has the id set of the record on the external table, not just a number. An example:

<record model="family.geek" id="fg1">
  <field name="name">Geek Family</field>
</record>

<record model="family.house" id="fh3"> <field name="name">House's in Mayotte</field> <field name="family_geek_ids" eval="[(6, 0, [ref('fg1')])]"/> </record>

Thanks to the eval Odoo knows that you want to link the first record from the table 'family.geek' to this record from the 'family.house' table.


P.S: You shouldn't use/set the field 'id' in the records. Your database will fill up the ID's automatically and by adding them manually you're only risking getting ORM issues.

Regards,
Yenthe

0
Smael Check
14‏/5‏/2019 4:06 ص

Hi Yenthe,

I tried it and it works successfully.

Thanks !

Smael

Ask a Question
Writer
Keep Informed
1 follower(s)
About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register