[FIX] mail_notification_custom_subject: Error modifying subtype_id
[IMP] update dotfiles [ci skip]
This commit is contained in:
parent
ddc9efe4af
commit
4b5eeec844
@ -28,7 +28,6 @@ class MailThread(models.AbstractModel):
|
|||||||
record_name=False,
|
record_name=False,
|
||||||
**kwargs
|
**kwargs
|
||||||
):
|
):
|
||||||
subtype_id = kwargs.get("subtype_id", False)
|
|
||||||
if not subtype_id and subtype_xmlid:
|
if not subtype_id and subtype_xmlid:
|
||||||
subtype_id = self.env["ir.model.data"].xmlid_to_res_id(
|
subtype_id = self.env["ir.model.data"].xmlid_to_res_id(
|
||||||
subtype_xmlid,
|
subtype_xmlid,
|
||||||
@ -39,15 +38,10 @@ class MailThread(models.AbstractModel):
|
|||||||
[("model_id.model", "=", self._name), ("subtype_ids", "=", subtype_id)]
|
[("model_id.model", "=", self._name), ("subtype_ids", "=", subtype_id)]
|
||||||
)
|
)
|
||||||
if not subject:
|
if not subject:
|
||||||
subject = (
|
subject = "Re: %s" % self.env["mail.message"].with_context(
|
||||||
"Re: %s"
|
default_model=self._name,
|
||||||
% self.env["mail.message"]
|
default_res_id=self.id,
|
||||||
.with_context(
|
)._get_record_name({})
|
||||||
default_model=self._name,
|
|
||||||
default_res_id=self.id,
|
|
||||||
)
|
|
||||||
._get_record_name({})
|
|
||||||
)
|
|
||||||
for template in custom_subjects:
|
for template in custom_subjects:
|
||||||
try:
|
try:
|
||||||
rendered_subject_template = self.env[
|
rendered_subject_template = self.env[
|
||||||
|
Loading…
Reference in New Issue
Block a user