Base Module for Map Visualization in Odoo
Viin Map View is a foundational module enabling map-based visualization for various records in Odoo,
such as contacts, employees, or custom routes. This module focuses on providing a flexible and customizable
interface for integrating geographic data and map providers into Odoo views.
Key Features
- Map Markers: Display records as markers on the map, utilizing latitude and longitude fields.
- Routing Support: Visualize routes between waypoints with directions for supported providers.
- Customizable Marker Popups: Define specific fields to display in marker popups.
- Support for Multiple Map Providers: Compatible with popular providers: OpenStreetMap, Google, Mapbox and HERE.
Demo Video: Viin Map View
Usage Notes
This module only provides the core map interface (view). Specific functionalities, such as integrating contacts
or employees with maps, require additional modules. For example:
- To show contacts on the map, a separate integration module must link the viin_web_map interface with the contacts model.
- The demo videos use such integration modules to showcase functionality beyond the scope of this module.
Examples
Displaying Contacts on a Map
<record id="res_partner_view_map" model="ir.ui.view">
<field name="name">res.partner.view.map</field>
<field name="model">res.partner</field>
<field name="arch" type="xml">
<viin_map res_partner="id">
<marker-popup>
<field name="name" string="Name"/>
<field name="mapping_address" string="Address"/>
</marker-popup>
</viin_map>
</field>
</record>
Displaying employees on map
<record id="hr_employee_view_viin_map" model="ir.ui.view">
<field name="name">hr.employee.view.viin_map</field>
<field name="model">hr.employee</field>
<field name="arch" type="xml">
<viin_map res_partner="address_home_id">
<marker-popup>
<field name="name" string="Name" />
<field name="address_home_id" string="Address" />
</marker-popup>
</viin_map>
</field>
</record>
Visualizing Routes
<record id="view_route_route_map" model="ir.ui.view">
<field name="name">route.route.viin_map</field>
<field name="model">route.route</field>
<field name="arch" type="xml">
<viin_map res_partner="address_from_id"
routing="true"
waypoint_field="waypoint_ids">
<marker-popup>
<field name="name" string="Route Name" />
<field name="instructions" string="Instructions" />
</marker-popup>
</viin_map>
</field>
</record>
Editions Supported
- Community Edition
This software and associated files (the "Software") may only be
used
(executed, modified, executed after modifications) if you have
purchased a
valid license from the authors, typically via Odoo Apps,
or if you
have
received a written agreement from the authors of the
Software (see the
COPYRIGHT file).
You may develop Odoo modules that use the Software as a library
(typically
by depending on it, importing it and using its
resources), but
without
copying any source code or material from the
Software. You may distribute
those modules under the license of your
choice, provided that this
license
is compatible with the terms of
the Odoo Proprietary License (For
example:
LGPL, MIT, or proprietary
licenses similar to this one).
It is forbidden to publish, distribute, sublicense, or sell
copies of the
Software or modified copies of the Software.
Thông báo bản quyền và chấp thuận nêu trên buộc phải được bao gồm trong tất cả các bản sao hoặc các phần quan trọng của Phần mềm.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT
SHALL THE
AUTHORS OR COPYRIGHT HOLDERS
BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN
ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING
FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE
SOFTWARE.