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

Widget map first commit #2917

Closed
wants to merge 0 commits into from
Closed

Widget map first commit #2917

wants to merge 0 commits into from

Conversation

drkpkg
Copy link

@drkpkg drkpkg commented Aug 14, 2024

New widget for OCA web!

I bring you the map field and widget. This widget will help you to add a map (using leaflet) inside the forms.

Xml form:

...
<field name="map_location" widget="location_map" readonly="0"/>
...
from odoo.addons.widget_map.models.map import Map

...
map_location = Map(string="Location", help="Employee location on the map", store=True, default="0.0,0.0")

Feel free to suggest, this is my first contribution to OCA and I hope contribute more!

@Rad0van
Copy link

Rad0van commented Aug 14, 2024

Thanks @drkpkg for your first contribution. Few remarks for the start to make it better:

  1. You should get rid of pre-commit messages. See here on how to install it: https://github.com/OCA/maintainer-tools/wiki/Install-pre-commit Then just run pre-commit run -a and it will reformat your files, push the changes. Should get rid of pre-commit errors.
  2. See naming commit convention here to improve: https://github.com/OCA/odoo-community.org/blob/master/website/Contribution/CONTRIBUTING.rst#commit-message
  3. Also for the contribution to be accepted you need to sign CLA: https://odoo-community.org/about/cla

@pedrobaeza
Copy link
Member

cc @legalsylvain isn't this similar to https://github.com/OCA/geospatial/tree/16.0/web_view_leaflet_map ?

@drkpkg
Copy link
Author

drkpkg commented Aug 14, 2024

cc @legalsylvain isn't this similar to https://github.com/OCA/geospatial/tree/16.0/web_view_leaflet_map ?

I think it is kind of, I will check it out to prevent my double work haha.

@drkpkg
Copy link
Author

drkpkg commented Aug 14, 2024

Thanks @drkpkg for your first contribution. Few remarks for the start to make it better:

  1. You should get rid of pre-commit messages. See here on how to install it: https://github.com/OCA/maintainer-tools/wiki/Install-pre-commit Then just run pre-commit run -a and it will reformat your files, push the changes. Should get rid of pre-commit errors.
  2. See naming commit convention here to improve: https://github.com/OCA/odoo-community.org/blob/master/website/Contribution/CONTRIBUTING.rst#commit-message
  3. Also for the contribution to be accepted you need to sign CLA: https://odoo-community.org/about/cla

Thank you for the observations, I'm working to fix this.

@legalsylvain
Copy link
Contributor

Hi @drkpkg. Thanks for your contribution !
Is it the PR ready for review ?

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.

4 participants