Skip to content

Commit

Permalink
[FIX] web_tip: use env.user to compare to a res.users recordset
Browse files Browse the repository at this point in the history
  • Loading branch information
KangOl committed Sep 5, 2014
1 parent bcf808f commit 390c71f
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions addons/web_tip/web_tip.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,7 @@ class tip(models.Model):
@api.one
@api.depends('user_ids')
def _is_consumed(self):
if self.env.uid in self.user_ids:
self.is_consumed = True
else:
self.is_consumed = False
self.is_consumed = self.env.user in self.user_ids

title = fields.Char('Tip title')
description = fields.Html('Tip Description', required=True)
Expand Down

0 comments on commit 390c71f

Please sign in to comment.