Repository
OCA/partner-contact · module folder · Try on Runboat
Module version
2.0.0
Category
Extra Tools
Folder size
0.75 MB
License
AGPL-3
Application
No
Auto-installable
No
Website
https://github.com/OCA/partner-contact
Last tracking update
2026-08-07 08:42:56
Authors
Akretion, Odoo Community Association (OCA), Tecnativa
Maintainers
Akretion, Odoo Community Association (OCA), Tecnativa
Committers
tarteo, Weblate, OCA-git-bot, oca-ci, Bhavesh Heliconia
Odoo dependencies
odoo/odoo:
- web
Python dependencies
None
System dependencies
None
Required by
None
Description
This module adds buttons on the partner form to open a new tab with the
map or the route to the address of the partner.

- Each user can select the map website he wants to use in its
  preferences.
- There are now two buttons on the partner form view: one to open a
  regular map on the address of the partner, and another one to open an
  itinerary map from the start address configured in the preferences of
  the user to the address of the partner.

This module supports several map websites:

- Google Maps \<https://www.google.com/maps\>
- OpenStreetMap \<https://www.openstreetmap.org/\>
- Bing Maps \<https://www.bing.com/maps/\>
- Here Maps \<https://www.here.com/\>
- MapQuest \<http://www.mapquest.com/\>

If partner has the latitude and longitude information, Odoo will use
that information instead of the address.

Code Analysis

Views touched (7)
XML IDNameModelTypeStatus
map_website_form map.website.form map.website form New
map_website_search map.website.search map.website search New
map_website_tree map.website.tree map.website list New
res_config_settings_view_form res.config.settings form Inherits base_setup.res_config_settings_view_form
view_partner_form map.button.res.partner.form res.partner form Inherits base.view_partner_form
view_users_form map.res.users.form res.users form Inherits base.view_users_form
view_users_form_simple_modif map.preferences.res.users.form res.users form Inherits base.view_users_form_simple_modif
HTTP endpoints (0)

No HTTP endpoints found for this module.

Models touched (4)

New fields (7)
  • active Boolean
    default=True
  • address_url Char
    help='In this URL, {ADDRESS} will be replaced by the address.' string='URL that uses the address'
  • lat_lon_url Char
    help="In this URL, {LATITUDE} and {LONGITUDE} will be replaced by the latitude and longitude (requires the module 'base_geolocalize')" string='URL that uses latitude and longitude'
  • name Char
    required=True string='Map Website Name'
  • route_address_url Char
    help='In this URL, {START_ADDRESS} and {DEST_ADDRESS} will be replaced by the start and destination addresses.' string='Route URL that uses the addresses'
  • route_lat_lon_url Char
    help="In this URL, {START_LATITUDE}, {START_LONGITUDE}, {DEST_LATITUDE} and {DEST_LONGITUDE} will be replaced by the latitude and longitude of the start and destination adresses (requires the module 'base_geolocalize')." string='Route URL that uses latitude and longitude'
  • sequence Integer
    default=10
Public methods (2)
  • get_default_map_website(self)
    @api.model
  • get_default_route_map_website(self)
    @api.model

New fields (2)
  • map_website_id Many2one → map.website
    comodel_name='map.website' config_parameter='partner_external_map.default_map_website_id' domain=['|', ('address_url', '!=', False), ('lat_lon_url', '!=', False)] string='Map Website'
  • route_map_website_id Many2one → map.website
    comodel_name='map.website' config_parameter='partner_external_map.default_route_map_website_id' domain=['|', ('route_address_url', '!=', False), ('route_lat_lon_url', '!=', False)] string='Route Map Website'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (2)
  • open_map(self)
  • open_route_map(self)

New fields (3)
  • context_map_website_id Many2one → map.website
    default=<expr> domain=['|', ('address_url', '!=', False), ('lat_lon_url', '!=', False)] string='Map Website' args: 'map.website'
  • context_route_map_website_id Many2one → map.website
    default=<expr> domain=['|', ('route_address_url', '!=', False), ('route_lat_lon_url', '!=', False)] help='Map provided used when you click on the car icon on the partner form to display an itinerary.' string='Route Map Website' args: 'map.website'
  • context_route_start_partner_id Many2one → res.partner
    string='Start Address for Route Map' args: 'res.partner'
Public methods (1)
  • create(self, vals_list)
    @api.model_create_multi
    On creation, if no starting partner is provided, assign the current created one.

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Status
Open migration PR — not merged yet for this version
CI status
checks failing
Open since
84 days ago
Last activity
55 days ago
Repository
OCA/partner-contact
Pull request
[19.0] [MIG] partner_external_map : Migration to 19.0. (#2371)