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

Inputs Method Outputs
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

Back to entity