diff --git a/__openerp__.py b/__openerp__.py index a5cd98b..c90c467 100644 --- a/__openerp__.py +++ b/__openerp__.py @@ -1,6 +1,6 @@ { 'name' : 'Sentbox', - 'version' : '1.0.0', + 'version' : '1.0.1', 'author' : 'IT-Projects LLC, Ivan Yelizariev', 'license': 'GPL-3', 'category' : 'Social Network', diff --git a/models.py b/models.py index 27e0425..04cdf91 100644 --- a/models.py +++ b/models.py @@ -6,7 +6,7 @@ class mail_message(models.Model): @api.one @api.depends('author_id', 'notified_partner_ids') def _get_sent(self): - self.sent = len(self.notified_partner_ids) > 1 or len(self.notified_partner_ids)==1 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)