Browse Source

Merge remote-tracking branch 'origin/8.0' into 9.0-merge

pull/2/head
Ivan Yelizariev 9 years ago
parent
commit
a2883fa5fb
  1. 2
      __openerp__.py
  2. 9
      doc/changelog.rst
  3. 3
      models.py

2
__openerp__.py

@ -1,6 +1,6 @@
{ {
'name' : 'Sentbox', 'name' : 'Sentbox',
'version' : '1.0.1',
'version' : '1.0.2',
'author' : 'IT-Projects LLC, Ivan Yelizariev', 'author' : 'IT-Projects LLC, Ivan Yelizariev',
'license': 'LGPL-3', 'license': 'LGPL-3',
'category' : 'Social Network', 'category' : 'Social Network',

9
doc/changelog.rst

@ -0,0 +1,9 @@
.. _changelog:
Changelog
=========
`1.0.2`
-------
- FIX access issue "read access error on delete"

3
models.py

@ -7,7 +7,8 @@ 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_sudo = self.sudo()
self_sudo.sent = len(self_sudo.notified_partner_ids) > 1 or len(self_sudo.notified_partner_ids) == 1 and self_sudo.author_id and self_sudo.notified_partner_ids[0].id != self_sudo.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)

Loading…
Cancel
Save