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?
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?
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)]"
Create an account today to enjoy exclusive features and engage with our awesome community!
साइन अप करें| Related Posts | Replies | डेटा देखने का तरीका | ऐक्टिविटी | |
|---|---|---|---|---|
|
8
फ़र॰ 17
|
10361 | |||
|
0
जन॰ 17
|
7415 | |||
|
2
फ़र॰ 24
|
14646 | |||
|
4
मई 24
|
21226 | |||
|
1
अक्तू॰ 22
|
5252 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.