mirror of
https://github.com/bringout/oca-ocb-mail.git
synced 2026-04-22 02:42:02 +02:00
19.0 vanilla
This commit is contained in:
parent
5df8c07b59
commit
daa394e8b0
2114 changed files with 564841 additions and 299642 deletions
|
|
@ -7,7 +7,6 @@ from odoo.addons.mail.tests.common import mail_new_test_user
|
|||
from odoo.exceptions import AccessError
|
||||
from odoo.tests import tagged
|
||||
from odoo.tools import mute_logger, convert_file
|
||||
from odoo.modules.module import get_module_resource
|
||||
|
||||
|
||||
@tagged('post_install', '-at_install')
|
||||
|
|
@ -74,7 +73,7 @@ class TestSmsTemplateAccessRights(TransactionCase):
|
|||
@users('user_employee')
|
||||
def test_sms_template_rendering_restricted(self):
|
||||
self.env['ir.config_parameter'].sudo().set_param('mail.restrict.template.rendering', True)
|
||||
self.basic_user.groups_id -= self.env.ref('mail.group_mail_template_editor')
|
||||
self.basic_user.group_ids -= self.env.ref('mail.group_mail_template_editor')
|
||||
|
||||
sms_composer = self.env['sms.composer'].create({
|
||||
'composition_mode': 'comment',
|
||||
|
|
@ -113,13 +112,12 @@ class TestSmsTemplateAccessRights(TransactionCase):
|
|||
@tagged('post_install', '-at_install')
|
||||
class TestSMSTemplateReset(TransactionCase):
|
||||
|
||||
def _load(self, module, *args):
|
||||
convert_file(self.cr, module='sms',
|
||||
filename=get_module_resource(module, *args),
|
||||
idref={}, mode='init', noupdate=False, kind='test')
|
||||
def _load(self, module, filepath):
|
||||
# pylint: disable=no-value-for-parameter
|
||||
convert_file(self.env, module='sms', filename=filepath, idref={}, mode='init', noupdate=False)
|
||||
|
||||
def test_sms_template_reset(self):
|
||||
self._load('sms', 'tests', 'test_sms_template.xml')
|
||||
self._load('sms', 'tests/test_sms_template.xml')
|
||||
|
||||
sms_template = self.env.ref('sms.sms_template_test').with_context(lang=self.env.user.lang)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue