From dffa40f744398511a9ad1eb1c3bf8b8d76e2b6d8 Mon Sep 17 00:00:00 2001 From: Arnaud Baes Date: Wed, 7 Sep 2022 08:57:51 +0000 Subject: [PATCH] [FIX] account,sale: View crashing when missing permissions. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Domains could not be computed when the user requesting the view don't have the right permission for accessing the field `partner_credit_warning` Reported via p/feedback closes odoo/odoo#99673 X-original-commit: https://github.com/odoo/odoo/commit/d145b140a077c26a714fa9a8d0542d4584ca7459 Signed-off-by: William André (wan) --- addons/account/views/account_move_views.xml | 3 ++- addons/sale/views/sale_order_views.xml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/addons/account/views/account_move_views.xml b/addons/account/views/account_move_views.xml index 8774e35518c..a613fdf4b80 100644 --- a/addons/account/views/account_move_views.xml +++ b/addons/account/views/account_move_views.xml @@ -655,7 +655,8 @@ attrs="{'invisible': ['|', '|', ('state', '!=', 'draft'), ('auto_post', '=', 'no'), ('auto_post', '=', 'at_date')]}"> auto-posting enabled. Next accounting date: . The recurrence will end on (included). - diff --git a/addons/sale/views/sale_order_views.xml b/addons/sale/views/sale_order_views.xml index 208d95e3bd8..5d605f3880a 100644 --- a/addons/sale/views/sale_order_views.xml +++ b/addons/sale/views/sale_order_views.xml @@ -220,7 +220,8 @@ + attrs="{'invisible': [('partner_credit_warning', '=', '')]}" + groups="account.group_account_invoice,account.group_account_readonly"/>