Fix balance computation and debit/credit for TrialBalance
To compute accumulate previous fiscalyear, dates must be reset and to not compute accumulate fiscalyear must not be set. review507003 (transplanted from de306827fd64d40828ba8221f943b7fc552a69a8)
This commit is contained in:
1 parent
5bacb05c83
commit
865be2a1b8
1 file changed
+3
-3
+3
-3
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user