With OpenERP Framework search method issue.
ids = claim_obj.search(self.cr, self.uid, [('extract(month from cover_date)', '=', month)], context=context)
why extract(month from cover_date) function not evaluated ?
OpenERP Stop to perform this !!!
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
With OpenERP Framework search method issue.
ids = claim_obj.search(self.cr, self.uid, [('extract(month from cover_date)', '=', month)], context=context)
why extract(month from cover_date) function not evaluated ?
OpenERP Stop to perform this !!!
Zahin,
The domain section is evaluated at ORM and it will not parse any postgresql keywords. What it does it evaluating the OpenERP fields on the left.
I see that you might have misunderstood domain meaning. [('extract(month from cover_date)', '=', month)] is the wrong expression.
The real meaning of the clause(domain) is the first element is field of openerp model, second one is operator and the third one is value you want to operate on.
Hope this helps. Thanks.
OpenERP Does not have smart feature on search. typical to perform complex feature. Where again we have to use traditional cr.execute....
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng kýBài viết liên quan | Trả lời | Lượt xem | Hoạt động | |
---|---|---|---|---|
|
2
thg 10 23
|
1679 | ||
|
0
thg 10 21
|
1918 | ||
|
0
thg 8 15
|
3076 | ||
|
3
thg 6 15
|
8057 | ||
|
1
thg 3 15
|
5536 |