Merge PR #1027 into 15.0

Signed-off-by yajo
This commit is contained in:
OCA-git-bot 2022-12-14 10:42:00 +00:00
commit 27a3d5b3a4
2 changed files with 7 additions and 1 deletions

View File

@ -1,5 +1,6 @@
# Copyright 2020-2021 Tecnativa - João Marques # Copyright 2020-2021 Tecnativa - João Marques
# Copyright 2021 Tecnativa - Pedro M. Baeza # Copyright 2021 Tecnativa - Pedro M. Baeza
# Copyright 2022 Moduon - Eduardo de Miguel
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import api, models from odoo import api, models
@ -27,11 +28,13 @@ class MailThread(models.AbstractModel):
record_name=False, record_name=False,
**kwargs **kwargs
): ):
if not subtype_id and subtype_xmlid: if 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,
raise_if_not_found=False, raise_if_not_found=False,
) )
if not subtype_id:
subtype_id = self.env["ir.model.data"]._xmlid_to_res_id("mail.mt_note")
if subtype_id: if subtype_id:
custom_subjects = ( custom_subjects = (
self.env["mail.message.custom.subject"] self.env["mail.message.custom.subject"]

View File

@ -7,3 +7,6 @@
* Versada <https://versada.eu> * Versada <https://versada.eu>
* Naglis Jonaitis * Naglis Jonaitis
* Moduon <https://www.moduon.team>
* Eduardo de Miguel