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

[14.0][IMP] web_google_maps: Add marker color by field function #204

Open
wants to merge 1 commit into
base: 14.0
Choose a base branch
from

Conversation

lieblinger
Copy link

This commit makes it possible to specify a field_name in the color attribute. By using a field_name instead of color it groups records with an identical field relation into groups with the same color

@lieblinger lieblinger changed the title [IMP] web_google_maps: Add marker color by field function [14.0][IMP] web_google_maps: Add marker color by field function Dec 11, 2022
@gityopie
Copy link
Owner

Hi @lieblinger

Thank you for the PR!

I guess this module google_marker_icon_picker already does your proposed feature, have you check?

Anyway, the predefined color on this line https://github.com/gityopie/odoo-addons/blob/14.0/web_google_maps/static/src/js/view/google_map/google_map_renderer.js#L16 can be ignored,
You can use the build-in widget color to set marker color (the marker is an SVG) if you want to have more options for the color
or the new widget google_marker_picker from the module google_marker_icon_picker with limited option

@lieblinger
Copy link
Author

Hi @gityopie,
Thanks for your fast response. My PR calculates the marker color based on a specified field the same way as the Odoo calendar does it. But you're right this also can be achieved with your google_marker_icon_picker module.

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.

2 participants