Skip to content

Commit 3da58e7

Browse files
committed
Merge PR #982 into 17.0
Signed-off-by StefanRijnhart
2 parents eab1607 + af4e485 commit 3da58e7

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

base_substate/models/base_substate_mixin.py

+9-9
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,19 @@ def check_substate_id_value(self):
2828
}
2929
)
3030

31-
def _track_template(self, tracking):
32-
res = super()._track_template(tracking)
33-
first_rec = self[0]
34-
changes, tracking_value_ids = tracking[first_rec.id]
35-
if "substate_id" in changes and first_rec.substate_id.mail_template_id:
31+
def _track_template(self, changes):
32+
res = super()._track_template(changes)
33+
track = self[0]
34+
if "substate_id" in changes and track.substate_id.mail_template_id:
3635
res["substate_id"] = (
37-
first_rec.substate_id.mail_template_id,
36+
track.substate_id.mail_template_id,
3837
{
39-
"auto_delete_message": True,
40-
"subtype_id": self.env["ir.model.data"].xmlid_to_res_id(
38+
"composition_mode": "comment",
39+
"auto_delete": True,
40+
"subtype_id": self.env["ir.model.data"]._xmlid_to_res_id(
4141
"mail.mt_note"
4242
),
43-
"notif_layout": "mail.mail_notification_light",
43+
"email_layout_xmlid": "mail.mail_notification_light",
4444
},
4545
)
4646
return res

0 commit comments

Comments
 (0)