From 204935119d17096978958c09d1389fb4c36deec0 Mon Sep 17 00:00:00 2001 From: qdp-odoo Date: Thu, 19 Apr 2018 10:02:30 +0200 Subject: [PATCH] [FIX] account: default journal on payment shouldn't be misc This was fixed by https://github.com/odoo/odoo/commit/8327b67cf5498a1d9d133ec02f0e7619c4ce26d1 but somehow lost in the forward port I suppose --- addons/account/models/account_payment.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/models/account_payment.py b/addons/account/models/account_payment.py index cdac9bbd42f..1cca2df5214 100644 --- a/addons/account/models/account_payment.py +++ b/addons/account/models/account_payment.py @@ -146,7 +146,7 @@ class account_abstract_payment(models.AbstractModel): def _compute_journal_domain_and_types(self): journal_type = ['bank', 'cash'] domain = [] - if self.currency_id.is_zero(self.amount): + if self.currency_id.is_zero(self.amount) and self.has_invoices: # In case of payment with 0 amount, allow to select a journal of type 'general' like # 'Miscellaneous Operations' and set this journal by default. journal_type = ['general']