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

City doesn't get send to google when housenumber is not present #129

Open
AtraXionAartselaar opened this issue Apr 20, 2020 · 3 comments · Fixed by #130
Open

City doesn't get send to google when housenumber is not present #129

AtraXionAartselaar opened this issue Apr 20, 2020 · 3 comments · Fixed by #130
Labels

Comments

@AtraXionAartselaar
Copy link

Hi
First all great tool you have made; very usefull !

I found an error. When an user only fills in the streetname and not the housenumber. The city ‘locality’ (‘municipality’, ..) doesn't get filled in. So Google responses there is no city... because of that "administrative_area_level_2" get"s filled in as city name which is not correct

In addition you'll find a zip file with a video explaining it. First time I show the bug the second time I show the normal behavior when the housenumer is present.

Odoo city missing.zip

Response from Google because city was missing:
/**/_xdc_._akyo20 && _xdc_._akyo20( { "html_attributions" : [], "result" : { "address_components" : [ { "long_name" : "Antwerpsestraat", "short_name" : "Antwerpsestraat", "types" : [ "route" ] }, { "long_name" : "Antwerpen", "short_name" : "AN", "types" : [ "administrative_area_level_2", "political" ] }, { "long_name" : "Vlaanderen", "short_name" : "Vlaanderen", "types" : [ "administrative_area_level_1", "political" ] }, { "long_name" : "België", "short_name" : "BE", "types" : [ "country", "political" ] } ], "adr_address" : "\u003cspan class=\"street-address\"\u003eAntwerpsestraat\u003c/span\u003e, \u003cspan class=\"country-name\"\u003eBelgië\u003c/span\u003e", "formatted_address" : "Antwerpsestraat", "geometry" : { "location" : { "lat" : 51.0977415, "lng" : 4.3673673 }, "viewport" : { "northeast" : { "lat" : 51.09909048029149, "lng" : 4.368716280291502 }, "southwest" : { "lat" : 51.09639251970849, "lng" : 4.366018319708497 } } }, "icon" : "https://maps.gstatic.com/mapfiles/place_api/icons/geocode-71.png", "id" : "6a8d281b4dedc7c4c576eacebed1d2f8a3d0b7d4", "name" : "Antwerpsestraat", "place_id" : "EhhBbnR3ZXJwc2VzdHJhYXQsIEJlbGdpdW0iLiosChQKEgmpPkvg4fHDRxHfREQPaMDxuBIUChIJH4agHvrvw0cR-Gppir5EdpU", "reference" : "EhhBbnR3ZXJwc2VzdHJhYXQsIEJlbGdpdW0iLiosChQKEgmpPkvg4fHDRxHfREQPaMDxuBIUChIJH4agHvrvw0cR-Gppir5EdpU", "scope" : "GOOGLE", "types" : [ "route" ], "url" : "https://maps.google.com/?q=Antwerpsestraat&ftid=0x47c3f1e1e04b3ea9:0xb8f1c0680f4444df", "utc_offset" : 120 }, "status" : "OK" }

@gityopie
Copy link
Owner

@AtraXionAartselaar thank you.
can you tell me what should be the correct address?
actually, you can change the widget component address via widget options

@AtraXionAartselaar
Copy link
Author

AtraXionAartselaar commented Apr 27, 2020 via email

@gityopie
Copy link
Owner

@AtraXionAartselaar Ok, I got the issue and thanks for the explanation
I pushed a new branch https://github.com/gityopie/odoo-addons/tree/12.0-autocomplete-dev and introduced four new modules for the google autocomplete.
Please have a look on that modules (I also fixed your issue there).

For the module sale_maps, the autocomplete are still there but I would like you to check the new modules instead.
I think sale_maps it's not relavant anymore just to add the autocomplete on this module and more, I've moved the modification defined on that module to contacts_maps

Waiting your feedback for those new modules :)
Thanks

@gityopie gityopie added the 12.0 label Apr 28, 2020
@gityopie gityopie linked a pull request Apr 30, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants