summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJalpesh Patel <pja@openerp.com>2021-01-18 09:55:12 +0000
committerJalpesh Patel <pja@openerp.com>2021-01-18 09:55:12 +0000
commit5495808c6504b3c8a026be92e53bb62326a1164f (patch)
tree4c413f5a63ae2e78d1c58481286e99cc164a6e7c
parent77436f674d84666511b8b5c2b1355b95beaace94 (diff)
[FIX] account: typo for return default_account_id value
closes odoo/odoo#64664 Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
-rw-r--r--addons/account/models/account_journal.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/addons/account/models/account_journal.py b/addons/account/models/account_journal.py
index f3d88c71d06..9427f4615bf 100644
--- a/addons/account/models/account_journal.py
+++ b/addons/account/models/account_journal.py
@@ -640,13 +640,14 @@ class AccountJournal(models.Model):
a logic based on accounts.
:param domain: An additional domain to be applied on the account.move.line model.
- :return: The balance expressed in the journal's currency.
+ :return: Tuple having balance expressed in journal's currency
+ along with the total number of move lines having the same account as of the journal's default account.
'''
self.ensure_one()
self.env['account.move.line'].check_access_rights('read')
if not self.default_account_id:
- return 0.0
+ return 0.0, 0
domain = (domain or []) + [
('account_id', 'in', tuple(self.default_account_id.ids)),