Fix move queries when filter by posted move

issue3493
review1661003
This commit is contained in:
Sergi Almacellas Abellana committed 2013-11-14 13:34:36 +01:00
1 parent ad91e5149a
commit d6bfc36879
1 file changed
+3 -3
+3 -3
View File
@@ -1127,9 +1127,9 @@ class Line(ModelSQL, ModelView):
return ((table.state != 'draft')
& table.move.in_(
move.select(move.id,
where=period.in_(
where=move.period.in_(
Transaction().context['periods'])
& move.state == 'posted')),
& (move.state == 'posted'))),
fiscalyear_ids)
else:
return ((table.state != 'draft')
@@ -1155,7 +1155,7 @@ class Line(ModelSQL, ModelView):
period.select(period.id,
where=period.fiscalyear.in_(
fiscalyear_ids)))
& move.state == 'posted')),
& (move.state == 'posted'))),
fiscalyear_ids)
else:
return ((table.state != 'draft')