Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
4077 Lượt xem

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.


Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Try to use context for it:

 context="{'group_by':'field_name_to_group_by'}"
pass  this context when you search / browse for records.
Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 9 16
8912
1
thg 5 16
8018
1
thg 11 22
22635
1
thg 10 22
15941
2
thg 11 15
10560