Files
odoo_source/addons/crm_sms/security/sms_security.xml
T
Jérémy Hennecart 7a02ea0856 [FIX] sms, various: do not restrict read access on sms.template
sms.template model has several record rules to give access to templates
linked to models managed by certain groups (like crm.lead for sales managers)
These record rules were meant to restrict access to certain model to create,
write and unlink, but not read.

This is leading to issues when trying to read a template on other models.
Indeed people should always be able read sms.template content.

Unit test were also added to the sms module to ensure that a member of
group_user can always read a sms template.

Unit test is added to ensure admin always has full control on sms.templates.

Task ID-2191254
COM PR odoo/odoo#68445
ENT PR odoo/enterprise#17340

X-original-commit: 6a00157f79be30a6efd6d039504c57be07c449fd
2021-03-29 16:55:45 +00:00

11 lines
540 B
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo noupdate="1">
<record id="ir_rule_sms_template_sale_manager" model="ir.rule">
<field name="name">SMS Template: sale manager CUD on opportunity / partner templates</field>
<field name="model_id" ref="sms.model_sms_template"/>
<field name="groups" eval="[(4, ref('sales_team.group_sale_manager'))]"/>
<field name="domain_force">[('model_id.model', 'in', ('crm.lead', 'res.partner'))]</field>
<field name="perm_read" eval="False"/>
</record>
</odoo>