Before this commit when the portal user changes the stage of a task to a stage with sms template, he got a traceback saying he has no access to the `sms.template` model. This commit fixes by checking if the user is a portal one to send the sms in sudo when the write on the task is correctly done. Steps to reproduce: ================== 1) install `project_sms` module, 2) create a project, 3) in the kanban of tasks for this project create 2 stages, 4) edit the last one to set a sms template, 5) share the project in edit mode to a portal user, 6) create a task with the quick create, 7) log in as portal user and go the project shared 8) move the task into the last stage. Actual Behavior: --------------- A traceback is occurred saying the portal user has no access to `sms.template` model. Expected behavior: ----------------- The task should be in the last stage and the sms should be sent. closes odoo/odoo#99363 X-original-commit: 9aa5e65273885001106a5fcc64677a284b77f61d Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
5 lines
135 B
Python
5 lines
135 B
Python
# -*- coding: utf-8 -*-
|
|
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
|
|
|
from . import test_project_sharing
|