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
3811 Zobrazení

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

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)]"
Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
8
úno 17
8343
0
led 17
5868
2
úno 24
12567
4
kvě 24
17890
1
říj 22
3320