|
@ -1,4 +1,5 @@ |
|
|
from openerp import api, models, fields, SUPERUSER_ID |
|
|
|
|
|
|
|
|
from openerp import api, models, fields |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class mail_message(models.Model): |
|
|
class mail_message(models.Model): |
|
|
_inherit = 'mail.message' |
|
|
_inherit = 'mail.message' |
|
@ -6,10 +7,11 @@ class mail_message(models.Model): |
|
|
@api.one |
|
|
@api.one |
|
|
@api.depends('author_id', 'notified_partner_ids') |
|
|
@api.depends('author_id', 'notified_partner_ids') |
|
|
def _get_sent(self): |
|
|
def _get_sent(self): |
|
|
self.sent = len(self.notified_partner_ids) > 1 or len(self.notified_partner_ids)==1 and self.author_id and self.notified_partner_ids[0].id != self.author_id.id |
|
|
|
|
|
|
|
|
self.sent = len(self.notified_partner_ids) > 1 or len(self.notified_partner_ids) == 1 and self.author_id and self.notified_partner_ids[0].id != self.author_id.id |
|
|
|
|
|
|
|
|
sent = fields.Boolean('Sent', compute=_get_sent, help='Was message sent to someone', store=True) |
|
|
sent = fields.Boolean('Sent', compute=_get_sent, help='Was message sent to someone', store=True) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class mail_notification(models.Model): |
|
|
class mail_notification(models.Model): |
|
|
_inherit = 'mail.notification' |
|
|
_inherit = 'mail.notification' |
|
|
|
|
|
|
|
|