odoo icon indicating copy to clipboard operation
odoo copied to clipboard

[FIX] event: update static maps api

Open reth-odoo opened this issue 3 years ago • 2 comments

Google now requires an API key for the static maps API. As API calls cost money, and we cannot restrict the domain of the caller with the API key in emails, as the domain may vary vastly, the signing of static API URLs is implemented in the existing 'google_map_img' of partners.

This in turn can be used to get a url for an existing location. While preventing anyone from stealing the API key for their own purposes

task - 3079113


I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

reth-odoo avatar Dec 05 '22 07:12 reth-odoo

Pull request status dashboard

robodoo avatar Dec 05 '22 07:12 robodoo

Have a fix and a remove. After speaking with std, it should be fine to remove the MAKO pattern 'unsanitization'. But I leave the fix in fox now in case we want it for some reason.

Will probably ping tde for this if he's not the reviewer/doesn't see this note.

reth-odoo avatar Jan 11 '23 10:01 reth-odoo

@std-odoo I'm also not sure what to do about 23e0ab1bbd99aea1451a8edbf634334b9aaf26c3

Should I maybe create a separate PR? Pretty sure the issue is in 16.0 too

reth-odoo avatar Jan 13 '23 15:01 reth-odoo

@std-odoo I'm also not sure what to do about 23e0ab1

Should I maybe create a separate PR? Pretty sure the issue is in 16.0 too

Ah yes, you can create a separate PR in stable (no need to keep the commit here as we will forward port, so you will just need to rebased the master PR)

std-odoo avatar Jan 16 '23 07:01 std-odoo

Hello :wave: @std-odoo I moved it all* back to event. team js merged that other fix in another PR.

@xmo-odoo applied changes based on your comments, left comments for those I didn't apply

reth-odoo avatar Jan 19 '23 14:01 reth-odoo

Note: it seems like the replace('&nbps;') under MAKO was not part of it (and was fixed recently to add cleaned = so that it actually does something), and a test seems to have been added for it.

So I'm restoring it.

reth-odoo avatar Jan 20 '23 09:01 reth-odoo

@robodoo r+ rebase-merge

std-odoo avatar Jan 20 '23 10:01 std-odoo

Merge method set to rebase and merge, using the PR as merge commit message.

robodoo avatar Jan 20 '23 10:01 robodoo