From 4cbf4a8ae0ac8f66c5cda3d604c9b7a48154b858 Mon Sep 17 00:00:00 2001 From: Enric Tobella Date: Fri, 5 Nov 2021 13:29:43 +0100 Subject: [PATCH] [IMP] account_payment_partner: Set invisible according to type, no context --- account_payment_partner/views/account_move_view.xml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/account_payment_partner/views/account_move_view.xml b/account_payment_partner/views/account_move_view.xml index 75295fa78..1b6f0c973 100644 --- a/account_payment_partner/views/account_move_view.xml +++ b/account_payment_partner/views/account_move_view.xml @@ -31,8 +31,7 @@ name="payment_mode_id" domain="[('payment_type', '=', payment_mode_filter_type_domain), ('company_id', '=', company_id)]" widget="selection" - attrs="{'readonly': [('state', '!=', 'draft')]}" - invisible="context.get('default_type') not in ('out_invoice','out_refund','in_invoice','in_refund')" + attrs="{'readonly': [('state', '!=', 'draft')], 'invisible': [('type', 'not in', ('out_invoice','out_refund','in_invoice','in_refund'))]}" />