diff --git a/account.py b/account.py index 700ab97e01..984c6c2830 100644 --- a/account.py +++ b/account.py @@ -718,7 +718,7 @@ class Account(ModelSQL, ModelView): res[account_id] += deferral.debit - deferral.credit else: with Transaction().set_context(fiscalyear=fiscalyear.id, - date=None): + date=None, periods=None): res2 = self.get_balance(ids, name) for account_id in ids: res[account_id] += res2[account_id] @@ -818,7 +818,7 @@ class Account(ModelSQL, ModelView): res[name][account_id] += deferral[name] else: with Transaction().set_context(fiscalyear=fiscalyear.id, - date=None): + date=None, dates=None): res2 = self.get_credit_debit(ids, names) for account_id in ids: for name in names: @@ -1418,7 +1418,7 @@ class TrialBalance(Report): set(start_period_ids))) with Transaction().set_context( - fiscalyear=data['fiscalyear'], + fiscalyear=None, periods=end_period_ids, posted=data['posted']): accounts = account_obj.browse(account_ids)