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

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
Discard
Author Best Answer

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
Discard
Related Posts Replies Views Activity
8
फ़र॰ 17
8428
0
जन॰ 17
5943
2
फ़र॰ 24
12660
4
मई 24
18126
1
अक्तू॰ 22
3432