web
web copied to clipboard
Widget map first commit
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!
Thanks @drkpkg for your first contribution. Few remarks for the start to make it better:
- 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 -aand it will reformat your files, push the changes. Should get rid of pre-commit errors. - See naming commit convention here to improve: https://github.com/OCA/odoo-community.org/blob/master/website/Contribution/CONTRIBUTING.rst#commit-message
- Also for the contribution to be accepted you need to sign CLA: https://odoo-community.org/about/cla
cc @legalsylvain isn't this similar to https://github.com/OCA/geospatial/tree/16.0/web_view_leaflet_map ?
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.
Thanks @drkpkg for your first contribution. Few remarks for the start to make it better:
- 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 -aand it will reformat your files, push the changes. Should get rid of pre-commit errors.- See naming commit convention here to improve: https://github.com/OCA/odoo-community.org/blob/master/website/Contribution/CONTRIBUTING.rst#commit-message
- 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.
Hi @drkpkg. Thanks for your contribution ! Is it the PR ready for review ?