From 45af3611d357cf2c1e5339eaf995f8545d711962 Mon Sep 17 00:00:00 2001 From: Jon Zaballa Date: Tue, 22 Jan 2019 15:45:50 +0100 Subject: [PATCH] [11.0][FIX] account_payment_mode res.partner view banks group attribute Description of the issue/feature this PR addresses: The modules adds `{'invisible': [('parent_id', '!=', False)]}` attribute to `banks` group on res.partner form view. The rationale for this, according to a comment on the view itself is: > ... there is a domain on the 'partner_id' field of res.partner.bank (base module) which prevents the selection of a contact However, the domain the comment refers to is `['|', ('is_company', '=', True), ('parent_id', '=', False)]` So, I think the domain for the group to be invisible should be `[('parent_id', '!=', False), ('is_company', '=', False)]`. In addition, a parent that is a company is always its own commercial partner. So we should have access to its payment information. Current behavior before PR: Bank and mandates information is hidden when a partner is a company and has a parent. Desired behavior after PR is merged: Banking information should be visible if a partner is a company. --- account_payment_mode/views/res_partner.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/account_payment_mode/views/res_partner.xml b/account_payment_mode/views/res_partner.xml index 9aef62a24..61a1618e4 100644 --- a/account_payment_mode/views/res_partner.xml +++ b/account_payment_mode/views/res_partner.xml @@ -12,7 +12,7 @@ which prevents the selection of a contact --> - {'invisible': [('parent_id', '!=', False)]} + {'invisible': [('parent_id', '!=', False), ('is_company', '=', False)]}