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

Module: Project

Entity: project.project

Compute Method: _compute_google_map_iframe

Inputs Method Outputs
for project in self:
            address = project.partner_id._display_address(without_name=True, separator=' ')
            if not address:
                project.google_map_iframe = False
                continue
            query_params = url_encode({'q': address, 'output': 'embed'})
            project.google_map_iframe = Markup("""
                <iframe
                    loading="lazy"
                    src="https://www.google.com/maps?{query_params}">
                </iframe>
            """).format(query_params=query_params)

Back to entity