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

[16.0][MIG] web_view_leaflet_map #352

Closed
wants to merge 3 commits into from
Closed

Conversation

yibudak
Copy link

@yibudak yibudak commented Nov 30, 2023

Since web_map module is only exist for enterprise edition, I wanted to port OpenStreetMap viewer module to Odoo 16.0. Also I've made some changes to improve module quality. Here are the changes:

Migrated the module.
Updated the Leaflet library to the latest version.
Added a default marker.
Corrected the current partner location issue (previously taking the active company's location).
Fixed compatibility issue with the web_responsive module.
Refactored some code related to popups to improve readability.
Resolved the error where the map does not re-render when exiting the form view.

@yibudak
Copy link
Author

yibudak commented Nov 30, 2023

@pedrobaeza
Copy link
Member

Thanks for the contribution.

Please preserve commit history following technical method explained in https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-16.0.

If the jump is between several versions, you have to modify the source branch in the main command to accommodate it to this circumstance.

And run pre-commit locally for generating the changes, instead of manually do changes in README.md, and the link for the setup folder (which is now incorrect).

About the module itself, I can't say, as I don't use it.

@legalsylvain
Copy link
Contributor

legalsylvain commented Nov 30, 2023

hi @yibudak.
First, thanks for porting this module !
Same remarks as @pedrobaeza for the history.
could you also port this trivial module in the current PR ? https://github.com/OCA/geospatial/tree/12.0/web_view_leaflet_map_partner
It allow to test easily on runbaot the feature.

Please ping me when it's ready for review.
kind regards.

Also 2 questions :

Corrected the current partner location issue (previously taking the active company's location).

Could you explain what is now how is defined the default location ?

Resolved the error where the map does not re-render when exiting the form view.

Thanks !

Note : I began a work that is to review here : #342

could you base your changes on my unreviewed PR ?

@yibudak
Copy link
Author

yibudak commented Nov 30, 2023

Hey @legalsylvain,

I didn't see your work about migrating these modules into v16. What do you mean by "could you base your changes on my unreviewed PR" ? Should I close this PR and commiting into your migration branch?

Corrected the current partner location issue (previously taking the active company's location).

It was like this:
current_partner = self.env.user.company_id.partner_id
And I've changed it into:
current_partner = self.env.user.partner_id
This is because company employees (users) can be located at different places. if it was like before, only the location defined to the company would appear.

And the second question. Actually that "invalidateSize with timeout" is a correct and quick workaround that problem, I just increased the timeout because it was too low (1 ms) and it wasn't working as expected.

@legalsylvain
Copy link
Contributor

legalsylvain commented Nov 30, 2023

Should I close this PR and commiting into your migration branch?

Maybe we can review and merge #342 as it is working as in V12, then you can make a little IMP/FIX PR against 16.0 branch. What do you think ?

@yibudak
Copy link
Author

yibudak commented Nov 30, 2023

Should I close this PR and commiting into your migration branch?

Maybe we can review and merge #342 as it is working as in V12, then you can make a little IMP/FIX PR against 16.0 branch. What do you think ?

Agreed. I will make contributions into your work. Thank you for your quick response 👍🏻

@yibudak yibudak closed this Nov 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants