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

import re

from odoo import api, fields, models, _
from odoo.addons.website.models.website import slug


class Event(models.Model):
    _inherit = 'event.event'

    @api.multi
    def address_google_map_link(self):
        print "ENTROU NO GOOGLE MAP LINK:::::::::::::::::::::::::"
        self.ensure_one()
        if self.address_id:
            return self.sudo().address_id.google_maps_iframe
        return None

    @api.multi
    def check_google_map_image(self):
        print "ENTROU NO CHECK GOOGLE MAP LINK:::::::::::::::::::::::::"
        self.ensure_one()
        if self.sudo().address_id.google_maps_iframe:
            return True
        return False
