diff --git a/addons/sale/__manifest__.py b/addons/sale/__manifest__.py index 1c5260ee524..189dc41c6c6 100644 --- a/addons/sale/__manifest__.py +++ b/addons/sale/__manifest__.py @@ -13,7 +13,8 @@ This module contains all the common features of Sales Management and eCommerce. 'depends': ['sales_team', 'payment', 'portal', 'utm'], 'data': [ 'security/ir.model.access.csv', - 'security/sale_security.xml', + 'security/res_groups.xml', + 'security/ir_rules.xml', 'report/account_invoice_report_views.xml', 'report/ir_actions_report_templates.xml', diff --git a/addons/sale/security/sale_security.xml b/addons/sale/security/ir_rules.xml similarity index 100% rename from addons/sale/security/sale_security.xml rename to addons/sale/security/ir_rules.xml diff --git a/addons/sale/security/res_groups.xml b/addons/sale/security/res_groups.xml new file mode 100644 index 00000000000..bc79dfad330 --- /dev/null +++ b/addons/sale/security/res_groups.xml @@ -0,0 +1,204 @@ + + + + + Lock Confirmed Sales + + + + + A warning can be set on a product or a customer (Sale) + + + + + Pro-forma Invoices + + + + + + + + + + + + + + + + Sales Order multi-company + + [('company_id', 'in', company_ids)] + + + + Sales Order Line multi-company + + ['|', ('company_id', '=', False), ('company_id', 'in', company_ids)] + + + + Sales Order Analysis multi-company + + ['|',('company_id','=',False),('company_id', 'in', company_ids)] + + + + + Portal Personal Quotations/Sales Orders + + [('message_partner_ids','child_of',[user.commercial_partner_id.id])] + + + + + + + + + Portal Sales Orders Line + + [('order_id.message_partner_ids','child_of',[user.commercial_partner_id.id])] + + + + + + + Personal Orders + + ['|',('user_id','=',user.id),('user_id','=',False)] + + + + All Orders + + [(1,'=',1)] + + + + + Personal Orders Analysis + + ['|',('user_id','=',user.id),('user_id','=',False)] + + + + + All Orders Analysis + + [(1,'=',1)] + + + + + Personal Order Lines + + ['|',('salesman_id','=',user.id),('salesman_id','=',False)] + + + + + All Orders Lines + + [(1,'=',1)] + + + + + Personal Invoices Analysis + + ['|', ('invoice_user_id', '=', user.id), ('invoice_user_id', '=', False)] + + + + + All Invoices Analysis + + [(1, '=', 1)] + + + + + + + Access every payment transaction + + + [(1, '=', 1)] + + + + + Access every payment token + + + [(1, '=', 1)] + + + + + + Personal Invoices + + [('move_type', 'in', ('out_invoice', 'out_refund')), '|', ('invoice_user_id', '=', user.id), ('invoice_user_id', '=', False)] + + + + + All Invoices + + [('move_type', 'in', ('out_invoice', 'out_refund'))] + + + + + Personal Invoice Lines + + [('move_id.move_type', 'in', ('out_invoice', 'out_refund')), '|', ('move_id.invoice_user_id', '=', user.id), ('move_id.invoice_user_id', '=', False)] + + + + + All Invoice Lines + + [('move_id.move_type', 'in', ('out_invoice', 'out_refund'))] + + + + + Personal Invoice Send and Print + + [('invoice_ids.move_type', 'in', ('out_invoice', 'out_refund')), '|', ('invoice_ids.invoice_user_id', '=', user.id), ('invoice_ids.invoice_user_id', '=', False)] + + + + + All Invoice Send and Print + + [('invoice_ids.move_type', 'in', ('out_invoice', 'out_refund'))] + + + + + + Payment Acquier Onboarding Wizard Rule + + [('create_uid', '=', user.id)] + + + + Sales Advance Payment Invoice Rule + + [('create_uid', '=', user.id)] + + + + Sales Order Cancel Rule + + [('create_uid', '=', user.id)] + + +