Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.

Module: Discuss

Entity: mail.poll.vote

Compute Method: _compute_is_self_vote

View 20.0
Inputs Method Outputs
  • user_id
  • guest_id
+ user, guest = self.env["res.users"]._get_current_persona()
+ self.is_self_vote = False
+ for vote in self:
+             if vote.user_id and user == vote.user_id:
+                 vote.is_self_vote = True
+             if vote.guest_id and guest == vote.guest_id:
+                 vote.is_self_vote = True
  • is_self_vote

Back to entity