[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,
|
||||
**kwargs
|
||||
):
|
||||
subtype_id = kwargs.get("subtype_id", False)
|
||||
if not subtype_id and subtype_xmlid:
|
||||
subtype_id = self.env["ir.model.data"].xmlid_to_res_id(
|
||||
subtype_xmlid,
|
||||
@ -39,15 +38,10 @@ class MailThread(models.AbstractModel):
|
||||
[("model_id.model", "=", self._name), ("subtype_ids", "=", subtype_id)]
|
||||
)
|
||||
if not subject:
|
||||
subject = (
|
||||
"Re: %s"
|
||||
% self.env["mail.message"]
|
||||
.with_context(
|
||||
default_model=self._name,
|
||||
default_res_id=self.id,
|
||||
)
|
||||
._get_record_name({})
|
||||
)
|
||||
subject = "Re: %s" % self.env["mail.message"].with_context(
|
||||
default_model=self._name,
|
||||
default_res_id=self.id,
|
||||
)._get_record_name({})
|
||||
for template in custom_subjects:
|
||||
try:
|
||||
rendered_subject_template = self.env[
|
||||
|
Loading…
Reference in New Issue
Block a user