diff options
| author | Ivan Yelizariev <iel@odoo.com> | 2021-01-15 15:11:08 +0000 |
|---|---|---|
| committer | Ivan Yelizariev <iel@odoo.com> | 2021-01-18 09:15:58 +0000 |
| commit | 2a89c82a1b7e9c60c1e7d79a85899a46d4860bf6 (patch) | |
| tree | 042aa02d70101e19154a86b1f412141a801c38fd /addons/hr_presence | |
| parent | f7788fdf03bcf81710f5b01fbf67a90aa30e1e58 (diff) | |
[FIX] calendar_sms,hr_presence: add security rules for sms.templates
BEFORE: sms templates from these modules become inaccessible if any module from
the list below is installed
* crm_sms
* event_sms
* stock_sms
* enterprise/account_followup
* enterprise/marketing_automation_sms
* enterprise/sale_subscription
those modules add security rules for sms.templates, which adds additional
conditions to get access: at least one security rule has to be passed. So, we
need to add such rules to give access not only to Superuser
closes odoo/odoo#64654
X-original-commit: 23c82340c1cbd3d5a25d5c2ecec6c7d0f988cd90
Signed-off-by: Ivan Yelizariev // IEL <yelizariev@users.noreply.github.com>
Diffstat (limited to 'addons/hr_presence')
| -rw-r--r-- | addons/hr_presence/__manifest__.py | 1 | ||||
| -rw-r--r-- | addons/hr_presence/security/sms_security.xml | 9 |
2 files changed, 10 insertions, 0 deletions
diff --git a/addons/hr_presence/__manifest__.py b/addons/hr_presence/__manifest__.py index 05b27fca5ca..eac227f7353 100644 --- a/addons/hr_presence/__manifest__.py +++ b/addons/hr_presence/__manifest__.py @@ -18,6 +18,7 @@ Allows to contact directly the employee in case of unjustified absence. """, 'depends': ['hr', 'hr_holidays', 'sms'], 'data': [ + 'security/sms_security.xml', 'data/ir_actions_server.xml', 'views/hr_employee_views.xml', 'data/sms_data.xml', diff --git a/addons/hr_presence/security/sms_security.xml b/addons/hr_presence/security/sms_security.xml new file mode 100644 index 00000000000..024ec0020a8 --- /dev/null +++ b/addons/hr_presence/security/sms_security.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> + <record id="ir_rule_sms_template_hr_manager" model="ir.rule"> + <field name="name">SMS Template: hr manager CRUD on employee templates</field> + <field name="model_id" ref="sms.model_sms_template"/> + <field name="groups" eval="[(4, ref('hr.group_hr_manager'))]"/> + <field name="domain_force">[('model_id.model', '=', 'hr.employee')]</field> + </record> +</odoo> |
