Odoo Help


Embed JS code Odoo 8

Mazhar Iqbal Rana
on 2/10/15, 3:03 AM 1,611 views

Hey Good day


I want to embed the below cod ein my module named as vessel track


I have the init,openerp, module, and view files made with me.


PLease guide that will this code be directly applicable or in which view will it be?


I want to open and show this direct as a map or kanban view on clicking the module name from menu item above.

No form view no list view needed



<script type="text/javascript">
// Map Size
var width='800';  // width of the embedded map in pixels (min. 600 px) or percentage (default=600px)
var height='500'; // height of the embedded map in pixels (min. 400 px) (default=400px)
// Map View (does not work if Ship Selection is used)
var latitude='40.0'; // coordinates of the map center in decimal degrees (not mandatory)
var longitude='2.0';
var zoom='2';        // map zoom level (between 2 and 17)
// Ship selection
// Option 1 – by MMSI
var mmsi='xxxxxxxxx';      // center map over selected vessel specified by MMSI
var show_track=true;       // show track of the selected ship
// Option 2 – by IMO
var imo='xxxxxxx';         // center map over selected vessel specified by IMO
var show_track=true;       // show track of the selected ship
// Option 3 – display user fleet ships
var fleet='your fleet id'; // your fleet key (default is false)
var fleet_hide_old_positions=false; // Hide ships with old positions (default is false)
// Auxiliary parameters
var names=false; // always display ship names (default is false)
var click_to_activate=true; // user has to click on the map before zooming with mouse wheel
var store_position=false; // store the last position of the map (default is false, does not work when ship selection is used
var default_maptype=1; // change default map type: 1 - google.maps.MapTypeId.ROADMAP, 2 - google.maps.MapTypeId.SATELLITE
var map_style=[ // use this tool for custom map styling
{"featureType": "landscape.natural.landcover", "stylers": [{ "hue": "#ffaa00" }]},
{"featureType": "water", "stylers": [{ "hue": "#00a1ff" },{ "saturation": 91 },{ "lightness": -18 }]}];
<script type="text/javascript" src="http://www.vesselfinder.com/aismap.js"></script>


About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 2/10/15, 3:03 AM
Seen: 1611 times
Last updated: 3/16/15, 8:10 AM