[FIX] mail: fix mismatch between recordset and id

Recently a ref() has been converted into a direct xml id match. As this
does not return a recordset but an ID, the .id that follows is not
necessary anymore.
This commit is contained in:
Tejas Shahu
2018-06-14 15:40:38 +02:00
committed by Thibault Delavallée
parent 8bc74a09ba
commit c62f105f68
+2 -2
View File
@@ -474,11 +474,11 @@ class MailThread(models.AbstractModel):
msg_comment = MailMessage.search([
('model', '=', self._name),
('res_id', '=', self.id),
('subtype_id', '=', subtype_comment.id)])
('subtype_id', '=', subtype_comment)])
msg_not_comment = MailMessage.search([
('model', '=', self._name),
('res_id', '=', self.id),
('subtype_id', '!=', subtype_comment.id)])
('subtype_id', '!=', subtype_comment)])
# update the messages
msg_comment.write({"res_id": new_thread.id, "model": new_thread._name})