Odoo Help


This community 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.


Menu Item not Appering and No Result of Code..

Mazhar Iqbal Rana
on 2/11/15, 1:03 AM 709 views

Hi There

Module is installed propey after writing the code in xml but menu item id not appearing above in parent..



import sea



# -*- coding: utf-8 -*-
    'name': "vessel Tracker",

    'summary': """Vssel Finder""",

    'description': """
        Module for tracking vessels:
            It handles millions of vessel position records daily. Our API allows you to integrate our data into your application or website. You can harness all this data, along with port calls, ship particulars etc. to build powerful applications for real-time, targeted intelligence.
Get started by selecting an option from the available services below. Please contact us if you can't find what you are looking for.

    'author': "RANA",
    'website': "http://www.my-cricket.weebly.com",

    # Categories can be used to filter modules in modules listing
    # Check https://github.com/odoo/odoo/blob/master/openerp/addons/base/module/module_data.xml
    # for the full list
    'category': 'Fleet',
    'version': '0.1',

    # any module necessary for this one to work correctly
    'depends': ['base'],
    # always loaded
    'data': [
        # 'security/ir.model.access.csv',
    # only loaded in demonstration mode
    'demo': [
'js': ["static/src/sea.js"],


My sea.py file

from openerp import models, fields,api
import canvas
import math

class Sea(models.Model):
    _name = 'vessel.track'

File of seamodule/static/src/sea.js

<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 }]}];


And sea_view.xml

<?xml version="1.0" encoding="UTF-8"?>
        <!-- top level menu: no parent -->
        <menuitem id="main_sea_menu" name="Sea Map"/>
        <!-- A first level in the left side menu is needed
             before using action= attribute -->
         <menuitem id="sea_menu" name="Sea Map" parent="main_sea_menu"/>
        <!--the following menuitem should appear *after*
             its parent openacademy_menu and *after* its
             action course_list_action -->
       <!--<menuitem id="maps_menu" name="Sea Map" parent="sea_menu" action="sea_list_action"/>
         Full id location:
             action="openacademy.course_list_action" It is not required when it is the same module -->
      <!-- -<menuitem id="configuration_menu" name="Configuraiton" action="configuration_list_action"/>
    <record model="ir.actions.act_window" id="action_sea_map">
        <field name="name">Ideas</field>
        <field name="res_model">idea.idea</field>
        <field name="view_mode">tree,form</field> -->
            <script type="text/javascript" src="static/src/sea.js"/>



Plesae guide that module installs correctly but data as well as menu item in parent is not shown






OK I doo @Vasanth PLease tell remaining code seems ok? Javascript path etc?

Mazhar Iqbal Rana
on 2/11/15, 2:23 AM

Andt his template will come within the record?

Mazhar Iqbal Rana
on 2/11/15, 2:26 AM


| 5 3 8
Pondicherry, India
On 2/11/15, 1:34 AM

try this in instead of your menu item

        <menuitem name="Sea Map"   id="main_sea_menu" />
        <menuitem name="Sea Map1" parent="main_sea_menu"  id="sea_menu" />
        <menuitem name="Sea Map2" parent="sea_menu"  id="maps_menu" action="sea_list_action" />

 <record model="ir.actions.act_window" id="sea_list_action">
        <field name="name">Ideas</field>
        <field name="res_model">idea.idea</field>
        <field name="view_mode">tree,form</field>


Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)


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