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

Hi,

Im working odoo version 7.0.I need a solution for below given problem.I have searched and got some ids of account_move.Now i will browse by this ids from same(account_move) class.when i iterate these ids i will get all of account_move_line ids of relevant move_ids.

j_ids=journal_obj.search(cr,uid,[('company_id','=',context['uid']),('state','=','posted'),('date','>=',d1),('date','<=',d2)], order='date asc')

journals=journal_obj.browse(cr,uid,j_ids)

for jnal in journals:

    for j_line in jnal.line_id

I need them to be grouped by account (not by ids) and to be printed in report.I have posted my code.Please suggest me some solutions.Thanks in advance.


아바타
취소
베스트 답변

Try to use context for it:

 context="{'group_by':'field_name_to_group_by'}"
pass  this context when you search / browse for records.
아바타
취소
관련 게시물 답글 화면 활동
2
9월 16
9063
1
5월 16
8118
1
11월 22
23102
1
10월 22
16084
2
11월 15
10697