Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
4500 Vizualizări

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?

Imagine profil
Abandonează
Cel mai bun răspuns

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

Imagine profil
Abandonează
Autor

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

Related Posts Răspunsuri Vizualizări Activitate
2
dec. 23
12869
3
iul. 22
23253
1
apr. 22
18364
0
ian. 22
2437
2
iun. 21
18626