diff options
| -rw-r--r-- | addons/account/models/account_move.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/account/models/account_move.py b/addons/account/models/account_move.py index eabd1cdcc2a..059cf1d7ae8 100644 --- a/addons/account/models/account_move.py +++ b/addons/account/models/account_move.py @@ -3636,10 +3636,10 @@ class AccountMoveLine(models.Model): raise UserError(_('You cannot use this account (%s) in this journal, check the field \'Allowed Journals\' on the related account.', account.display_name)) failed_check = False - if journal.type_control_ids or journal.account_control_ids: + if (journal.type_control_ids - journal.default_account_id.user_type_id) or journal.account_control_ids: failed_check = True if journal.type_control_ids: - failed_check = account.user_type_id not in journal.type_control_ids + failed_check = account.user_type_id not in (journal.type_control_ids - journal.default_account_id.user_type_id) if failed_check and journal.account_control_ids: failed_check = account not in journal.account_control_ids |
