Sometimes I found ('','','') expression for domain or ['','',''].
I want to know : Where do I use () or [] for write domain expression?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Sometimes I found ('','','') expression for domain or ['','',''].
I want to know : Where do I use () or [] for write domain expression?
The two datatype are equal in this case. If you create a filter you can use tuple or list. The standard is to set the filters as list of tuple. This is an example:
filter = [('name', 'ilike', 'OpenERP'), ('type', '=', 'erp')]
I can use list or tuple in .xml file AND in UI form ?
You can use tuple and list in every point of the software. This type of data are part of python.
thanks for your answer
Hello Denis,
Domain is a python code for optional restriction in the form of arguments for search.
Syntax:
domain = [['field_name', 'operator', 'value'], ...]
For example,
domain = [('state','<>','draft'), ('country_id', '=', country_id)]
Thank you.
관련 게시물 | 답글 | 화면 | 활동 | |
---|---|---|---|---|
naked domain set up
해결 완료
|
|
3
7월 25
|
4464 | |
|
0
5월 25
|
950 | ||
|
2
3월 24
|
2189 | ||
|
0
1월 23
|
1778 | ||
|
1
11월 22
|
3235 |