From fb1005b60d25b6907cb90b861374cfec053661f6 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/__manifest__.py | 2 +- contract/views/res_partner_view.xml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/contract/__manifest__.py b/contract/__manifest__.py index 51cff28a0..e405e9d2b 100644 --- a/contract/__manifest__.py +++ b/contract/__manifest__.py @@ -9,7 +9,7 @@ { 'name': 'Recurring - Contracts Management', - 'version': '12.0.4.0.0', + 'version': '12.0.4.1.0', 'category': 'Contract Management', 'license': 'AGPL-3', 'author': "OpenERP SA, " diff --git a/contract/views/res_partner_view.xml b/contract/views/res_partner_view.xml index 378f9cb38..cda22f4ad 100644 --- a/contract/views/res_partner_view.xml +++ b/contract/views/res_partner_view.xml @@ -6,6 +6,7 @@ res.partner +