[FIX] account_move: Added date domain to calculate initial balance for General & Partner Ledger report

This commit is contained in:
fka-odoo
2015-08-28 10:00:34 +02:00
committed by pvy
parent 623b7cc051
commit 3dc45d3cdc
+2
View File
@@ -1101,6 +1101,8 @@ class AccountMoveLine(models.Model):
if context.get('date_from'):
if not context.get('strict_range'):
domain += ['|', (date_field, '>=', context['date_from']), ('account_id.user_type_id.include_initial_balance', '=', True)]
elif context.get('initial_bal'):
domain += [(date_field, '<', context['date_from'])]
else:
domain += [(date_field, '>=', context['date_from'])]