[FIX] Account: intiala balance with periods filter
bzr revid: mra@mra-laptop-20101125111558-a3lj88wh6157e6yg
This commit is contained in:
parent
e95aad1ed6
commit
55ef479cf0
|
@ -82,7 +82,7 @@ class account_move_line(osv.osv):
|
|||
periods = fiscalperiod_obj.search(cr, uid, [('date_start', '<', first_period.date_start)])
|
||||
periods = ','.join([str(x) for x in periods])
|
||||
if periods:
|
||||
query = obj+".state <> 'draft' AND "+obj+".period_id IN (SELECT id FROM account_period WHERE fiscalyear_id IN (%s) OR id IN (%s)) %s %s" % (fiscalyear_clause, periods, where_move_state, where_move_lines_by_date)
|
||||
query = obj+".state <> 'draft' AND "+obj+".period_id IN (SELECT id FROM account_period WHERE fiscalyear_id IN (%s) AND id IN (%s)) %s %s" % (fiscalyear_clause, periods, where_move_state, where_move_lines_by_date)
|
||||
else:
|
||||
ids = ','.join([str(x) for x in context['periods']])
|
||||
query = obj+".state <> 'draft' AND "+obj+".period_id IN (SELECT id FROM account_period WHERE fiscalyear_id IN (%s) AND id IN (%s)) %s %s" % (fiscalyear_clause, ids, where_move_state, where_move_lines_by_date)
|
||||
|
|
Loading…
Reference in New Issue