Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
4080 มุมมอง

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.
อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
How to search inactive employee record? แก้ไขแล้ว
2
ก.ย. 16
8918
1
พ.ค. 16
8028
What is the account.move table used for? แก้ไขแล้ว
1
พ.ย. 22
22652
how i can Order BY Group BY ? แก้ไขแล้ว
1
ต.ค. 22
15947
List view group by date format change แก้ไขแล้ว
2
พ.ย. 15
10562