Browse Source

shows messages from channels

pull/186/head
KolushovAlexandr 6 years ago
parent
commit
ce1f072329
No known key found for this signature in database GPG Key ID: C3E04B793421FD2
  1. 2
      mail_sent/__manifest__.py
  2. 5
      mail_sent/doc/changelog.rst
  3. 4
      mail_sent/models.py

2
mail_sent/__manifest__.py

@ -4,7 +4,7 @@
"summary": """Quick way to find sent messages""",
"category": "Discuss",
"images": ['images/menu.png'],
"version": "1.0.4",
"version": "1.1.0",
"author": "IT-Projects LLC, Ivan Yelizariev, Pavel Romanchenko",
"support": "apps@it-projects.info",

5
mail_sent/doc/changelog.rst

@ -1,3 +1,8 @@
`1.1.0`
-------
- **New:** Shows messages from channels
`1.0.4`
-------
- **FIX:** didn't work for non-admin users

4
mail_sent/models.py

@ -14,7 +14,9 @@ class MailMessage(models.Model):
sent = len(r_sudo.partner_ids) > 1 \
or len(r_sudo.partner_ids) == 1 \
and r_sudo.author_id \
and r_sudo.partner_ids[0].id != r_sudo.author_id.id
and r_sudo.partner_ids[0].id != r_sudo.author_id.id \
or r_sudo.model == 'mail.channel' \
and r_sudo.res_id
r.sent = sent
@api.multi

Loading…
Cancel
Save