[FIX] whatsapp: remove non memeber fields
This commit is contained in:
parent
b66b86066c
commit
ed95da91c2
|
|
@ -17,13 +17,6 @@ class IrAttachment(models.Model):
|
|||
return guest
|
||||
return super()._bus_notification_target()
|
||||
|
||||
def _attachment_format(self, commands=False):
|
||||
attachment_format = super()._attachment_format(commands=commands)
|
||||
for a in attachment_format:
|
||||
# sudo: discuss.voice.metadata - checking the existence of voice metadata for accessible attachments is fine
|
||||
a["voice"] = bool(self.browse(a["id"]).with_prefetch(self._prefetch_ids).sudo().voice_ids)
|
||||
return attachment_format
|
||||
|
||||
def _post_add_create(self, **kwargs):
|
||||
super()._post_add_create()
|
||||
if kwargs.get('voice'):
|
||||
|
|
|
|||
Loading…
Reference in New Issue