Skip to Content
मेन्यू
This question has been flagged
1 Reply
4508 Views

Odoo v13

I defined field:

my_field = fields.One2many('another.model', 'my_inverse_name', domain="[('another_field', 'in', ????????)]")
<odoo>
    <data noupdate="0">
        <record model="my.magic.model" id="my_magic_id">
            <field name="name">Whatever</field>
        </record>
  </data> </odoo>

I want to write domain depending on record xml id. 

How can I do that?

Avatar
Discard
Best Answer

you can write self.env.ref('my_magic_id').id

Avatar
Discard
Author

Thank You. I saw this solution, but it doesn't work. I used raw database ids. +1 Hilar from me :)

Related Posts Replies Views Activity
2
दिस॰ 23
12883
3
जुल॰ 22
23271
1
अप्रैल 22
18364
0
जन॰ 22
2448
2
जून 21
18627