From 87f73361b9dfaea3211e3f9fc0f1b02ed3d18ba8 Mon Sep 17 00:00:00 2001 From: Enrique Date: Wed, 9 Oct 2019 17:03:51 +0200 Subject: [PATCH] [12.0][FIX] contract & contract_sale - security fix The lowest model access for contract.contract model is group_account_invoice group. However the addon adds two smart buttons to res.partner view without any security restrictions and without compute_sudo attribute on computed fields. This causes the view to crash when a user without the proper permissions tries to access the res.partner form view. The solution adds groups_id to the partner form views in which the buttons are added, so the only loads when the user has proper permissions. Other way to solve it would be to add compute_sudo attribute to the relevant fields, but this causes an access error when the user clicks on the smart buttons. --- contract/views/res_partner_view.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/contract/views/res_partner_view.xml b/contract/views/res_partner_view.xml index 378f9cb3..cda22f4a 100644 --- a/contract/views/res_partner_view.xml +++ b/contract/views/res_partner_view.xml @@ -6,6 +6,7 @@ res.partner +