- ỨNG DỤNG
- Viin Giao diện Bản đồ 17.0
| Số dòng Code | 1990 |
| Tên kỹ thuật | viin_web_map |
| Giấy phép | OPL-1 |
| Website | https://viindoo.com/apps/modules/17.0/viin_web_map?force_show=1 |
| Đọc mô tả cho | v 13.0 v 14.0 v 15.0 v 16.0 v 18.0 |
| Các mở rộng | Viin CRM Bản đồ liên hệ Viin Kho Vận Bản đồ Nhân viên Bản đồ Tuyến đường Bản đồ Đặt xe Bản đồ Điều vận Chuyến xe |
A map view for any model that has an address
The map engine behind the Viindoo map views: markers, numbered waypoints, routes, popups, and the geocoding that keeps coordinates filled.
Viin Map View (technical name viin_web_map) is an Odoo 17.0 app for Odoo Community and Odoo Enterprise and Viindoo Cloud, built for developer, administrator, every user, dispatcher.
At a Glance
The facts of Viin Map View, version 1.0.5, in one place. Published by Viindoo.
How It Works
Install a module that declares a map view, then switch to it.
Routes with waypoints
Numbered stops and a polyline per route - the routing mode of the view.
Records as markers
The plain mode: one marker per record, a sidebar with the names.
The settings
Geo Localization in General Settings: pick the provider. OpenStreetMap needs nothing; choose Mapbox or HERE and the token field appears, unlocking their tiles and driving directions.
What You Get
A viin_map view type with its own controller, model and renderer
Markers per record from a partner field; numbered markers and polylines when routing is on
Marker popups declared in the view arch, with Edit and Get directions
A sidebar listing the records on the map, and an Open in Google Maps button
Mapping address on contacts plus a daily coordinate-filling cron with failure cooldown
OpenStreetMap tiles by default; Mapbox or HERE keys in Settings for tiles and driving routes
More Screens
Everything below was taken on a database seeded with real business data, on this series - not a mock-up and not a screenshot from an older version.
Contacts on the map
What This App Does Not Do
Read this before you buy. Everything below is something the app deliberately leaves to another app or to you.
Contacts Map, Employees Map, the fleet and route bridges add the views.
Public OpenStreetMap geocoding is rate-limited; a Mapbox or HERE key is the reliable path.
Without a token the path between stops is a straight line.
A record without a partner address has no marker.
Works Well With
Apps from the same stack, built to fit this one:
Who Should Use Viin Map View?
Developer
Declares a map view in XML like any other view.
Administrator
Chooses the geocoder and pastes a token if there is one.
Every user
Switches to the map from the view switcher.
Dispatcher
Gets routes and stops drawn, not just points.
Frequently Asked Questions
What does Viin Map View do?
The map engine behind the Viindoo map views: markers, numbered waypoints, routes, popups, and the geocoding that keeps coordinates filled.
What does Viin Map View not do?
It shows nothing by itself. Contacts Map, Employees Map, the fleet and route bridges add the views. Geocoding depends on the provider you configure. Public OpenStreetMap geocoding is rate-limited; a Mapbox or HERE key is the reliable path. Driving routes need Mapbox. Without a token the path between stops is a straight line. Coordinates are stored on the contact, not the record. A record without a partner address has no marker.
Who is Viin Map View for?
Developer: Declares a map view in XML like any other view. Administrator: Chooses the geocoder and pastes a token if there is one. Every user: Switches to the map from the view switcher. Dispatcher: Gets routes and stops drawn, not just points.
Which Odoo version and editions does it support?
Odoo 17.0 - Odoo Community, Odoo Enterprise, Viindoo Cloud. Upgrades to a newer Odoo series are a separate purchase for that series.
What does it depend on?
It installs on top of: web, base_setup, base_geolocalize. Odoo installs them with it.
How do I set it up?
Install a module that declares a map view, then switch to it.
What works well with it?
Contacts Map (viin_contacts_map): Every contact on the map. Employees Map (viin_employee_map): Where the team lives. Geo Route Map (viin_geo_route_map): Routes and waypoints drawn.
Can I try it before buying?
Yes - the Live Preview button at the top of this page opens the module's own screen on a working database.
How do I get support?
Write to apps.support@viindoo.com with your Odoo version and the technical name viin_web_map; pre-sales questions go to sales@viindoo.com.
See Viin Map View in Action
Live demo: v17demo-int.viindoo.com/web#action=contacts.action_contacts
Need help with Viin Map View?
For questions, implementation support or a custom feature, contact Viindoo.
Pre-Sales & Partnership
sales@viindoo.comUpgrades to a newer Odoo series are a separate purchase for that series.
All Viindoo apps: apps.odoo.com/apps/modules/browse?author=Viindoo
Technical Requirement
Changes log
1.0.5 - Latest on the 17.0 line
- Aligned with the 17.0 models and views.
Tài liệu viin_web_map
Tổng quan
Module viin_web_map cho phép bạn tích hợp bản đồ tương tác vào hệ thống Odoo. Module này hỗ trợ hiển thị vị trí và tuyến đường trực tiếp trên bản đồ, phù hợp cho các ứng dụng dựa trên vị trí. Bạn có thể cấu hình và trực quan hóa các vị trí riêng lẻ (dùng marker) và tuyến đường (dùng waypoint).
Tính năng chính
- Hiển thị vị trí: Hiển thị dữ liệu vị trí bằng các marker trên bản đồ.
- Hiển thị tuyến đường: Trực quan hóa tuyến đường qua nhiều waypoint.
- Tùy chỉnh popup: Cá nhân hóa thông tin hiển thị trong popup của marker.
- Google Directions: Tùy chọn hiển thị chỉ dẫn từ Google Directions API.
- Tự động tạo polyline: Polyline tự động được tạo từ waypoint nếu không được định nghĩa trước.
- Cấu hình linh hoạt: Dễ dàng cấu hình và mở rộng để phù hợp với nhu cầu.
Cài đặt
Cài đặt module viin_web_map qua giao diện Odoo Apps hoặc sử dụng lệnh:
odoo-bin -c <config_file> -i viin_web_map
Cấu hình Maps API key cho 1 trong số các nhà cung cấp dịch vụ bản đồ Mapbox, Google và HERE nếu bạn muốn sử dụng tính năng định vị của một trong các nhà cung cấp này.
Sử dụng
Cấu hình view viin_map
View viin_map có thể được sử dụng để hiển thị vị trí hoặc tuyến đường trên bản đồ. Dưới đây là các ví dụ về cách cấu hình view cho từng trường hợp.
### Hiển thị dữ liệu vị trí
Để hiển thị vị trí dưới dạng marker trên bản đồ, bạn có thể cấu hình view viin_map cho model như res.partner. View này sẽ hiển thị mỗi đối tượng partner như một marker trên bản đồ kèm thông tin trong popup.
Ví dụ về view viin_map hiển thị vị trí:
<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="Tên"/> <field name="mapping_address" string="Địa chỉ"/> </marker-popup> </viin_map> </field> </record>
Giải thích: - res_partner="id": Bản đồ sử dụng trường id của model res.partner để xác định vị trí trên bản đồ. - marker-popup: Chỉ định các trường sẽ hiển thị trong popup của marker, trong ví dụ này là name và mapping_address.
### Hiển thị tuyến đường
Để hiển thị tuyến đường qua nhiều waypoint, bạn có thể cấu hình view viin_map với thuộc tính routing="true". Nếu không định nghĩa trường polyline, nó sẽ được tạo tự động từ waypoint.
Ví dụ về view viin_map hiển thị tuyến đường:
<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" polyline_field="polyline"> <field name="waypoint_ids" /> <field name="polyline" /> <marker-popup> <field name="code" string="Mã"/> <field name="mapping_address" string="Hướng dẫn"/> </marker-popup> </viin_map> </field> </record>
Giải thích: - routing="true": Kích hoạt tính năng tuyến đường, cho phép hiển thị tuyến đường giữa nhiều waypoint trên bản đồ. - waypoint_field="waypoint_ids": Xác định trường chứa danh sách waypoint để tính toán tuyến đường. - polyline_field="polyline": Không bắt buộc. Nếu không khai báo, polyline sẽ được tự động tạo từ waypoint. - field name="waypoint_ids": Hiển thị tất cả waypoint trên bản đồ.
### Tự động tạo Polyline từ Waypoint
Khi bạn cấu hình tuyến đường mà không khai báo trường polyline, polyline sẽ tự động được tạo từ tọa độ của các waypoint.
Ví dụ:
<record id="view_route_route_map_auto_polyline" model="ir.ui.view"> <field name="name">route.route.viin_map.auto_polyline</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"> <field name="waypoint_ids" /> <marker-popup> <field name="code" string="Mã"/> <field name="mapping_address" string="Hướng dẫn"/> </marker-popup> </viin_map> </field> </record>
### Các trường bắt buộc khi sử dụng Routing
Khi sử dụng routing="true", bạn cần khai báo: - waypoint_field: Định nghĩa waypoint cho tuyến đường. - res_partner: Bắt buộc trong tất cả các view viin_map.
Nếu không khai báo polyline_field, nó sẽ được tự động tạo từ waypoint.
Tùy chỉnh view bản đồ
Bạn có thể tùy chỉnh bản đồ bằng cách thêm hoặc sửa đổi các trường trong marker-popup hoặc thêm các thuộc tính khác vào thẻ viin_map.
Ví dụ về view tùy chỉnh:
<record id="view_custom_route_map" model="ir.ui.view"> <field name="name">route.route.custom_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"> <field name="waypoint_ids" /> <field name="polyline" /> <field name="custom_field" string="Thông tin tùy chỉnh"/> <marker-popup> <field name="code" string="Mã"/> <field name="mapping_address" string="Hướng dẫn"/> <field name="custom_field" string="Thông tin thêm"/> </marker-popup> </viin_map> </field> </record>
Giải thích: - field name="custom_field": Thêm một trường tùy chỉnh vào view và hiển thị trong popup của từng marker.
Hỗ trợ
Nếu bạn cần hỗ trợ hoặc gặp vấn đề, vui lòng liên hệ Viindoo qua https://viindoo.com.
Phần mềm này và các tệp liên kết ("Phần mềm") được sử dụng (chạy, tuỳ biến, chạy sau khi được tuỳ biến) chỉ khi bạn mua được giấy phép có hiệu lực từ tác giả, điển hình như qua các Ứng dụng Odoo, hoặc trong trường hợp bạn nhận được thoả thuận bằng văn bản từ tác giả của Phần mềm (chi tiết tại tệp COPYRIGHT).
Bạn có thể phát triển các phân hệ Odoo có sử dụng Phần mềm như một Thư viện (thường là phụ thuộc vào, nhập vào và sử dụng nguồn của nó) nhưng không sao chéo bất kỳ mã nguồn hay tài liệu nào thuộc Phần mềm. Bạn có thể phân phối những phân hệ này theo giấy phép mà bạn lựa chọn, miễn sao nội dung giấy phép đó tương tích với điều khoản của Giấy phép Phần mềm Độc quyền Odoo (ví dụ: LGPL, MIT hay bất kỳ loại giấy phép phần mềm độc quyền nào tương tự vậy).
Nghiêm cấm phát hành, phân phối, cấp phép lại hoặc bán bản sao của Phần mềm hoặc bản sao Phần mềm đã được sửa đổi.
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.
PHẦN MỀM ĐƯỢC CUNG CẤP "NGUYÊN TRẠNG", KHÔNG BẢO ĐẢM DƯỚI BẤT KỲ HÌNH THỨC NÀO, ĐƯỢC THỂ HIỆN RÕ RÀNG HOẶC NGỤ Ý, KHÔNG GIỚI HẠN ĐẢM BẢO VỀ CÁC BẢO ĐẢM NGỤ Ý VỀ KHẢ NĂNG THƯƠNG MẠI, PHÙ HỢP VỚI MỤC ĐÍCH CỤ THỂ VÀ KHÔNG VI PHẠM. TRONG MỌI TRƯỜNG HỢP SẼ KHÔNG CÓ TÁC GIẢ HOẶC CHỦ SỞ HỮU BẢN QUYỀN NÀO CHỊU TRÁCH NHIỆM VỀ BẤT KỲ KHIẾU NẠI, THIỆT HẠI HOẶC TRÁCH NHIỆM PHÁP LÝ KHÁC NÀO TRONG PHẠM VI HỢP ĐỒNG, CÁC THIỆT HẠI HOẶC CÁCH KHÁC, PHÁT SINH TỪ, NGOÀI HOẶC CÓ LIÊN KẾT VỚI PHẦN MỀM HOẶC VIỆC SỬ DỤNG HOẶC KINH DOANH KHÁC TẠI PHẦN MỀM.