Skip to content

Widget map first commit - #2917

Closed
drkpkg wants to merge 0 commit into
OCA:17.0from
drkpkg:17.0
Closed

Widget map first commit#2917
drkpkg wants to merge 0 commit into
OCA:17.0from
drkpkg:17.0

Conversation

@drkpkg

@drkpkg drkpkg commented Aug 14, 2024

Copy link
Copy Markdown

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

Rad0van commented Aug 14, 2024

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Member

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

@drkpkg

drkpkg commented Aug 14, 2024

Copy link
Copy Markdown
Author

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

drkpkg commented Aug 14, 2024

Copy link
Copy Markdown
Author

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
Copy Markdown
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