Hi odoo masters.
I'm trying to add a domain in the xml, in a many2one field.
But I get the error "name 'self' is not defined"
this is the xml:
name="products_id" domain="[('company_id','=',self.env.user.company_list)]"
Thanks in advance! :)
この質問にフラグが付けられました
2
返信
6078
ビュー
You cannot use self or dot notation in the xml views. You could add a related or computed field to the model and access this value for your domain, or apply the domain in the model.
Thanks Jort, I made it with the Web domain field from OCA and problem solved.
Can you share an example to resolve your problem ?
| 関連投稿 | 返信 | ビュー | 活動 | |
|---|---|---|---|---|
|
|
2
11月 25
|
11200 | ||
|
|
1
11月 25
|
1958 | ||
|
|
6
8月 20
|
11365 | ||
|
|
0
4月 15
|
9573 | ||
|
|
1
8月 23
|
18321 |