Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
4507 Zobrazení

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
Zrušit
Nejlepší odpověď

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

Avatar
Zrušit
Autor

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

Related Posts Odpovědi Zobrazení Aktivita
2
pro 23
12883
3
čvc 22
23271
1
dub 22
18364
0
led 22
2448
2
čvn 21
18627