# -*- coding: utf-8 -*-

from odoo import api, models


class SgtResPartner(models.Model):
    _inherit = 'res.partner'

    @api.multi
    def get_signup_url(self):
        self.ensure_one()
        return self.partner_id.with_context(signup_valid=True)._get_signup_url_for_action(
            action='/mail/view',
            model=self._name,
            res_id=self.id)[self.partner_id.id]
