Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[15.0][ADD] website_openstreetmap #949

Merged
merged 4 commits into from
Jun 28, 2023

Conversation

espo-tony
Copy link

This module introduces a new website snippet "OpenStretMap" to drag and drop in your website.

It also implements a method on "res.partner" to return the OpenStreetMap link computed from the partner address. This method is a technical feature: it doesn't introduce any functionality by itself, but it can be used by other modules.

@pedrobaeza
Copy link
Member

We have in OCA the module partner_external_map that does the function you mention, so I think it's better to restrict this module to the snippet, and call it website_snippet_openstreetmap. Note that there were an old one in #386

@pedrobaeza pedrobaeza added this to the 15.0 milestone Jan 30, 2023
…res.partner and renamed module into website_snippet_openstreetmap
@espo-tony
Copy link
Author

@pedrobaeza
I removed the duplicated functionality and renamed the module as you suggested

@espo-tony
Copy link
Author

@pedrobaeza
Thanks for your review. I removed the unneeded texts.

@pedrobaeza
Copy link
Member

Trying it functionally, several comments:

  • Initially, the map is not rendered with the default address provided. Trying with other addresses, it may be the default provided that doesn't locate anything.
  • The block is not an inner one, and it's not possible to change the width. It always takes full width.
  • It doesn't allow as well to put a top/bottom padding.

@espo-tony
Copy link
Author

@pedrobaeza

This snippet takes, by default, the website company address. Indeed, the issue with it is that the company address provided by default from Odoo in a new DB: 250 Executive Park Blvd, Suite 3400 San Francisco California (US) doesn't return any result in OpenStreetMap. As you can check here: https://www.openstreetmap.org/search?query=250%20Executive%20Park%20Blvd%2C%20Suite%203400%20San%20Francisco%20California%20(US)#map=19/45.47938/4.36428

If you set a different address to your company, the block should work correctly.

About the block, I tried to stick as much as possible to the standard Odoo "Map" snippet. Compare this (standard Map block):

Screenshot from 2023-02-01 21-32-51

and this (OpenStreetMap block):

Screenshot from 2023-02-01 21-32-57

Also, it should be possible to put it into other blocks:

Screenshot from 2023-02-01 21-39-05

Copy link
Member

@pedrobaeza pedrobaeza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about including demo data for modifying such company address removing , Suite that is the part that is breaking the search?

@espo-tony
Copy link
Author

@pedrobaeza
I changed the demo data as you suggested.

@espo-tony
Copy link
Author

@pedrobaeza can I do anything to push this PR?

@pedrobaeza
Copy link
Member

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

Hey, thanks for contributing! Proceeding to merge this for you.
Prepared branch 15.0-ocabot-merge-pr-949-by-pedrobaeza-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 1ac87f1 into OCA:15.0 Jun 28, 2023
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at e9f3691. Thanks a lot for contributing to OCA. ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants