mirror of
https://github.com/bringout/oca-ocb-mail.git
synced 2026-04-20 21:02:08 +02:00
19.0 vanilla
This commit is contained in:
parent
5df8c07b59
commit
daa394e8b0
2114 changed files with 564841 additions and 299642 deletions
|
|
@ -4,4 +4,4 @@
|
|||
from . import project_task_type
|
||||
from . import project_task
|
||||
from . import project_stage
|
||||
from . import project
|
||||
from . import project_project
|
||||
|
|
|
|||
|
|
@ -8,9 +8,9 @@ class ProjectProject(models.Model):
|
|||
_inherit = "project.project"
|
||||
|
||||
def _send_sms(self):
|
||||
for project in self:
|
||||
for project in self.sudo():
|
||||
if project.partner_id and project.stage_id and project.stage_id.sms_template_id:
|
||||
project._message_sms_with_template(
|
||||
project.with_env(self.env)._message_sms_with_template(
|
||||
template=project.stage_id.sms_template_id,
|
||||
partner_ids=project.partner_id.ids,
|
||||
)
|
||||
|
|
@ -9,7 +9,7 @@ class ProjectTask(models.Model):
|
|||
|
||||
def _send_sms(self):
|
||||
for task in self:
|
||||
if task.partner_id and task.stage_id and task.stage_id.sms_template_id:
|
||||
if task.partner_id and task.stage_id and task.stage_id.sms_template_id and not task.is_template:
|
||||
task._message_sms_with_template(
|
||||
template=task.stage_id.sms_template_id,
|
||||
partner_ids=task.partner_id.ids,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue