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! :)
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- 회계
- 재고 관리
- PoS
- Project
- MRP
신고된 질문입니다
2
답글
4241
화면
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
10월 21
|
9196 | ||
|
6
8월 20
|
9208 | ||
|
0
4월 15
|
8030 | ||
|
1
8월 23
|
16202 | ||
|
2
2월 24
|
14645 |