콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
4054 화면

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....

관련 게시물 답글 화면 활동
2
10월 23
1569
0
10월 21
1782
0
8월 15
2964
3
6월 15
7909
1
3월 15
5408