[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:
committed by
Thibault Delavallée
parent
8bc74a09ba
commit
c62f105f68
@@ -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})
|
||||
|
||||
Reference in New Issue
Block a user