From 8d40bcf89a0f22714d5581fc902fce659a396d63 Mon Sep 17 00:00:00 2001 From: "Antoine (ande)" Date: Wed, 8 Mar 2023 14:54:47 +0000 Subject: [PATCH] [FIX] purchase: PO stat button no groups To reproduce the issue: 1. Create user with no access rights apart from user rights in Sales, Sign, Project and Timesheet 2. Create a project, add a task inside and link an analytic account to the project 3. Create an RFQ, add a product linked to the analytic account 4. Confirm order, receive product, validate, create bill 5. Log in with user 6. Try to access the analytic account through: Project->Task->project name->Settings->Analytic account 7. An error message pops-up "You are not allowed to access Purchase Order (purchase.order) records." Error: You should be able to access the analytic account, but the Purchase Order smart button should not be visible/present The data access by the smart button was not stopped by rules or groups, thus data was always trying to be loaded, even when the user did not have the access rights OPW-3180788 closes odoo/odoo#115058 X-original-commit: 9e8b2ba1ae05de72f492d833edd8da91ded6f5b0 Signed-off-by: Adrien Widart Signed-off-by: Demany Antoine (ande) --- addons/purchase/views/analytic_account_views.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/purchase/views/analytic_account_views.xml b/addons/purchase/views/analytic_account_views.xml index b0217da4227..4b1ee82b7d0 100644 --- a/addons/purchase/views/analytic_account_views.xml +++ b/addons/purchase/views/analytic_account_views.xml @@ -8,7 +8,8 @@