From 723aaa22b20c38a0bb0dd53c6c2e8e66b9b1c15f Mon Sep 17 00:00:00 2001 From: "Nicolas (vin)" Date: Tue, 3 Nov 2020 07:21:35 +0000 Subject: [PATCH] [IMP] acc: Add domain on journal field of journal entries In order to avoid eventual futur issues, this PR add a filter on the journal field of journal entries to only allow selecting misc journals task id #2371198 closes odoo/odoo#62331 X-original-commit: 1b273d4c11e3e8d8583de302b71b2522a71f4d1d Signed-off-by: Quentin De Paoli (qdp) --- addons/account/models/account_move.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/account/models/account_move.py b/addons/account/models/account_move.py index 01aab06c87a..dc09546e5a4 100644 --- a/addons/account/models/account_move.py +++ b/addons/account/models/account_move.py @@ -1172,6 +1172,8 @@ class AccountMove(models.Model): move.invoice_filter_type_domain = 'sale' elif move.is_purchase_document(include_receipts=True): move.invoice_filter_type_domain = 'purchase' + elif move.move_type == 'entry': + move.invoice_filter_type_domain = 'general' else: move.invoice_filter_type_domain = False