From f2bb2cbdb3d5c7880d93ac30f8322d42fcf6a0a3 Mon Sep 17 00:00:00 2001 From: pilarvargas-tecnativa Date: Wed, 4 Dec 2024 08:13:59 +0100 Subject: [PATCH] [IMP] sale_report_delivered: Allow salesman to have access to the sale delivery report in the same way as they have access to the sales report. TT51606 --- sale_report_delivered/__manifest__.py | 6 +++++- sale_report_delivered/security/ir.model.access.csv | 1 + .../security/sale_report_security.xml | 11 +++++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 sale_report_delivered/security/sale_report_security.xml diff --git a/sale_report_delivered/__manifest__.py b/sale_report_delivered/__manifest__.py index a7a964a1e..be75a7089 100644 --- a/sale_report_delivered/__manifest__.py +++ b/sale_report_delivered/__manifest__.py @@ -11,5 +11,9 @@ "installable": True, "development_status": "Beta", "maintainers": ["sergio-teruel"], - "data": ["security/ir.model.access.csv", "views/sale_report_delivered_views.xml"], + "data": [ + "security/ir.model.access.csv", + "security/sale_report_security.xml", + "views/sale_report_delivered_views.xml", + ], } diff --git a/sale_report_delivered/security/ir.model.access.csv b/sale_report_delivered/security/ir.model.access.csv index 0a100430b..2cc49fc05 100644 --- a/sale_report_delivered/security/ir.model.access.csv +++ b/sale_report_delivered/security/ir.model.access.csv @@ -1,2 +1,3 @@ id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink access_sale_report_delivered_manager,sale.report.delivered,model_sale_report_delivered,sales_team.group_sale_manager,1,1,1,1 +access_sale_report_delivered_salesman,sale.report.delivered,model_sale_report_delivered,sales_team.group_sale_salesman,1,1,1,0 diff --git a/sale_report_delivered/security/sale_report_security.xml b/sale_report_delivered/security/sale_report_security.xml new file mode 100644 index 000000000..7189dcb84 --- /dev/null +++ b/sale_report_delivered/security/sale_report_security.xml @@ -0,0 +1,11 @@ + + + + Personal Delivered Analysis + + ['|',('user_id','=',user.id),('user_id','=',False)] + + +