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

I have a class like this:

class Test:
  _inherit = "some_model"
  test = fields.Many2one('res.partner', domain=[('parent_id', '=', super_field)])

super_field is defined in some_model, how can I make my test field here use a domain with super_field?
Imagine profil
Abandonează
Autor Cel mai bun răspuns

I solved it long time ago but putting my answer here for closure.


To do this just pass the domain as string:

 domain="[('parent_id', '=', super_field)]"
Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
8
feb. 17
8320
0
ian. 17
5860
2
feb. 24
12539
4
mai 24
17855
1
oct. 22
3304