19.0 vanilla

This commit is contained in:
Ernad Husremovic 2026-03-09 09:31:39 +01:00
parent 5df8c07b59
commit daa394e8b0
2114 changed files with 564841 additions and 299642 deletions

View file

@ -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)